Merge pull request #2009 from xatier/master

Add Traditional Chinese in i18n
This commit is contained in:
AkiraFukushima 2020-12-25 19:52:38 +09:00 committed by GitHub
commit a56f6ea46f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import * as path from 'path'
import fs from 'fs' import fs from 'fs'
import keys from 'all-object-keys' import keys from 'all-object-keys'
const locales = ['de', 'fr', 'it', 'ja', 'ko', 'pl', 'zh_cn'] const locales = ['de', 'fr', 'it', 'ja', 'ko', 'pl', 'zh_cn', 'zh_tw']
describe('i18n', () => { describe('i18n', () => {
describe('should not define duplicate keys', () => { describe('should not define duplicate keys', () => {

View File

@ -14,6 +14,7 @@ import ru from '~/src/config/locales/ru/translation.json'
import sv_se from '~/src/config/locales/sv_se/translation.json' import sv_se from '~/src/config/locales/sv_se/translation.json'
import tzm from '~/src/config/locales/tzm/translation.json' import tzm from '~/src/config/locales/tzm/translation.json'
import zh_cn from '~/src/config/locales/zh_cn/translation.json' import zh_cn from '~/src/config/locales/zh_cn/translation.json'
import zh_tw from '~/src/config/locales/zh_tw/translation.json'
const options: InitOptions = { const options: InitOptions = {
initImmediate: false, initImmediate: false,
@ -65,6 +66,9 @@ const options: InitOptions = {
}, },
zh_cn: { zh_cn: {
translation: zh_cn translation: zh_cn
},
zh_tw: {
translation: zh_tw
} }
} }
} }

View File

@ -31,6 +31,10 @@ export default {
name: '简体中文', name: '简体中文',
key: 'zh_cn' key: 'zh_cn'
}, },
zh_tw: {
name: '繁體中文',
key: 'zh_tw'
},
cs: { cs: {
name: 'čeština', name: 'čeština',
key: 'cs' key: 'cs'

View File

@ -34,7 +34,8 @@ export default {
Language.ru, Language.ru,
Language.sv_se, Language.sv_se,
Language.tzm, Language.tzm,
Language.zh_cn Language.zh_cn,
Language.zh_tw
] ]
} }
}, },