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
Contributor

@wiz 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 wiz requested a review from ripcurlx as a code owner November 29, 2019 02:52
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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.

2 participants