From 48d4312ddb22bd32dd7e0f4b8ff7bd5357ac0dd9 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Wed, 13 Feb 2019 18:10:15 -0800 Subject: [PATCH] Add Crowdin support This adds the crowdin.yml config file, and supports their export format. Specifically, if a string is not translated, Crowdin exports it as an empty string. The `returnEmptyString` i18next config option handles this case. Signed-off-by: Mcat12 --- crowdin.yml | 4 ++++ src/util/i18n.tsx | 1 + 2 files changed, 5 insertions(+) create mode 100644 crowdin.yml diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 0000000..207b6b6 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,4 @@ +commit_message: "Signed-off-by: pralor " +files: + - source: /public/i18n/en/*.json + translation: /public/i18n/%two_letters_code%/%original_file_name% \ No newline at end of file diff --git a/src/util/i18n.tsx b/src/util/i18n.tsx index 2473289..f49cbb9 100644 --- a/src/util/i18n.tsx +++ b/src/util/i18n.tsx @@ -38,6 +38,7 @@ export function setupI18n() { ], nsSeparator: false, keySeparator: false, + returnEmptyString: false, debug: config.developmentMode, interpolation: { // Handled by React