Extract updates to default value as new `key:value` pair
abhijit945 opened this issue · 1 comments
abhijit945 commented
Describe the bug
I have en-us
i18next strings with default values:
t("en-locale-test:GoBack", "Back to Hello World");
// change to
t("en-locale-test:GoBack", "Back");
Additional translations could be ja-jp
etc. When I try to extract them only new keys are added to ja-jp
but changing the default value doesnt trigger the same behavior? This results in translations out of context or wrong strings in translation files.
How to reproduce
Babel configuration:
{
locales: supportedAdditionalLocales,
keySeparator: false,
keyAsDefaultValue: ['en-us'],
discardOldKeys: true,
useI18nextDefaultValue: true,
keyAsDefaultValueForDerivedKeys: true,
outputPath: 'src/_/i18n/languages/{{locale}}/{{ns}}.json',
},
Expected behavior
GoBack: "Back"
What actually happens
Extraction ignores this and doesnt notify the consumer.
GoBack: "Hello Worldに戻る"
dcalvom commented
I'm having the same issue. Did you were able to fix it?