-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] about log "Translation key "myKey" has multiple different default values. Using first default" #69
Comments
Hi @wichert There is a warning message about default conflict that was added in this commit: But, there should be no default value for other languages that need to translate. How about showing the warning message only for the first item (i.e. the default language) of the "lngs" array. That is, it will omit the warning message for 'de' and 'fr' languages with the example below: {
lngs: ['en', 'de', 'fr'] // array of supported languages
} |
Thank you for quick response. |
@thibaudcournollet This warning will not cause any issues to your current work, but we may need to suppress this warning message to prevent false positives. |
@cheton Your suggestion definitely makes sense. I'm not sure how to accomplish that though? |
@wichert } else if ((resLoad[resKey] !== options.defaultValue) && (lng === defaultLng)) {
// We already had a different default.
const k = chalk.yellow(JSON.stringify(resKey));
this.log(`i18next-scanner: Translation key ${k} has multiple different default values. Using first default`);
} |
When I generate two translation files (en and de) after modifying the "de" file, I have this log.
en-translations.json :
de-translations.json :
console :
i18next-scanner: Translation key "To get started, edit <1>src/App.js</1> and save to reload." has multiple different default values. Using first default
Can you explain to me why this happen with tag and not with t() function ?
Thanks for your help.
The text was updated successfully, but these errors were encountered: