Closed ThibaultAndreis closed 11 months ago
I think that would be helpful. I've had an unpleasant time recently trying to find which translation were missing.
Hi @ThibaultAndreis! Thanks for your PR! I see it useful too, but I'd vote for debug
log level..
I can change that Should we then add a warn if no tranlsation nor fallback value is found ?
like so :
if (text === undefined) {
logger.debug(`No translation provided for '${key}' key in fallback '${fallbackLocale}'.`);
if (rest.hasOwnProperty('fallbackValue') ) {
return rest.fallbackValue;
}
logger.warn(`No translation nor fallback found for '${key}' .`);
}
i've made the changes to my PR
Published 🚀
@sveltekit-i18n/base@1.3.7
I think it would be useful to have logs specifying which translation is missing.
Currently, if no translation is found, no log specifies if it's missing from the provided locale and/or fallback.
I've made a pull request in sveltekit-i18n/base to propose small changes that would add them.