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

Use correct language tags for script and regional language variants #3716

Merged
merged 2 commits into from Dec 3, 2019

Conversation

@wiz
Copy link
Member

wiz commented Nov 29, 2019

This PR fixes Bisq's language tags so Java's locale class will correctly display the name of script and regional variants of languages. There were previously hard-coded hacks to correctly display the language names correctly, and this PR removes those hacks since they are now properly displayed by Java.

It's actually a common misunderstanding in software localization:

  • The language's regional variant, which is often a country, is separated with a dash.
  • The user's country is separated with an underscore.

For some people, the difference is subtle:
"en-us" = American English
"en_US" = generic English in USA
"en-gb" = British English
"en-gb_US" = British English in USA

But for other people, the difference is very important:
"br" = Portugese
"br-pt" = Brazilian Portugese
"br-pt_JP" = Brazilian Portugese in Japan

In this case, to merge #3714, I need the following script variant:
"zh" = Chinese
"zh-hans" = Simplified Chinese
"zh-hant" = Traditional Chinese

Needs testing!

wiz added 2 commits Nov 29, 2019
@wiz wiz requested a review from ripcurlx as a code owner Nov 29, 2019
Copy link
Member

ripcurlx left a comment

ACK

Tested it locally on Regtest switching languages between pt, pt-BR and zh-Hans with app restart and everything worked as expected.

@ripcurlx ripcurlx merged commit d8e19c4 into bisq-network:master Dec 3, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ripcurlx ripcurlx mentioned this pull request Dec 13, 2019
@wiz wiz mentioned this pull request Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.