You can change the language :)

This commit is contained in:
Henrique Dias 2017-08-01 17:48:53 +01:00
parent 1eedf5d665
commit 4ee4732a52
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
6 changed files with 29 additions and 5 deletions

View File

@ -48,6 +48,7 @@ form.dashboard > p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.dashboard select,
.dashboard textarea, .dashboard textarea,
.dashboard input[type="text"], .dashboard input[type="text"],
.dashboard input[type="password"] { .dashboard input[type="password"] {
@ -60,12 +61,18 @@ form.dashboard > p:last-child {
width: 100%; width: 100%;
} }
.dashboard #locale,
.dashboard #username, .dashboard #username,
.dashboard #password, .dashboard #password,
.dashboard #scope { .dashboard #scope {
max-width: 18em; max-width: 18em;
} }
.dashboard #locale {
border: 1px solid #dddddd;
margin-top: .5em;
}
.dashboard textarea:focus, .dashboard textarea:focus,
.dashboard textarea:hover, .dashboard textarea:hover,
.dashboard input[type="text"]:focus, .dashboard input[type="text"]:focus,

View File

@ -104,6 +104,7 @@ settings:
examples: Examples examples: Examples
globalSettings: Global Settings globalSettings: Global Settings
goTo: Go to goTo: Go to
language: Language
newPassword: Your new password newPassword: Your new password
newPasswordConfirm: Confirm your new password newPasswordConfirm: Confirm your new password
newUser: New User newUser: New User
@ -158,3 +159,7 @@ search:
type: Type and press enter to search. type: Type and press enter to search.
pressToSearch: Press enter to search. pressToSearch: Press enter to search.
pressToExecute: Press enter to execute. pressToExecute: Press enter to execute.
languages:
en: English
pt: Portuguese
zhCN: Chinese (Simplified)

View File

@ -2,16 +2,18 @@ import Vue from 'vue'
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import en from './en.yaml' import en from './en.yaml'
import pt from './pt.yaml' import pt from './pt.yaml'
import zhCN from './zh_cn.yaml' import zhCN from './zh-cn.yaml'
Vue.use(VueI18n) Vue.use(VueI18n)
export default new VueI18n({ const i18n = new VueI18n({
locale: 'pt', locale: 'en',
fallbackLocale: 'en', fallbackLocale: 'en',
messages: { messages: {
'en': en, 'en': en,
'pt': pt, 'pt': pt,
'zh_cn': zhCN 'zh-cn': zhCN
} }
}) })
export default i18n

View File

@ -104,6 +104,7 @@ settings:
examples: Exemplos examples: Exemplos
globalSettings: Configurações Globais globalSettings: Configurações Globais
goTo: Ir para goTo: Ir para
language: Linguagem
newPassword: Nova palavra-passe newPassword: Nova palavra-passe
newPasswordConfirm: Confirme a nova palavra-passe newPasswordConfirm: Confirme a nova palavra-passe
newUser: Novo Utilizador newUser: Novo Utilizador
@ -159,3 +160,7 @@ search:
type: Escreva e prima enter para pesquisar. type: Escreva e prima enter para pesquisar.
pressToSearch: Prima enter para pesquisar. pressToSearch: Prima enter para pesquisar.
pressToExecute: Prima enter para executar. pressToExecute: Prima enter para executar.
languages:
en: Inglês
pt: Português
zhCN: Chinês (Simplificado)

View File

@ -1,3 +1,5 @@
import i18n from '@/i18n'
const mutations = { const mutations = {
closeHovers: state => { closeHovers: state => {
state.show = null state.show = null
@ -22,7 +24,10 @@ const mutations = {
}, },
setLoading: (state, value) => { state.loading = value }, setLoading: (state, value) => { state.loading = value },
setReload: (state, value) => { state.reload = value }, setReload: (state, value) => { state.reload = value },
setUser: (state, value) => (state.user = value), setUser: (state, value) => {
i18n.locale = value.locale
state.user = value
},
setUserCSS: (state, value) => (state.user.css = value), setUserCSS: (state, value) => (state.user.css = value),
setJWT: (state, value) => (state.jwt = value), setJWT: (state, value) => (state.jwt = value),
multiple: (state, value) => (state.multiple = value), multiple: (state, value) => (state.multiple = value),