Client - init Spanish (es) and Galician (gl) translation files
This commit is contained in:
@ -6,7 +6,7 @@ import { createI18n, LocaleMessages, VueMessageType } from 'vue-i18n'
|
||||
* The loaded `JSON` locale messages is pre-compiled by `@intlify/vue-i18n-loader`, which is integrated into `vue-cli-plugin-i18n`.
|
||||
* See: https://github.com/intlify/vue-i18n-loader#rocket-i18n-resource-pre-compilation
|
||||
*/
|
||||
const disabledLanguages = ['nb'] // to update after translations release
|
||||
const disabledLanguages = ['nb', 'es', 'gl'] // to update after translations release
|
||||
|
||||
function loadLocaleMessages(): Record<string, LocaleMessages<VueMessageType>> {
|
||||
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.ts$/i)
|
||||
|
2
fittrackee_client/src/locales/es/about.json
Normal file
2
fittrackee_client/src/locales/es/about.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/administration.json
Normal file
2
fittrackee_client/src/locales/es/administration.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/api.json
Normal file
2
fittrackee_client/src/locales/es/api.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/buttons.json
Normal file
2
fittrackee_client/src/locales/es/buttons.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/common.json
Normal file
2
fittrackee_client/src/locales/es/common.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/dashboard.json
Normal file
2
fittrackee_client/src/locales/es/dashboard.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/error.json
Normal file
2
fittrackee_client/src/locales/es/error.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
29
fittrackee_client/src/locales/es/es.ts
Normal file
29
fittrackee_client/src/locales/es/es.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import AboutTranslations from './about.json'
|
||||
import AdministrationTranslations from './administration.json'
|
||||
import ApiTranslations from './api.json'
|
||||
import ButtonsTranslations from './buttons.json'
|
||||
import CommonTranslations from './common.json'
|
||||
import DashboardTranslations from './dashboard.json'
|
||||
import ErrorTranslations from './error.json'
|
||||
import OAuth2Translations from './oauth2.json'
|
||||
import PrivacyPolicyTranslations from './privacy_policy.json'
|
||||
import SportsTranslations from './sports.json'
|
||||
import StatisticsTranslations from './statistics.json'
|
||||
import UserTranslations from './user.json'
|
||||
import WorkoutsTranslations from './workouts.json'
|
||||
|
||||
export default {
|
||||
about: AboutTranslations,
|
||||
admin: AdministrationTranslations,
|
||||
api: ApiTranslations,
|
||||
buttons: ButtonsTranslations,
|
||||
common: CommonTranslations,
|
||||
dashboard: DashboardTranslations,
|
||||
error: ErrorTranslations,
|
||||
oauth2: OAuth2Translations,
|
||||
privacy_policy: PrivacyPolicyTranslations,
|
||||
sports: SportsTranslations,
|
||||
statistics: StatisticsTranslations,
|
||||
user: UserTranslations,
|
||||
workouts: WorkoutsTranslations,
|
||||
}
|
2
fittrackee_client/src/locales/es/oauth2.json
Normal file
2
fittrackee_client/src/locales/es/oauth2.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
1
fittrackee_client/src/locales/es/privacy_policy.json
Normal file
1
fittrackee_client/src/locales/es/privacy_policy.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
2
fittrackee_client/src/locales/es/sports.json
Normal file
2
fittrackee_client/src/locales/es/sports.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/statistics.json
Normal file
2
fittrackee_client/src/locales/es/statistics.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/user.json
Normal file
2
fittrackee_client/src/locales/es/user.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/es/workouts.json
Normal file
2
fittrackee_client/src/locales/es/workouts.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/about.json
Normal file
2
fittrackee_client/src/locales/gl/about.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/administration.json
Normal file
2
fittrackee_client/src/locales/gl/administration.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/api.json
Normal file
2
fittrackee_client/src/locales/gl/api.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/buttons.json
Normal file
2
fittrackee_client/src/locales/gl/buttons.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/common.json
Normal file
2
fittrackee_client/src/locales/gl/common.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/dashboard.json
Normal file
2
fittrackee_client/src/locales/gl/dashboard.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/error.json
Normal file
2
fittrackee_client/src/locales/gl/error.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
29
fittrackee_client/src/locales/gl/gl.ts
Normal file
29
fittrackee_client/src/locales/gl/gl.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import AboutTranslations from './about.json'
|
||||
import AdministrationTranslations from './administration.json'
|
||||
import ApiTranslations from './api.json'
|
||||
import ButtonsTranslations from './buttons.json'
|
||||
import CommonTranslations from './common.json'
|
||||
import DashboardTranslations from './dashboard.json'
|
||||
import ErrorTranslations from './error.json'
|
||||
import OAuth2Translations from './oauth2.json'
|
||||
import PrivacyPolicyTranslations from './privacy_policy.json'
|
||||
import SportsTranslations from './sports.json'
|
||||
import StatisticsTranslations from './statistics.json'
|
||||
import UserTranslations from './user.json'
|
||||
import WorkoutsTranslations from './workouts.json'
|
||||
|
||||
export default {
|
||||
about: AboutTranslations,
|
||||
admin: AdministrationTranslations,
|
||||
api: ApiTranslations,
|
||||
buttons: ButtonsTranslations,
|
||||
common: CommonTranslations,
|
||||
dashboard: DashboardTranslations,
|
||||
error: ErrorTranslations,
|
||||
oauth2: OAuth2Translations,
|
||||
privacy_policy: PrivacyPolicyTranslations,
|
||||
sports: SportsTranslations,
|
||||
statistics: StatisticsTranslations,
|
||||
user: UserTranslations,
|
||||
workouts: WorkoutsTranslations,
|
||||
}
|
2
fittrackee_client/src/locales/gl/oauth2.json
Normal file
2
fittrackee_client/src/locales/gl/oauth2.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
1
fittrackee_client/src/locales/gl/privacy_policy.json
Normal file
1
fittrackee_client/src/locales/gl/privacy_policy.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
2
fittrackee_client/src/locales/gl/sports.json
Normal file
2
fittrackee_client/src/locales/gl/sports.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/statistics.json
Normal file
2
fittrackee_client/src/locales/gl/statistics.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/user.json
Normal file
2
fittrackee_client/src/locales/gl/user.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
2
fittrackee_client/src/locales/gl/workouts.json
Normal file
2
fittrackee_client/src/locales/gl/workouts.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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'
|
||||
|
Reference in New Issue
Block a user