From d86a6275b6ecd3ef6a39c027dc8bfc90b7684d9d Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Tue, 25 Apr 2023 15:37:07 +0200 Subject: [PATCH] Add i18n text --- src/components/RegisterUserForm.vue | 13 +++---------- src/locales/en.json | 5 ++++- src/locales/nb.json | 5 ++++- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/RegisterUserForm.vue b/src/components/RegisterUserForm.vue index c65ba96..555d202 100644 --- a/src/components/RegisterUserForm.vue +++ b/src/components/RegisterUserForm.vue @@ -65,15 +65,11 @@ <div v-if="step==2"> <h2>{{ $t("registeruser.button.label") }}</h2> - <p>Your user information was successfully submitted.</p> - <p> - To be able to log in, you need to confirm your email. VIPS (noreply@logic.vips.nibio.no) has sent an email to the mail - address that you provided. Please check your inbox and all spam folders/filters, and reply accordingly. - After that, press the login button to start using the app. - </p> + <p>{{ $t("registeruserform.step_2.heading") }}</p> + <p>{{ $t("registeruserform.step_2.description") }}</p> <div class="form-group form-check"> <input type="checkbox" class="form-check-input" v-model="emailIsConfirmed" id="emailIsConfirmed"> - <label class="form-check-label" for="emailIsConfirmed">Yes, I have confirmed my email</label> + <label class="form-check-label" for="emailIsConfirmed">{{ $t("registeruserform.step_2.emailConfirmationDeclaration") }}</label> </div> <button type="submit" :disabled="!emailIsConfirmed" class="btn btn-primary" @click="autoLogin();">{{ $t("login.button.label") }}</button> </div> @@ -82,7 +78,6 @@ <script> import CommonUtil from '@/components/CommonUtil'; -import JsonpTemplatePlugin from 'webpack/lib/JsonpTemplatePlugin'; export default { name: 'RegisterUserForm', @@ -177,9 +172,7 @@ import JsonpTemplatePlugin from 'webpack/lib/JsonpTemplatePlugin'; // Show message about confirming email // Show button for auto login - console.info(data); this.step = 2; - }, autoLogin: function() { this.$root.$emit("autoLogin", {"username":this.username, "password":this.password}); diff --git a/src/locales/en.json b/src/locales/en.json index 616f2fb..d635af3 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -72,7 +72,7 @@ "about.version": "Version", "about.text": "<p>The app is developed by <a href='#' onclick=\"cordova.InAppBrowser.open('https://nibio.no/en', '_system')\">NIBIO</a>'s <a href='#' onclick=\"cordova.InAppBrowser.open('https://www.vips-landbruk.no/', '_system')\">VIPS</a> team.</p><p>VIPS project leader: <a href='#' onclick=\"cordova.InAppBrowser.open('https://www.nibio.no/ansatte/berit-nordskog', '_system')\">Berit Nordskog</a></p><p>© 2022 <a href='#' onclick=\"cordova.InAppBrowser.open('https://nibio.no/en', '_system')\">NIBIO</a></p>", "registeruser.button.label": "Register new user", - "registeruserform.description": "TODO: Write a description", + "registeruserform.description": "After user creation, you can add field observations in VIPS, but they will not be automatically approved. That can only happen after an administrator has reviewed and approved your user account. This normally happens within 1-3 work days. You'll get a confirmation on your email address.", "registeruserform.firstName": "First name", "registeruserform.lastName": "Last name", "registeruserform.email": "Email", @@ -84,5 +84,8 @@ "registeruserform.password.help": "Passwords are stored in encrypted form for your safety", "registeruserform.password2.help": "Please repeat the password", "registeruserform.submit.label": "Registrer bruker", + "registeruserform.step_2.heading": "Your user information was successfully submitted.", + "registeruserform.step_2.description": "To be able to log in, you need to confirm your email. VIPS (noreply@logic.vips.nibio.no) has sent an email to the mail address that you provided. Please check your inbox and all spam folders and filters, and reply accordingly. After that, press the login button to start using the app.", + "registeruserform.step_2.emailConfirmationDeclaration": "Yes, I have confirmed my email", "copy" : "Copy" } \ No newline at end of file diff --git a/src/locales/nb.json b/src/locales/nb.json index f569894..9709e99 100644 --- a/src/locales/nb.json +++ b/src/locales/nb.json @@ -72,7 +72,7 @@ "about.version": "Versjon", "about.text": "<p>Appen er utviklet av <a href='#' onclick=\"cordova.InAppBrowser.open('https://nibio.no/', '_system')\">NIBIO</a>s <a href='#' onclick=\"cordova.InAppBrowser.open('https://www.vips-landbruk.no/', '_system')\">VIPS-team</a>.</p><p>Prosjektleder for VIPS: <a href='#' onclick=\"cordova.InAppBrowser.open('https://www.nibio.no/ansatte/berit-nordskog', '_system')\">Berit Nordskog</a></p><p>© 2022 <a href='#' onclick=\"cordova.InAppBrowser.open('https://nibio.no/', '_system')\">NIBIO</a></p>", "registeruser.button.label": "Registrer ny bruker", - "registeruserform.description": "TODO: Skriv en god forklaring", + "registeruserform.description": "Etter at brukeren er opprettet kan du registrere observasjoner i VIPS, men de blir ikke automatisk godkjent. Det skjer først etter at en administrator godkjenner brukeren. Dette skjer normalt innen 1-3 virkedager, og du blir informert pr. e-post om dette.", "registeruserform.firstName": "Fornavn", "registeruserform.lastName": "Etternavn", "registeruserform.email": "E-post", @@ -84,5 +84,8 @@ "registeruserform.password.help": "Passordet lagres i kryptert form", "registeruserform.password2.help": "Vennligst gjenta passordet for sikkerhets skyld", "registeruserform.submit.label": "Registrer bruker", + "registeruserform.step_2.heading": "Din brukerinformasjon ble registrert.", + "registeruserform.step_2.description": "For å kunne logge deg inn, må du bekrefte din e-postadresse. VIPS (noreply@logic.vips.nibio.no) har sendt en e-post til din oppgitte e-postadresse. Vennligst sjekk din innboks og alle spamfiltre, og svar på e-posten ihht instruksjonene. Etter dette kan du klikke på login-knappen nedenfor for å starte å bruke appen.", + "registeruserform.step_2.emailConfirmationDeclaration": "Ja, jeg har bekreftet min e-postadresse", "copy" : "Kopi" } \ No newline at end of file -- GitLab