From e950be4710db6d0f3fc0c1c77be03699c40af132 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Oct 2023 08:06:24 +0200 Subject: [PATCH] Switched t/Trans useage --- src/frontend/src/contexts/LanguageContext.tsx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/frontend/src/contexts/LanguageContext.tsx b/src/frontend/src/contexts/LanguageContext.tsx index a08e88d570..9c688e55b9 100644 --- a/src/frontend/src/contexts/LanguageContext.tsx +++ b/src/frontend/src/contexts/LanguageContext.tsx @@ -1,5 +1,5 @@ import { i18n } from '@lingui/core'; -import { t } from '@lingui/macro'; +import { Trans } from '@lingui/macro'; import { I18nProvider } from '@lingui/react'; import { useEffect } from 'react'; @@ -9,36 +9,36 @@ import { useLocalState } from '../states/LocalState'; // Definitions export type Locales = keyof typeof languages | 'pseudo-LOCALE'; -export const languages: Record = { - cs: t`Czech`, - da: t`Danish`, - de: t`German`, - el: t`Greek`, - en: t`English`, - es: t`Spanish`, - 'es-mx': t`Spanish (Mexican)`, - fa: t`Farsi / Persian`, - fi: t`Finnish`, - fr: t`French`, - he: t`Hebrew`, - hi: t`Hindi`, - hu: t`Hungarian`, - it: t`Italian`, - ja: t`Japanese`, - ko: t`Korean`, - nl: t`Dutch`, - no: t`Norwegian`, - pl: t`Polish`, - pt: t`Portuguese`, - 'pt-br': t`Portuguese (Brazilian)`, - ru: t`Russian`, - sl: t`Slovenian`, - sv: t`Swedish`, - th: t`Thai`, - tr: t`Turkish`, - vi: t`Vietnamese`, - 'zh-hans': t`Chinese (Simplified)`, - 'zh-hant': t`Chinese (Traditional)` +export const languages: Record = { + cs: Czech, + da: Danish, + de: German, + el: Greek, + en: English, + es: Spanish, + 'es-mx': Spanish (Mexican), + fa: Farsi / Persian, + fi: Finnish, + fr: French, + he: Hebrew, + hi: Hindi, + hu: Hungarian, + it: Italian, + ja: Japanese, + ko: Korean, + nl: Dutch, + no: Norwegian, + pl: Polish, + pt: Portuguese, + 'pt-br': Portuguese (Brazilian), + ru: Russian, + sl: Slovenian, + sv: Swedish, + th: Thai, + tr: Turkish, + vi: Vietnamese, + 'zh-hans': Chinese (Simplified), + 'zh-hant': Chinese (Traditional) }; export function LanguageContext({ children }: { children: JSX.Element }) {