- Debug mode turned on: {{$store.state.debug}}
+ {{$t('debug.title')}}: {{$store.state.debug}}
-
Logged in as: {{$store.state.user.username}}
- User info: {{$store.state.user}}
- State dump: {{$store.state}}
- Authentication Token: {{$store.state.user.token}}
+
{{$t('debug.authUser')}}: {{$store.state.user.username}}
+ {{$t('debug.userState')}}: {{$store.state.user}}
+ {{$t('debug.state')}}: {{$store.state}}
+ {{$t('debug.token')}}: {{$store.state.user.token}}
-
Test authentication
-
Turn off
+
{{$t('debug.auth')}}
+
{{$t('debug.disable')}}
@@ -22,14 +22,14 @@ export default {
methods: {
turnOffDebug () {
this.$store.commit('turnOffDebug')
- this.$buefy.snackbar.open(`Debug mode disabled, you will no longer have access to development features until you refresh.`)
+ this.$buefy.snackbar.open({message:this.$t('errors.disableDebug'), type: 'is-warning'})
},
authTest () {
this.axios.get('/api/v1/userinfo/auth'
).then(() => {
- this.$buefy.snackbar.open(`You are authenticated correctly`)
+ this.$buefy.snackbar.open({message:this.$t('errors.authSuccess'), type: 'is-warning'})
}).catch(() => {
- this.$buefy.snackbar.open(`Request failed, you are not authenticated.`)
+ this.$buefy.snackbar.open({message:this.$t('errors.authFail'), type: 'is-warning'})
})
}
}
diff --git a/vue.config.js b/vue.config.js
index 3e8cdfa..5d272ff 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,13 +1,24 @@
const Dotenv = require('dotenv-webpack');
module.exports = {
- devServer: {
- proxy: 'http://localhost:23981'
- },
- publicPath: '/',
+ devServer: {
+ proxy: 'http://localhost:23981'
+ },
+
+ publicPath: '/',
productionSourceMap: false,
+
configureWebpack: {
plugins: [
new Dotenv()
]
+ },
+
+ pluginOptions: {
+ i18n: {
+ locale: 'en',
+ fallbackLocale: 'debug',
+ localeDir: 'locales',
+ enableInSFC: false
+ }
}
}
diff --git a/yarn.lock b/yarn.lock
index a82400d..eb17d59 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1043,6 +1043,14 @@
cssnano-preset-default "^4.0.0"
postcss "^7.0.0"
+"@intlify/vue-i18n-loader@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@intlify/vue-i18n-loader/-/vue-i18n-loader-1.0.0.tgz#4350a9b03fd62e7d7f44c7496d5509bff3229c79"
+ integrity sha512-y7LlpKEQ01u7Yq14l4VNlbFYEHMmSEH1QXXASOMWspj9ZcIdCebhhvHCHqk5Oy5Epw3PtoxyRJNpb6Wle5udgA==
+ dependencies:
+ js-yaml "^3.13.1"
+ json5 "^2.1.1"
+
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -3944,6 +3952,16 @@ cli-spinners@^2.0.0:
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047"
integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==
+cli-table3@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202"
+ integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==
+ dependencies:
+ object-assign "^4.1.0"
+ string-width "^2.1.1"
+ optionalDependencies:
+ colors "^1.1.2"
+
cli-truncate@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
@@ -4851,7 +4869,7 @@ deepmerge@^1.5.2:
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753"
integrity sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==
-deepmerge@^4.1.1, deepmerge@^4.2.2:
+deepmerge@^4.1.1, deepmerge@^4.2.0, deepmerge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
@@ -5078,6 +5096,14 @@ dot-case@^3.0.4:
no-case "^3.0.4"
tslib "^2.0.3"
+dot-object@^1.7.1:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/dot-object/-/dot-object-1.9.0.tgz#6e3d6d8379f794c5174599ddf05528f5990f076e"
+ integrity sha512-7MPN6y7XhAO4vM4eguj5+5HNKLjJYfkVG1ZR1Aput4Q4TR6SYeSjhpVQ77IzJHoSHffKbDxBC+48aCiiRurDPw==
+ dependencies:
+ commander "^2.20.0"
+ glob "^7.1.4"
+
dot-prop@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4"
@@ -5502,7 +5528,7 @@ eslint@^6.7.2:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-esm@^3.2.25:
+esm@^3.2.13, esm@^3.2.25:
version "3.2.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
@@ -6066,6 +6092,11 @@ flat-cache@^2.0.1:
rimraf "2.6.3"
write "1.0.3"
+flat@^5.0.0:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
+ integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
+
flatted@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
@@ -7675,6 +7706,11 @@ is-utf8@^0.2.0:
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
+is-valid-glob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
+ integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=
+
is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@@ -7887,7 +7923,7 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
-json5@^2.1.2:
+json5@^2.1.1, json5@^2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
@@ -12534,6 +12570,20 @@ vue-cli-plugin-apollo@^0.21.3:
subscriptions-transport-ws "^0.9.16"
ts-node "^8.4.1"
+vue-cli-plugin-i18n@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-1.0.1.tgz#5a3077de5d62c9b4068e486db1fc97fce9fa0072"
+ integrity sha512-sLo6YzudaWgn5dOMvrKixE5bb/onYGxcxm+0YexqoOx0QtR+7hZ/P5WPFBMM9v/2i1ec2YYe2PvKTBel7KE+tA==
+ dependencies:
+ debug "^4.1.0"
+ deepmerge "^4.2.0"
+ dotenv "^8.2.0"
+ flat "^5.0.0"
+ rimraf "^3.0.0"
+ vue "^2.6.11"
+ vue-i18n "^8.17.0"
+ vue-i18n-extract "1.0.2"
+
vue-codemod@^0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vue-codemod/-/vue-codemod-0.0.4.tgz#ebb23675e8f35dabaad028e1fe2dd4b5eb776c75"
@@ -12567,6 +12617,23 @@ vue-hot-reload-api@^2.3.0:
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
+vue-i18n-extract@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/vue-i18n-extract/-/vue-i18n-extract-1.0.2.tgz#0a136e12d1634d6799e187aad81a7003d02f67a5"
+ integrity sha512-+zwDKvle4KcfloXZnj5hF01ViKDiFr5RMx5507D7oyDXpSleRpekF5YHgZa/+Ra6Go68//z0Nya58J9tKFsCjw==
+ dependencies:
+ cli-table3 "^0.5.1"
+ dot-object "^1.7.1"
+ esm "^3.2.13"
+ glob "^7.1.3"
+ is-valid-glob "^1.0.0"
+ yargs "^13.2.2"
+
+vue-i18n@^8.17.0, vue-i18n@^8.17.3:
+ version "8.22.3"
+ resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.22.3.tgz#4ac0fdc3e71d4fe188938c40a9ffca32cde60732"
+ integrity sha512-Vhyx7sZEmmW/aZLkzSlXei08Rv3hTondx4J9wbOjnThocTIK1QiXV6QRdT4BTnhT24JixDSf6kGkxqCXSaJ3Jw==
+
vue-keypress@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/vue-keypress/-/vue-keypress-2.1.1.tgz#b766ab52c052b28e9ea1a732a5fde0432c45c76c"
@@ -13053,7 +13120,7 @@ yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
-yargs@^13.3.2:
+yargs@^13.2.2, yargs@^13.3.2:
version "13.3.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==