From b21e69ebc0ac6c4f22084a0279b95880d38cbfe7 Mon Sep 17 00:00:00 2001 From: Vineet Sharma Date: Mon, 22 Jan 2024 11:55:27 +0530 Subject: [PATCH] Editing a default value should update the translation files --- packages/esm-home-app/translations/fr.json | 2 +- tools/i18next-parser.config.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/esm-home-app/translations/fr.json b/packages/esm-home-app/translations/fr.json index a5ff8c612..b170e38e4 100644 --- a/packages/esm-home-app/translations/fr.json +++ b/packages/esm-home-app/translations/fr.json @@ -1,3 +1,3 @@ { - "Home": "Home" + "Home": "Maison" } diff --git a/tools/i18next-parser.config.js b/tools/i18next-parser.config.js index 684a5c644..ac2f28300 100644 --- a/tools/i18next-parser.config.js +++ b/tools/i18next-parser.config.js @@ -76,6 +76,12 @@ module.exports = { failOnWarnings: false, // Exit with an exit code of 1 on warnings + resetDefaultValueLocale: 'en', + // The locale to compare with default values to determine whether a default value has been changed. + // If this is set and a default value differs from a translation in the specified locale, all entries + // for that key across locales are reset to the default value, and existing translations are moved to + // the `_old` file. + customValueTemplate: null, // If you wish to customize the value output the value as an object, you can set your own format. // ${defaultValue} is the default value you set in your translation function.