From 73e40c3656127b4ad0922264a74aa4f7069bb969 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 20 Oct 2023 11:16:43 +0100 Subject: [PATCH] Merge pull request #15354 from overleaf/ae-i18next-compatibility Set compatibilityJSON to v3 for plural suffixes GitOrigin-RevId: 8da0fc5a2777dbdc9abe9d72a47adab029ab91ef --- services/web/app/src/infrastructure/Translations.js | 3 +++ services/web/frontend/js/i18n.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/services/web/app/src/infrastructure/Translations.js b/services/web/app/src/infrastructure/Translations.js index 68d82ec058..aab680bde7 100644 --- a/services/web/app/src/infrastructure/Translations.js +++ b/services/web/app/src/infrastructure/Translations.js @@ -47,6 +47,9 @@ i18n loadPath: path.join(__dirname, '../../../locales/__lng__.json'), }, + // still using the v3 plural suffixes + compatibilityJSON: 'v3', + // Load translation files synchronously: https://www.i18next.com/overview/configuration-options#initimmediate initImmediate: false, diff --git a/services/web/frontend/js/i18n.js b/services/web/frontend/js/i18n.js index 6e95c574e8..9928d2879f 100644 --- a/services/web/frontend/js/i18n.js +++ b/services/web/frontend/js/i18n.js @@ -11,6 +11,9 @@ const LANG = window.i18n.currentLangCode i18n.use(initReactI18next).init({ lng: LANG, + // still using the v3 plural suffixes + compatibilityJSON: 'v3', + react: { // Since we are manually waiting on the translations data to // load, we don't need to use Suspense