X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fhelpers%2Fi18n-utils.ts;h=b7d73d16bda40e3aa9b8d28d7bfd52fdc05ca6cd;hb=HEAD;hp=2017a31ea3dc253feeddf9823dab95dc4fa1f74d;hpb=83b1b7eaf1c04837f92de497e74895bee808eb83;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/helpers/i18n-utils.ts b/client/src/app/helpers/i18n-utils.ts index 2017a31ea..b7d73d16b 100644 --- a/client/src/app/helpers/i18n-utils.ts +++ b/client/src/app/helpers/i18n-utils.ts @@ -1,5 +1,6 @@ -import { environment } from '../../environments/environment' import IntlMessageFormat from 'intl-messageformat' +import { logger } from '@root-helpers/logger' +import { environment } from '../../environments/environment' function isOnDevLocale () { return environment.production === false && window.location.search === '?lang=fr' @@ -19,14 +20,14 @@ function prepareIcu (icu: string) { try { return msg.format(context) as string } catch (err) { - if (!alreadyWarned) console.warn('Cannot format ICU %s.', icu, err) + if (!alreadyWarned) logger.warn(`Cannot format ICU ${icu}.`, err) alreadyWarned = true return fallback } } } catch (err) { - console.warn('Cannot build intl message %s.', icu, err) + logger.warn(`Cannot build intl message ${icu}.`, err) return (_context: unknown, fallback: string) => fallback }