I18N: Fail i18n:extract on warnings + update strings (#60949)

* I18N: Fail i18n:extract on warnings

* I18N: Fix onboarding page title

* extract all strings

* move t reassign outside of function
This commit is contained in:
Josh Hunt
2023-01-04 15:28:07 +00:00
committed by GitHub
parent d572ccdb2a
commit a26d4c90b2
10 changed files with 122 additions and 3 deletions

View File

@@ -55,8 +55,11 @@ export const Trans: typeof I18NextTrans = (props) => {
return <I18NextTrans {...props} />;
};
// Reassign t() so i18next-parser doesn't warn on dynamic key, and we can have 'failOnWarnings' enabled
const tFunc = i18n.t;
export const t = (id: string, defaultMessage: string, values?: Record<string, unknown>) => {
return i18n.t(id, defaultMessage, values);
return tFunc(id, defaultMessage, values);
};
export const i18nDate = (value: number | Date | string, format: Intl.DateTimeFormatOptions = {}): string => {