Skip to content

Commit

Permalink
Merge pull request #786 from ipfs-shipyard/fix/chinese-translation
Browse files Browse the repository at this point in the history
Rename Locale for Chinese (China) to zh-CN 

Received some useful hints from our friends at Transifex and I think this approach is the  way to go forward.

This PR applies revised naming convention from ipfs/ipfs-gui#50 (comment)  and renames Chinese locale from `zh` to `zh-CN`,  which is supported by `i18next` and match value from `Accept-Language`

I smoke tested this PR and strings that are already translated rendered correctly.

In the future we can add `pt-BR` and  `en-GB` using the same convention :)
  • Loading branch information
lidel authored Sep 8, 2018
2 parents 2c0e937 + 67f9c7a commit 6144b5f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,33 @@ host = https://www.transifex.com

[ipfs-webui.files-json]
file_filter = public/locales/<lang>/files.json
minimum_perc = 0
minimum_perc = 1
source_file = public/locales/en/files.json
source_lang = en
lang_map = zh_CN: zh-CN
type = KEYVALUEJSON

[ipfs-webui.peers-json]
file_filter = public/locales/<lang>/peers.json
minimum_perc = 0
minimum_perc = 1
source_file = public/locales/en/peers.json
source_lang = en
lang_map = zh_CN: zh-CN
type = KEYVALUEJSON

[ipfs-webui.settings-json]
file_filter = public/locales/<lang>/settings.json
minimum_perc = 0
minimum_perc = 1
source_file = public/locales/en/settings.json
source_lang = en
lang_map = zh_CN: zh-CN
type = KEYVALUEJSON

[ipfs-webui.status-json]
file_filter = public/locales/<lang>/status.json
minimum_perc = 0
minimum_perc = 1
source_file = public/locales/en/status.json
source_lang = en
lang_map = zh_CN: zh-CN
type = KEYVALUEJSON

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6144b5f

Please sign in to comment.