-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding log when no translation is found in provided local/fallback #154
Comments
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 |
I can change that 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 🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: