[bisq-network/bisq] Use correct language tags for script and regional language variants (#3716)

wiz notifications at github.com
Fri Nov 29 02:52:17 UTC 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!
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/3716

-- Commit Summary --

  * Fix language tags so script and regional variants work correctly
  * Adjust update_translations.sh language tags for script/regional variants

-- File Changes --

    M core/src/main/java/bisq/core/locale/LanguageUtil.java (22)
    R core/src/main/resources/i18n/displayStrings_pt-br.properties (0)
    R core/src/main/resources/i18n/displayStrings_zh-hans.properties (0)
    M core/update_translations.sh (4)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/3716.patch
https://github.com/bisq-network/bisq/pull/3716.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3716
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191128/1b93afcf/attachment.html>


More information about the bisq-github mailing list