diff --git a/packages/components/src/_i18n/CommonTranslations.ts b/packages/components/src/_i18n/CommonTranslations.ts index 3d0a8a0ccb..1d44d221e0 100644 --- a/packages/components/src/_i18n/CommonTranslations.ts +++ b/packages/components/src/_i18n/CommonTranslations.ts @@ -115,7 +115,7 @@ interface DeepDictionary { // Merge two deep dictionaries. // On ties, give preference to the first one. -function MergeDeepDictionary(dictA: Resource, dictB: DeepDictionary) : DeepDictionary { +function MergeDeepDictionary(dictA: DeepDictionary, dictB: DeepDictionary) : DeepDictionary { let output : DeepDictionary = {}; let keys = new Set(Object.keys(dictA).concat(Object.keys(dictB))); diff --git a/packages/storyteller/src/App.tsx b/packages/storyteller/src/App.tsx index 7fecd533f4..5846f38754 100644 --- a/packages/storyteller/src/App.tsx +++ b/packages/storyteller/src/App.tsx @@ -13,7 +13,7 @@ import { SessionWrapper } from '@storyteller/components/src/session/SessionWrapp import { DetectLocale, DetectLocaleIsOk } from '@storyteller/components/src/api/locale/DetectLocale'; import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; -import { TRANSLATIONS } from './_i18n/Translations' +import { STORYTELLER_MERGED_TRANSLATIONS } from './_i18n/StorytellerTranslations' i18n .use(initReactI18next) // passes i18n down to react-i18next @@ -21,7 +21,7 @@ i18n // the translations // (tip move them in a JSON file and import them, // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui) - resources: TRANSLATIONS as any, + resources: STORYTELLER_MERGED_TRANSLATIONS as any, //lng: 'en', // if you're using a language detector, do not define the lng option fallbackLng: 'en', diff --git a/packages/storyteller/src/_i18n/Translations.ts b/packages/storyteller/src/_i18n/StorytellerTranslations.ts similarity index 87% rename from packages/storyteller/src/_i18n/Translations.ts rename to packages/storyteller/src/_i18n/StorytellerTranslations.ts index 6d4fee08d6..68d4ffb3ab 100644 --- a/packages/storyteller/src/_i18n/Translations.ts +++ b/packages/storyteller/src/_i18n/StorytellerTranslations.ts @@ -66,6 +66,6 @@ const STORYTELLER_TRANSLATIONS : any = { }, } -const TRANSLATIONS = MergeDeepDictionary(STORYTELLER_TRANSLATIONS, COMMON_TRANSLATIONS); +const STORYTELLER_MERGED_TRANSLATIONS = MergeDeepDictionary(STORYTELLER_TRANSLATIONS, COMMON_TRANSLATIONS); -export { TRANSLATIONS } +export { STORYTELLER_MERGED_TRANSLATIONS } diff --git a/packages/storyteller/src/layout/TopNavSessionButton.tsx b/packages/storyteller/src/layout/TopNavSessionButton.tsx index ba2fd1f2fd..0406ea7b84 100644 --- a/packages/storyteller/src/layout/TopNavSessionButton.tsx +++ b/packages/storyteller/src/layout/TopNavSessionButton.tsx @@ -56,14 +56,14 @@ function TopNavSessionButton(props: Props) { await logoutHandler(); props.closeHamburgerAction(); }} - >{t('coreUi.topNav.logout')}; + >{t('common.logout')}; } else { sessionLink = ( props.closeHamburgerAction()} - >{t('coreUi.topNav.signUpLogin')} + >{t('common.signUpLogin')} ); }