API & Client - enable es, gl and nb translations

This commit is contained in:
Sam
2023-04-05 20:02:52 +02:00
parent 81679c2068
commit 1797409765
5 changed files with 18 additions and 23 deletions

View File

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

View File

@ -1,28 +1,28 @@
/* eslint-disable import/no-duplicates */
import { Locale } from 'date-fns'
import { de, enUS, fr, it, nl } from 'date-fns/locale'
import { de, enUS, es, fr, gl, it, nb, nl } from 'date-fns/locale'
import createI18n from '@/i18n'
export const localeFromLanguage: Record<string, Locale> = {
de: de,
en: enUS,
// es: es, // disabled for now
es: es,
fr: fr,
// gl: gl, // disabled for now
gl: gl,
it: it,
// nb: nb, // disabled for now
nb: nb,
nl: nl,
}
export const languageLabels: Record<string, string> = {
de: 'Deutsch',
en: 'English',
// es: 'Español', // disabled for now
es: 'Español',
fr: 'Français',
// gl: 'Galego', // disabled for now
gl: 'Galego',
it: 'Italiano',
// nb: 'Norsk bokmål', // disabled for now
nb: 'Norsk bokmål',
nl: 'Nederlands',
}

View File

@ -19,10 +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'
// )
case 'es':
return await import(
/* webpackChunkName: "password.es" */ '@zxcvbn-ts/language-es-es'
)
default:
return await import(
/* webpackChunkName: "password.en" */ '@zxcvbn-ts/language-en'