diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index 599c4da78..246ddcfef 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -21,6 +21,7 @@ export const SUPPORTED_LOCALES = { 'hu-HU': 'Magyar', 'ar-SA': 'اَلْعَرَبِيَّةُ', 'sl-SI': 'Slovenščina', + 'pt-BR': 'Português Brasileiro', // IMPORTANT: Also add new languages to useDayjsLanguageSync } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index f90b69069..5d3a194d6 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -1,7 +1,7 @@ import {computed, ref, watch} from 'vue' import type dayjs from 'dayjs' -import {i18n, type SupportedLocale, type ISOLanguage} from '@/i18n' +import {i18n, type ISOLanguage, type SupportedLocale} from '@/i18n' export const DAYJS_LOCALE_MAPPING = { 'de-de': 'de', @@ -22,6 +22,7 @@ export const DAYJS_LOCALE_MAPPING = { 'hu-HU': 'hu', 'ar-SA': 'ar-sa', 'sl-SI': 'sl', + 'pt-BR': 'pt', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -36,13 +37,14 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'nl-nl': () => import('dayjs/locale/nl'), 'pt-pt': () => import('dayjs/locale/pt'), 'zh-cn': () => import('dayjs/locale/zh-cn'), - 'no-no': () => import('dayjs/locale/nn'), - 'es-es': () => import('dayjs/locale/es'), - 'da-dk': () => import('dayjs/locale/da'), - 'ja-jp': () => import('dayjs/locale/ja'), - 'hu-hu': () => import('dayjs/locale/hu'), - 'ar-sa': () => import('dayjs/locale/ar-sa'), - 'sl-si': () => import('dayjs/locale/sl'), + 'no-no': () => import('dayjs/locale/nn'), + 'es-es': () => import('dayjs/locale/es'), + 'da-dk': () => import('dayjs/locale/da'), + 'ja-jp': () => import('dayjs/locale/ja'), + 'hu-hu': () => import('dayjs/locale/hu'), + 'ar-sa': () => import('dayjs/locale/ar-sa'), + 'sl-si': () => import('dayjs/locale/sl'), + 'pt-br': () => import('dayjs/locale/pt-br'), } as Record Promise> export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {