API & Client - enable pl translations

This commit is contained in:
Sam
2023-06-24 19:14:02 +02:00
parent 8b60ca181f
commit b1c8a1c376
7 changed files with 21 additions and 21 deletions

View File

@ -100,7 +100,7 @@ export const dateStringFormats: Record<string, string> = {
fr: 'd MMM yyyy',
gl: 'd MMM yyyy',
it: 'd MMM yyyy',
// pl: 'd MMM yyyy', // disabled for now
pl: 'd MMM yyyy',
nb: 'do MMM yyyy',
nl: 'd MMM yyyy',
}

View File

@ -1,6 +1,6 @@
/* eslint-disable import/no-duplicates */
import { Locale } from 'date-fns'
import { de, enUS, es, fr, gl, it, nb, nl } from 'date-fns/locale'
import { de, enUS, es, fr, gl, it, nb, nl, pl } from 'date-fns/locale'
import createI18n from '@/i18n'
@ -11,7 +11,7 @@ export const localeFromLanguage: Record<string, Locale> = {
fr: fr,
gl: gl,
it: it,
// pl: pl,
pl: pl,
nb: nb,
nl: nl,
}
@ -22,10 +22,10 @@ export const languageLabels: Record<string, string> = {
es: 'Español',
fr: 'Français',
gl: 'Galego',
it: 'Italiano',
// pl: 'Polski',
nb: 'Norsk bokmål',
it: 'Italiano (87%)',
nb: 'Norsk bokmål (36%)',
nl: 'Nederlands',
pl: 'Polski (43%)',
}
const { availableLocales } = createI18n.global

View File

@ -2,9 +2,9 @@ import { zxcvbnOptions } from '@zxcvbn-ts/core'
export const loadLanguagePackage = async (language: string) => {
// no package available for
// - dutch (Nederlands)
// - galician
// - norwegian bokmal
// - Dutch (Nederlands)
// - Galician
// - Norwegian bokmal
// fallback to english
switch (language) {
case 'fr':
@ -23,11 +23,10 @@ export const loadLanguagePackage = async (language: string) => {
return await import(
/* webpackChunkName: "password.es" */ '@zxcvbn-ts/language-es-es'
)
// TODO: add package
// case 'pl':
// return await import(
// /* webpackChunkName: "password.pl" */ '@zxcvbn-ts/language-pl'
// )
case 'pl':
return await import(
/* webpackChunkName: "password.pl" */ '@zxcvbn-ts/language-pl'
)
default:
return await import(
/* webpackChunkName: "password.en" */ '@zxcvbn-ts/language-en'