From e044146aa55109a1eccfde9650b26beb0d5ec9a6 Mon Sep 17 00:00:00 2001 From: sct Date: Fri, 22 Jan 2021 14:02:02 +0000 Subject: [PATCH] feat(lang): add support for Portuguese (Portugal) language --- src/components/Layout/LanguagePicker/index.tsx | 4 ++++ src/context/LanguageContext.tsx | 1 + src/pages/_app.tsx | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/components/Layout/LanguagePicker/index.tsx b/src/components/Layout/LanguagePicker/index.tsx index 84532f00a..c3677c67a 100644 --- a/src/components/Layout/LanguagePicker/index.tsx +++ b/src/components/Layout/LanguagePicker/index.tsx @@ -57,6 +57,10 @@ const availableLanguages: AvailableLanguageObject = { code: 'pt-BR', display: 'Portuguese (Brazil)', }, + 'pt-PT': { + code: 'pt-PT', + display: 'Portuguese (Portugal)', + }, sr: { code: 'sr', display: 'Serbian', diff --git a/src/context/LanguageContext.tsx b/src/context/LanguageContext.tsx index ef68931e1..a4c958730 100644 --- a/src/context/LanguageContext.tsx +++ b/src/context/LanguageContext.tsx @@ -11,6 +11,7 @@ export type AvailableLocales = | 'es' | 'it' | 'pt-BR' + | 'pt-PT' | 'sr' | 'sv' | 'zh-Hant'; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index bf6b279b0..2009f560e 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -38,6 +38,8 @@ const loadLocaleData = (locale: AvailableLocales): Promise => { return import('../i18n/locale/it.json'); case 'pt-BR': return import('../i18n/locale/pt_BR.json'); + case 'pt-PT': + return import('../i18n/locale/pt_PT.json'); case 'sr': return import('../i18n/locale/sr.json'); case 'sv':