Added new languages, fixed accessibility for language selector

This commit is contained in:
RemixDev 2021-10-05 11:36:58 +02:00
parent c29218b7ad
commit 9c80d4b28c
9 changed files with 508 additions and 183 deletions

File diff suppressed because one or more lines are too long

View File

@ -91,10 +91,12 @@
v-for="locale in locales" v-for="locale in locales"
:key="locale" :key="locale"
:class="{ 'locale-flag--current': currentLocale === locale }" :class="{ 'locale-flag--current': currentLocale === locale }"
:title="locale" :title="`${flags[locale].eng} (${flags[locale].name})`"
tabindex="0"
class="inline-flex items-center locale-flag" class="inline-flex items-center locale-flag"
@click="changeLocale(locale)" @click="changeLocale(locale)"
v-html="flags[locale]" @keyup.enter="changeLocale(locale)"
v-html="flags[locale].flag"
/> />
</ul> </ul>
</div> </div>

View File

@ -222,7 +222,9 @@ const en = {
}, },
loginWithCredentials: { loginWithCredentials: {
title: 'Login with credentials', title: 'Login with credentials',
login: 'Login' login: 'Login',
email: 'E-mail',
password: 'Password'
}, },
appearance: { appearance: {
title: 'Appearance', title: 'Appearance',

View File

@ -1,4 +1,4 @@
const ph = { const fil = {
globals: { globals: {
welcome: 'Welcome sa deemix', welcome: 'Welcome sa deemix',
back: 'bumalik', back: 'bumalik',
@ -386,4 +386,4 @@ const ph = {
} }
} }
export default ph export default fil

View File

@ -1,3 +1,4 @@
// Using ISO 639-1 where possible
import it from '@/lang/it' import it from '@/lang/it'
import en from '@/lang/en' import en from '@/lang/en'
import es from '@/lang/es' import es from '@/lang/es'
@ -8,15 +9,16 @@ import pt from '@/lang/pt-pt'
import pt_br from '@/lang/pt-br' import pt_br from '@/lang/pt-br'
import ru from '@/lang/ru' import ru from '@/lang/ru'
import tr from '@/lang/tr' import tr from '@/lang/tr'
import vn from '@/lang/vn' import vi from '@/lang/vi'
import hr from '@/lang/hr' import hr from '@/lang/hr'
import ar from '@/lang/ar' import ar from '@/lang/ar'
import ko from '@/lang/ko' import ko from '@/lang/ko'
import ph from '@/lang/ph' import fil from '@/lang/fil'
import zh_tw from '@/lang/zh-tw' import zh_tw from '@/lang/zh-tw'
import pl from '@/lang/pl' import pl from '@/lang/pl'
import gr from '@/lang/gr' import el from '@/lang/el'
import sr from '@/lang/sr' import sr from '@/lang/sr'
import th from '@/lang/th'
export const locales = { export const locales = {
it, it,
@ -29,13 +31,14 @@ export const locales = {
pt_br, pt_br,
ru, ru,
tr, tr,
vn, vi,
hr, hr,
ar, ar,
ko, ko,
ph, fil,
zh_tw, zh_tw,
pl, pl,
gr, el,
sr sr,
th
} }

View File

@ -222,7 +222,9 @@ const it = {
}, },
loginWithCredentials: { loginWithCredentials: {
title: 'Login con credentiali', title: 'Login con credentiali',
login: 'Login' login: 'Login',
email: 'E-mail',
password: 'Password'
}, },
appearance: { appearance: {
title: 'Aspetto', title: 'Aspetto',

View File

@ -1,4 +1,4 @@
const vn = { const vi = {
globals: { globals: {
welcome: 'Chào mừng đến với deemix', welcome: 'Chào mừng đến với deemix',
back: 'trở lại', back: 'trở lại',
@ -354,4 +354,4 @@ const vn = {
} }
} }
export default vn export default vi

View File

@ -10,30 +10,34 @@ import ru from 'flag-icon-css/flags/4x3/ru.svg'
import tr from 'flag-icon-css/flags/4x3/tr.svg' import tr from 'flag-icon-css/flags/4x3/tr.svg'
import vn from 'flag-icon-css/flags/4x3/vn.svg' import vn from 'flag-icon-css/flags/4x3/vn.svg'
import hr from 'flag-icon-css/flags/4x3/hr.svg' import hr from 'flag-icon-css/flags/4x3/hr.svg'
import ar from '@/assets/ar.svg'
import ko from 'flag-icon-css/flags/4x3/kr.svg' import ko from 'flag-icon-css/flags/4x3/kr.svg'
import ph from 'flag-icon-css/flags/4x3/ph.svg' import ph from 'flag-icon-css/flags/4x3/ph.svg'
import tw from 'flag-icon-css/flags/4x3/tw.svg' import tw from 'flag-icon-css/flags/4x3/tw.svg'
import pl from 'flag-icon-css/flags/4x3/pl.svg' import pl from 'flag-icon-css/flags/4x3/pl.svg'
import rs from 'flag-icon-css/flags/4x3/rs.svg' import rs from 'flag-icon-css/flags/4x3/rs.svg'
import gr from 'flag-icon-css/flags/4x3/gr.svg'
import th from 'flag-icon-css/flags/4x3/th.svg'
import ar from '@/assets/ar.svg'
export const flags = { export const flags = {
it, it: { name: 'Italiano', eng: 'Italian', flag: it },
en: gb, en: { name: 'English', eng: 'English', flag: gb },
es, es: { name: 'Español', eng: 'Spanish', flag: es },
de, de: { name: 'Deutsch', eng: 'German', flag: de },
fr, fr: { name: 'Français', eng: 'French', flag: fr },
id, id: { name: 'Bahasa Indonesia', eng: 'Indonesian', flag: id },
pt, pt: { name: 'Português', eng: 'Portuguese', flag: pt },
pt_br: br, pt_br: { name: 'Português Brasileiro', eng: 'Portuguese of Brasil', flag: br },
ru, ru: { name: 'Русский', eng: 'Russian', flag: ru },
tr, tr: { name: 'Türkçe', eng: 'Turkish', flag: tr },
vn, vi: { name: 'Tiếng Việt', eng: 'Vietnamese', flag: vn },
hr, hr: { name: 'Hrvatski Jezik', eng: 'Croatian', flag: hr },
ar, ar: { name: 'العربية', eng: 'Arabic', flag: ar },
ko, ko: { name: '한국어', eng: 'Korean', flag: ko },
ph, fil: { name: 'Wikang Filipino', eng: 'Filipino', flag: ph },
zh_tw: tw, zh_tw: { name: '漢語', eng: 'Chinese', flag: tw },
pl, pl: { name: 'Polszczyzna', eng: 'Polish', flag: pl },
sr: rs el: { name: 'ελληνικά', eng: 'Greek', flag: gr },
sr: { name: 'српски језик', eng: 'Serbian', flag: rs },
th: { name: 'ไทย', eng: 'Thai', flag: th }
} }