Skip to content

Commit

Permalink
change log level for missing translations
Browse files Browse the repository at this point in the history
change log level for "missing translations" from warn to debug
  • Loading branch information
ThibaultAndreis authored Nov 2, 2023
1 parent 9771bd2 commit 3a62a4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export const translate: Translations.Translate = ({
let text = (translations[locale] || {})[key];

if (fallbackLocale && text === undefined) {
logger.warn(`No translation provided for '${key}' key in locale '${locale}'. Trying fallback '${fallbackLocale}'`);
logger.debug(`No translation provided for '${key}' key in locale '${locale}'. Trying fallback '${fallbackLocale}'`);
text = (translations[fallbackLocale] || {})[key];
}

if (text === undefined) {
logger.warn(`No translation provided for '${key}' key in fallback '${fallbackLocale}'.`);
logger.debug(`No translation provided for '${key}' key in fallback '${fallbackLocale}'.`);
if (rest.hasOwnProperty('fallbackValue') ) {
return rest.fallbackValue;
}
Expand Down

0 comments on commit 3a62a4a

Please sign in to comment.