fix(i18n): fix translation issues

This commit is contained in:
MrTimscampi 2020-09-05 23:45:42 +02:00
parent 20e871b4bf
commit 08ec7efe41
4 changed files with 13 additions and 9 deletions

View File

@ -18,7 +18,7 @@
v-model="login.username"
outlined
label="Username"
:rules="[(v) => !!v || 'Username is required']"
:rules="[(v) => !!v || $t('usernameRequired')]"
required
></v-text-field>
<v-text-field
@ -89,7 +89,7 @@ export default Vue.extend({
if (!error.response) {
errorMessage = this.$t('serverNotFound');
} else if (error.response.status === 500) {
errorMessage = this.$t('incorrectPassword');
errorMessage = this.$t('incorrectUsernameOrPassword');
} else if (error.response.status === 400) {
errorMessage = this.$t('badRequest');
}

View File

@ -1,13 +1,15 @@
{
"badRequest": "Bad Request. Try Again",
"badRequest": "Bad request. Try again",
"home": "Home",
"incorrectPassword": "Incorrect Password",
"incorrectUsernameOrPassword": "Incorrect username or password",
"login": "Login",
"logout": "Logout",
"more": "More",
"play": "Play",
"serverAddressMustBeUrl": "Server address must be a valid URL",
"serverAddressRequired": "Server address is required",
"serverNotFound": "Server Not Found",
"serverNotFound": "Server not found",
"settings": "Settings",
"unexpectedError": "Unexpected Error"
"unexpectedError": "Unexpected error",
"usernameRequired": "Username is required"
}

View File

@ -1,7 +1,8 @@
{
"badRequest": "Mauvaise requête. Réessayez",
"home": "Accueil",
"incorrectPassword": "Mot de passe incorrect",
"incorrectUsernameOrPassword": "Nom d'utilisateur ou mot de passe incorrect",
"login": "Connexion",
"logout": "Se déconnecter",
"more": "Plus",
"play": "Lire",
@ -9,5 +10,6 @@
"serverAddressRequired": "L'adresse du serveur est requise",
"serverNotFound": "Serveur introuvable",
"settings": "Paramètres",
"unexpectedError": "Erreur inattendue"
"unexpectedError": "Erreur inattendue",
"usernameRequired": "Nom d'utilisateur requis"
}

View File

@ -2,7 +2,7 @@
<v-container fill-height>
<v-row align="center" justify="center">
<v-col md="4">
<h1 class="text-h4 mb-6 text-center">Login</h1>
<h1 class="text-h4 mb-6 text-center">{{ $t('login') }}</h1>
<login-form />
</v-col>
</v-row>