Save missing fallback
This commit is contained in:
parent
cd80d72e32
commit
966b2d56b9
2 changed files with 4 additions and 4 deletions
|
|
@ -53,11 +53,10 @@ i18nOpts.react = {
|
||||||
nsMode: 'default' */
|
nsMode: 'default' */
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendMissing = Meteor.isDevelopment;
|
const sendMissing = false; // Meteor.isDevelopment;
|
||||||
if (sendMissing && !Meteor.isProduction) {
|
if (sendMissing && Meteor.isDevelopment) {
|
||||||
i18nOpts.sendMissing = true;
|
i18nOpts.sendMissing = true;
|
||||||
i18nOpts.sendMissingTo = 'fallback';
|
i18nOpts.missingKeyHandler = function miss(lng, ns, key, defaultValue) {
|
||||||
i18nOpts.missingKeyHandler = function miss(lng, ns, key, defaultValue, lngs) {
|
|
||||||
Meteor.call('utility.saveMissingI18n', key, defaultValue);
|
Meteor.call('utility.saveMissingI18n', key, defaultValue);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const i18nOpts = {
|
||||||
backend: backOpts,
|
backend: backOpts,
|
||||||
// lng: 'es',
|
// lng: 'es',
|
||||||
fallbackLng: ['es', 'en'],
|
fallbackLng: ['es', 'en'],
|
||||||
|
sendMissingTo: 'fallback',
|
||||||
interpolation: {
|
interpolation: {
|
||||||
escapeValue: false, // not needed for react!!
|
escapeValue: false, // not needed for react!!
|
||||||
formatSeparator: ',',
|
formatSeparator: ',',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue