-
Notifications
You must be signed in to change notification settings - Fork 75
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
Translation of country names using Locale::CLDR #205
Comments
If you look at the country names in the OTOBO -> Personal settings, you can see how it is supposed to be. First the name is displayed in the language of the country (so that the user who speaks the language can recognize it. Behind the minus is then the translation in the currently active language. Edit: this seems to be about language names, not the country names |
The relevant resources for countries in multiple languages seem to be https://cldr.unicode.org/, https://icu.unicode.org/, and https://metacpan.org/pod/Locale::Country::Multilingual. |
As far as I see in rel-11_0 the only place where a country list is used is the AdminCustomerCompany frontend. There there is either a selection of English country names from |
Finally found the module that has the information from the latest release of CLDR: Locale::CLDR. Looks like it also has everything than anybody ever wanted for localisation. |
Indirect object syntax is just mentioned in the documentation. But the regular constructor syntax works just as well.
the list should be stable because Locale::Codes is Kernel/cpan-lib Testing for the exact result also reduces the number of test cases. It will also be easier to detect future changes.
I verified with OTOBO 10.0.x that the SysConfig setting For the sake of this issue I propose the following:
|
Decided against added Locale::CLDR to Kernel/cpan-lib. This is because then the new dependencies of Locale::CLDR would also have to be added to Kernel/cpan-lib. And these modules might interfere with already installed versions of thess modules. So I declared Locale::CLDR as an optional dependency in the feature div:cldr. |
Worked on the implementation. Found that for each supported language the needed language pack must be installed. |
During test I set my language to french. After reloading the page I had in the language selection entries like "Nederlandse - Dutch". The first part is fine, that is Dutch in Dutch. But the second part should be néerlandais, that is Dutch in French. Looks like a translation is missing. I propose to use Locale::CLDR for the complete matrix. |
Implemented the translation of country names using Locale::CLDR. But my confidence that this is a good solution is waning a bit, as there are some problems:
|
Indirect object syntax is just mentioned in the documentation. But the regular constructor syntax works just as well.
the list should be stable because Locale::Codes is Kernel/cpan-lib Testing for the exact result also reduces the number of test cases. It will also be easier to detect future changes.
Also show the flag in the country selection. Load language packs for the most popular languages
in the customer information widget of the ticket zoom page
Thats is, check whether the Locale::CLDR object can be created. Add code comment about problem with Bouvet Island.
Indirect object syntax is just mentioned in the documentation. But the regular constructor syntax works just as well.
the list should be stable because Locale::Codes is Kernel/cpan-lib Testing for the exact result also reduces the number of test cases. It will also be easier to detect future changes.
Also show the flag in the country selection. Load language packs for the most popular languages
in the customer information widget of the ticket zoom page
Thats is, check whether the Locale::CLDR object can be created. Add code comment about problem with Bouvet Island.
Indirect object syntax is just mentioned in the documentation. But the regular constructor syntax works just as well.
the list should be stable because Locale::Codes is Kernel/cpan-lib Testing for the exact result also reduces the number of test cases. It will also be easier to detect future changes.
Activated with the SysConfig setting ReferenceData::TranslatedCountryNames. Also show the flag in the country selection. Load language packs for the most popular languages.
in the customer information widget of the ticket zoom page
Thats is, check whether the Locale::CLDR object can be created. Add code comment about problem with Bouvet Island.
This version fixed a bug that caused infinite recursion.
Translations work fine with Locale::CLDR 0.34.4. PR is merged. Closing this issue. |
Some missing pieces were encountered:
|
Closing again after the fixes. |
Most Country names are not translated. This means that when adding a customer in a non-english frontend, the country names are still mostly English.
TODO:
My guess is that these translations can be taken from a publicly available resource.
The text was updated successfully, but these errors were encountered: