mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-10-07 19:43:22 +00:00
chore(vue3-i18n): prepare vue-i18n-extract and add missing locales in runtime
* Estonian (et) * Mongolian (mn) * Burmese (my) Also, disable unicorn/no-await-expression-member rule for convenience
This commit is contained in:
parent
c43bb66d8c
commit
77793fb7b3
@ -64,7 +64,7 @@ module.exports = {
|
||||
bundledDependencies: false
|
||||
}
|
||||
],
|
||||
'import/no-nodejs-modules': ['error', { allow: ['vite.config.ts'] }],
|
||||
'import/no-nodejs-modules': 'error',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
@ -162,6 +162,7 @@ module.exports = {
|
||||
'unicorn/filename-case': 'off',
|
||||
'unicorn/consistent-function-scoping': 'off',
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
'unicorn/no-await-expression-member': 'off',
|
||||
'eslint-comments/no-unused-disable': 'error'
|
||||
},
|
||||
settings: {
|
||||
|
@ -9,13 +9,14 @@ const BROWSER_LANGUAGE = computed<string>(
|
||||
);
|
||||
|
||||
const i18n = createI18n({
|
||||
fallbackLocale: DEFAULT_LANGUAGE,
|
||||
globalInjection: true,
|
||||
legacy: false,
|
||||
locale: Object.keys(messages).includes(BROWSER_LANGUAGE.value)
|
||||
? BROWSER_LANGUAGE.value
|
||||
: DEFAULT_LANGUAGE,
|
||||
fallbackLocale: DEFAULT_LANGUAGE,
|
||||
messages,
|
||||
globalInjection: true,
|
||||
legacy: false
|
||||
|
||||
messages
|
||||
});
|
||||
|
||||
export const languageMap = {
|
||||
@ -30,6 +31,7 @@ export const languageMap = {
|
||||
eo: 'Esperanto',
|
||||
es: 'Español',
|
||||
'es-419': 'Español (América Latina)',
|
||||
et: 'Eesti keel',
|
||||
fa: 'فارسی',
|
||||
fi: 'Suomi',
|
||||
fil: 'Pilipino',
|
||||
@ -44,7 +46,9 @@ export const languageMap = {
|
||||
ko: '한국어',
|
||||
lt: 'Lietuvių kalba',
|
||||
ml: 'മലയാളം',
|
||||
mn: 'Монгол хэл',
|
||||
ms: 'بهاس ملايو',
|
||||
my: 'မြန်မာဘာသာစကား',
|
||||
'nb-NO': 'Norsk',
|
||||
nl: 'Nederlands',
|
||||
nn: 'Norsk Nynorsk',
|
||||
|
14
frontend/vue-i18n-extract.config.js
Normal file
14
frontend/vue-i18n-extract.config.js
Normal file
@ -0,0 +1,14 @@
|
||||
export default {
|
||||
/*
|
||||
* https://github.com/Spittal/vue-i18n-extract
|
||||
/*
|
||||
Required (Glob files pattern)
|
||||
Do not include the entire src directory because vue-i18n-extract doesn't have a way to exclude directories
|
||||
*/
|
||||
vueFiles: './src/{pages,layouts,components}/**/*.vue',
|
||||
languageFiles: './locales/*.json',
|
||||
output: false,
|
||||
add: false,
|
||||
remove: false,
|
||||
ci: true
|
||||
};
|
Loading…
Reference in New Issue
Block a user