Client - init Spanish (es) and Galician (gl) translation files

This commit is contained in:
Sam
2023-03-12 08:30:46 +01:00
parent 01d56041d3
commit 0a8efdb30c
34 changed files with 129 additions and 2 deletions

View File

@ -96,7 +96,9 @@ const availableDateFormats = [
export const dateStringFormats: Record<string, string> = {
de: 'do MMM yyyy',
en: 'MMM. do, yyyy',
// es: 'd MMM yyyy',
fr: 'd MMM yyyy',
// gl: 'd MMM yyyy',
it: 'd MMM yyyy',
// nb: 'do MMM yyyy',
nl: 'd MMM yyyy',

View File

@ -7,7 +7,9 @@ import createI18n from '@/i18n'
export const localeFromLanguage: Record<string, Locale> = {
de: de,
en: enUS,
// es: es, // disabled for now
fr: fr,
// gl: gl, // disabled for now
it: it,
// nb: nb, // disabled for now
nl: nl,
@ -16,7 +18,9 @@ export const localeFromLanguage: Record<string, Locale> = {
export const languageLabels: Record<string, string> = {
de: 'Deutsch',
en: 'English',
// es: 'Español', // disabled for now
fr: 'Français',
// gl: 'Galego', // disabled for now
it: 'Italiano',
// nb: 'Norsk bokmål', // disabled for now
nl: 'Nederlands',

View File

@ -1,7 +1,10 @@
import { zxcvbnOptions } from '@zxcvbn-ts/core'
export const loadLanguagePackage = async (language: string) => {
// no package available for norwegian bokmal and dutch (Nederlands)
// no package available for
// - dutch (Nederlands)
// - galician
// - norwegian bokmal
// fallback to english
switch (language) {
case 'fr':
@ -16,6 +19,10 @@ export const loadLanguagePackage = async (language: string) => {
return await import(
/* webpackChunkName: "password.it" */ '@zxcvbn-ts/language-it'
)
// case 'es':
// return await import(
// /* webpackChunkName: "password.es" */ '@zxcvbn-ts/language-es-es'
// )
default:
return await import(
/* webpackChunkName: "password.en" */ '@zxcvbn-ts/language-en'