Make the Chinese translations actually work

Before this change, the user must configure `lang="zh"` to use the CN version (neither `lang="zh_CN"` nor `lang="zh_TW"` works).
This commit is contained in:
Shengbin Meng 2017-03-28 21:35:51 +08:00 committed by GitHub
parent d37b5bb030
commit 4b7a32afac

View File

@ -2,8 +2,8 @@ define(["app/config", "app/i18n/bg", "app/i18n/cs", "app/i18n/de",
"app/i18n/en", "app/i18n/fa", "app/i18n/fi", "app/i18n/fr", "app/i18n/en", "app/i18n/fa", "app/i18n/fi", "app/i18n/fr",
"app/i18n/hr", "app/i18n/ru", "app/i18n/it", "app/i18n/eo", "app/i18n/hr", "app/i18n/ru", "app/i18n/it", "app/i18n/eo",
"app/i18n/sv", "app/i18n/nl", "app/i18n/el_GR", "app/i18n/es", "app/i18n/sv", "app/i18n/nl", "app/i18n/el_GR", "app/i18n/es",
"app/i18n/vi", "app/i18n/zh_CN"], "app/i18n/vi", "app/i18n/zh_CN", "app/i18n/zh_TW"],
function(config, bg, cs, de, en, fa, fi, fr, hr, ru, it, eo, sv, nl, el, es, vi, zh) { function(config, bg, cs, de, en, fa, fi, fr, hr, ru, it, eo, sv, nl, el, es, vi, zh_CN, zh_TW) {
"use strict"; "use strict";
@ -23,7 +23,8 @@ define(["app/config", "app/i18n/bg", "app/i18n/cs", "app/i18n/de",
case "sv": case "sv":
case "nl": case "nl":
case "vi": case "vi":
case "zh": case "zh_CN":
case "zh_TW":
return function(msgs, n) { return function(msgs, n) {
return msgs[n === 1 ? 0 : 1]; return msgs[n === 1 ? 0 : 1];
}; };
@ -70,7 +71,8 @@ define(["app/config", "app/i18n/bg", "app/i18n/cs", "app/i18n/de",
sv: sv, sv: sv,
nl: nl, nl: nl,
vi: vi, vi: vi,
zh: zh zh_CN: zh_CN,
zh_TW: zh_TW
}; };
var plural = pluralforms(lang); var plural = pluralforms(lang);