From 0f3fb7688c4d2341424c5dc10e167bb41a8b3aa3 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 14 Oct 2022 05:42:13 -0700 Subject: [PATCH] Enable Chinese --- frontend/src/components/BottomBar.js | 10 ++++++++-- frontend/src/components/i18n.Native.js | 4 ++++ frontend/static/locales/{zh-si.json => zh-SI.json} | 0 frontend/static/locales/{zh-tr.json => zh-TR.json} | 0 4 files changed, 12 insertions(+), 2 deletions(-) rename frontend/static/locales/{zh-si.json => zh-SI.json} (100%) rename frontend/static/locales/{zh-tr.json => zh-TR.json} (100%) diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index 61e4b839..9e6a859e 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -424,11 +424,17 @@ class BottomBar extends Component { PT - +
- ZH + 简体 +
+ +
+ +
+ 繁體
diff --git a/frontend/src/components/i18n.Native.js b/frontend/src/components/i18n.Native.js index 0e090a25..35cd3814 100644 --- a/frontend/src/components/i18n.Native.js +++ b/frontend/src/components/i18n.Native.js @@ -16,6 +16,8 @@ import translationTH from '../../static/locales/th.json'; import translationCS from '../../static/locales/cs.json'; import translationEU from '../../static/locales/eu.json'; import translationSV from '../../static/locales/sv.json'; +import translationZHsi from '../../static/locales/zh-SI.json'; +import translationZHtr from '../../static/locales/zh-TR.json'; const config = { resources: { @@ -33,6 +35,8 @@ const config = { th: { translations: translationTH }, pl: { translations: translationPL }, sv: { translations: translationSV }, + 'zh-SI': { translations: translationZHsi }, + 'zh-TR': { translations: translationZHtr }, }, fallbackLng: 'en', debug: false, diff --git a/frontend/static/locales/zh-si.json b/frontend/static/locales/zh-SI.json similarity index 100% rename from frontend/static/locales/zh-si.json rename to frontend/static/locales/zh-SI.json diff --git a/frontend/static/locales/zh-tr.json b/frontend/static/locales/zh-TR.json similarity index 100% rename from frontend/static/locales/zh-tr.json rename to frontend/static/locales/zh-TR.json