mirror of https://github.com/Lissy93/dashy.git
Adding Guest translations
This commit is contained in:
parent
2f3cc1c354
commit
db017c0888
|
@ -12,6 +12,7 @@
|
|||
},
|
||||
"login": {
|
||||
"title": "Dashy",
|
||||
"guest-label": "Guest Access",
|
||||
"username-label": "Username",
|
||||
"password-label": "Password",
|
||||
"login-button": "Login",
|
||||
|
@ -31,7 +32,14 @@
|
|||
"already-logged-in-text": "You're logged in as",
|
||||
"proceed-to-dashboard": "Proceed to Dashboard",
|
||||
"log-out-button": "Logout",
|
||||
"proceed-guest-button": "Proceed as Guest"
|
||||
"proceed-guest-button": "Proceed as Guest",
|
||||
"guest-intro-1": "This instance has guest access enabled.",
|
||||
"guest-intro-2": "Guests have view-only access to dashboards, so cannot write any changes to disk.",
|
||||
"error": "Error",
|
||||
"error-no-user-configured": "Authentication is not enabled, or no users have been configured",
|
||||
"error-go-home-button": "Go Home",
|
||||
"logged-in-guest": "Logged in as Guest, Redirecting...",
|
||||
"error-guest-access": "Guest Access Not Allowed"
|
||||
},
|
||||
"config": {
|
||||
"main-tab": "Main Menu",
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
},
|
||||
"login": {
|
||||
"title": "Dashy",
|
||||
"guest-label": "Accès invité",
|
||||
"username-label": "Nom d'utilisateur",
|
||||
"password-label": "Mot de passe",
|
||||
"login-button": "Connexion",
|
||||
|
@ -30,7 +31,14 @@
|
|||
"already-logged-in-text": "Vous êtes connecté en tant que",
|
||||
"proceed-to-dashboard": "Accéder au Tableau de bord",
|
||||
"log-out-button": "Déconnexion",
|
||||
"proceed-guest-button": "Continuer en tant qu'invité"
|
||||
"proceed-guest-button": "Continuer en tant qu'invité",
|
||||
"guest-intro-1": "L'accès invité est activé pour cette instance.",
|
||||
"guest-intro-2": "Les invités n'ont qu'un accès en mode lecture aux tableaux de bord, et ne peuvent donc pas écrire de modifications sur le disque.",
|
||||
"error": "Erreur",
|
||||
"error-no-user-configured": "L'authentification n'est pas activée ou aucun utilisateur n'a été configuré.",
|
||||
"error-go-home-button": "Retour à l'accueil",
|
||||
"logged-in-guest": "Connecté en tant qu'invité, redirection...",
|
||||
"error-guest-access": "L'accès invité n'est pas autorisé"
|
||||
},
|
||||
"config": {
|
||||
"main-tab": "Menu principal",
|
||||
|
|
|
@ -51,22 +51,21 @@
|
|||
<!-- Guest login form -->
|
||||
<form class="guest-form"
|
||||
v-if="isGuestAccessEnabled && !isUserAlreadyLoggedIn && isAuthenticationEnabled">
|
||||
<h2 class="login-title">Guest Access</h2>
|
||||
<h2 class="login-title">{{ $t('login.guest-label') }}</h2>
|
||||
<Button class="login-button" :click="guestLogin">
|
||||
{{ $t('login.proceed-guest-button') }}
|
||||
</Button>
|
||||
<p class="guest-intro">
|
||||
This instance has guest access enabled.<br>
|
||||
Guests have view-only access to dashboards,
|
||||
so cannot write any changes to disk.
|
||||
{{ $t('login.guest-intro-1') }}<br>
|
||||
{{ $t('login.guest-intro-2') }}
|
||||
</p>
|
||||
</form>
|
||||
<!-- Edge case - guest mode enabled, but no users configured -->
|
||||
<div class="not-configured" v-if="!isAuthenticationEnabled">
|
||||
<h2>Error</h2>
|
||||
<p>Authentication is not enabled, or no users have been configured</p>
|
||||
<h2>{{ $t('login.error') }}</h2>
|
||||
<p>{{ $t('login.error-no-user-configured') }}</p>
|
||||
<Button class="login-button" :click="guestLogin">
|
||||
Go Home
|
||||
{{ $t('login.error-go-home-button') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -169,11 +168,11 @@ export default {
|
|||
guestLogin() {
|
||||
const isAllowed = this.isGuestAccessEnabled;
|
||||
if (isAllowed) {
|
||||
this.$toasted.show('Logged in as Guest, Redirecting...', { className: 'toast-success' });
|
||||
this.$toasted.show(this.$t('login.logged-in-guest'), { className: 'toast-success' });
|
||||
InfoHandler('Logged in as Guest', InfoKeys.AUTH);
|
||||
this.goHome();
|
||||
} else {
|
||||
this.$toasted.show('Guest Access Not Allowed', { className: 'toast-error' });
|
||||
this.$toasted.show(this.$t('login.error-guest-access'), { className: 'toast-error' });
|
||||
WarningInfoHandler('Guest Access Not Allowed', InfoKeys.AUTH);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue