From 04eabe68a7fd9eb95ab181aa2628c82625252d66 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 2 Jul 2021 12:08:08 -0700 Subject: [PATCH] feat: Enable traditional Chinese translations (#2266) --- app/components/LocaleTime.js | 15 ++++++++++++++- shared/i18n/index.js | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/components/LocaleTime.js b/app/components/LocaleTime.js index 2e5f09b67..e0e4219cc 100644 --- a/app/components/LocaleTime.js +++ b/app/components/LocaleTime.js @@ -1,6 +1,18 @@ // @flow import { format, formatDistanceToNow } from "date-fns"; -import { enUS, de, fr, es, it, ko, ptBR, pt, zhCN, ru } from "date-fns/locale"; +import { + enUS, + de, + fr, + es, + it, + ko, + ptBR, + pt, + zhCN, + zhTW, + ru, +} from "date-fns/locale"; import * as React from "react"; import Tooltip from "components/Tooltip"; import useUserLocale from "hooks/useUserLocale"; @@ -15,6 +27,7 @@ const locales = { pt_BR: ptBR, pt_PT: pt, zh_CN: zhCN, + zh_TW: zhTW, ru_RU: ru, }; diff --git a/shared/i18n/index.js b/shared/i18n/index.js index 847c318ef..002c2c8e7 100644 --- a/shared/i18n/index.js +++ b/shared/i18n/index.js @@ -8,6 +8,7 @@ import { initReactI18next } from "react-i18next"; export const languageOptions = [ { label: "English (US)", value: "en_US" }, { label: "简体中文 (Chinese, Simplified)", value: "zh_CN" }, + { label: "繁體中文 (Chinese, Traditional)", value: "zh_TW" }, { label: "Deutsch (Deutschland)", value: "de_DE" }, { label: "Español (España)", value: "es_ES" }, { label: "Français (France)", value: "fr_FR" },