Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#400] Fix GVL must support translations #404

Conversation

marco-prontera
Copy link
Contributor

@marco-prontera marco-prontera commented Jul 28, 2023

The goal of this PR is to enable the users of this repository to provide the language with variants (like pt-BR, pt-PT). This will enable us to fetch the correct translations of all capabilities (purpose, features, and so on), and to show to the user the most correct translation we can.

As we can see at this link https://register.consensu.org/Translation, the translations have a suffix that doesn't correspond to the language used in the TCModel since it uses the language with ISO-639-1 (it means it uses only two letters).

The solution I proposed is to use the most near language supported when the CMPs provide that language and update the list of supported languages since it's changed.
With these changes the GVL support the language and it's translations for every supported variant.
Of course for TCModel nothing is changed it will use only the first two letters of the language.
closes #400

@marco-prontera marco-prontera marked this pull request as draft July 28, 2023 13:07
@marco-prontera marco-prontera marked this pull request as ready for review July 28, 2023 14:01
@marco-prontera marco-prontera marked this pull request as draft July 31, 2023 09:17
@marco-prontera marco-prontera marked this pull request as ready for review July 31, 2023 09:55
@marco-prontera marco-prontera changed the base branch from master to develop July 31, 2023 09:55
@marco-prontera marco-prontera changed the base branch from develop to master July 31, 2023 09:55
@sevriugin
Copy link
Collaborator

@marco-prontera how this solution works if someone would like to load pt translation? It will return pt-PT ? The same for sr - it will be sr-Latin ? Could we add tests for these cases? Thanks 🙏

@marco-prontera
Copy link
Contributor Author

@marco-prontera how this solution works if someone would like to load pt translation? It will return pt-PT ? The same for sr - it will be sr-Latin ? Could we add tests for these cases? Thanks 🙏

I introduced a test to cover all supported languages

@sevriugin sevriugin merged commit bb94e0b into InteractiveAdvertisingBureau:master Aug 31, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I select PT-PT language? is imposible according with your code
2 participants