Cleaned up locales for settings and adjusted texts in files

This commit is contained in:
ogerly 2021-09-27 15:35:17 +02:00
parent 9211f52d7f
commit 4dec84321a
18 changed files with 96 additions and 118 deletions

View File

@ -14,9 +14,9 @@ export default {
return { return {
selected: null, selected: null,
options: [ options: [
{ value: null, text: this.$t('select_language') }, { value: null, text: this.$t('setting.language.select_language') },
{ value: 'de', text: this.$t('languages.de') }, { value: 'de', text: this.$t('setting.language.de') },
{ value: 'en', text: this.$t('languages.en') }, { value: 'en', text: this.$t('setting.language.en') },
], ],
} }
}, },

View File

@ -45,21 +45,14 @@
"amount": "Betrag", "amount": "Betrag",
"at": "am", "at": "am",
"cancel": "Abbrechen", "cancel": "Abbrechen",
"change": "ändern",
"change-name": "Name ändern",
"change-password": "Passwort ändern",
"changeLanguage": "Sprache ändern",
"change_username_info": "Einmal gespeichert, kann der Username ncht mehr geändert werden!",
"close": "schließen", "close": "schließen",
"date": "Datum", "date": "Datum",
"description": "Beschreibung", "description": "Beschreibung",
"edit": "bearbeiten", "edit": "bearbeiten",
"email": "E-Mail", "email": "E-Mail",
"email_repeat": "eMail wiederholen",
"firstname": "Vorname", "firstname": "Vorname",
"from": "von", "from": "von",
"lastname": "Nachname", "lastname": "Nachname",
"max_gdd_info": "Maximale anzahl GDD zum versenden erreicht!",
"memo": "Nachricht", "memo": "Nachricht",
"message": "Nachricht", "message": "Nachricht",
"password": "Passwort", "password": "Passwort",
@ -81,12 +74,9 @@
"time": "Zeit", "time": "Zeit",
"to": "bis", "to": "bis",
"to1": "an", "to1": "an",
"username": "Username",
"validation": { "validation": {
"gddSendAmount": "Das Feld {_field_} muss eine Zahl zwischen {min} und {max} mit höchstens zwei Nachkommastellen sein", "gddSendAmount": "Das Feld {_field_} muss eine Zahl zwischen {min} und {max} mit höchstens zwei Nachkommastellen sein",
"is-not": "Du kannst dir selbst keine Gradidos überweisen", "is-not": "Du kannst dir selbst keine Gradidos überweisen"
"usernmae-regex": "Der Username muss mit einem Buchstaben beginnen auf den mindestens zwei alfanumerische Zeichen folgen müssen.",
"usernmae-unique": "Der Username ist bereits vergeben."
} }
}, },
"gdt": { "gdt": {
@ -106,29 +96,40 @@
}, },
"imprint": "Impressum", "imprint": "Impressum",
"language": "Sprache", "language": "Sprache",
"languages": {
"de": "Deutsch",
"en": "English",
"success": "Deine Sprache wurde erfolgreich geändert."
},
"login": "Anmeldung", "login": "Anmeldung",
"logout": "Abmelden", "logout": "Abmelden",
"members_area": "Mitgliederbereich", "members_area": "Mitgliederbereich",
"message": "hallo gradido !!", "message": "hallo gradido !!",
"privacy_policy": "Datenschutzerklärung", "privacy_policy": "Datenschutzerklärung",
"reset": "Passwort zurücksetzen",
"reset-password": {
"not-authenticated": "Leider konnten wir dich nicht authentifizieren. Bitte wende dich an den Support.",
"text": "Jetzt kannst du ein neues Passwort speichern, mit dem du dich zukünftig in der Gradido-App anmelden kannst.",
"title": "Passwort zurücksetzen"
},
"select_language": "Bitte wähle eine Sprache für die App und Newsletter",
"send": "Senden", "send": "Senden",
"setting": { "setting": {
"changeNewsletter": "Newsletter Status ändern", "language": {
"newsletter": "Newsletter", "changeLanguage": "Sprache ändern",
"newsletterFalse": "Du bist aus Newslettersystem ausgetragen.", "de": "Deutsch",
"newsletterTrue": "Du bist im Newslettersystem eingetraten." "en": "English",
"select_language": "Bitte wähle eine Sprache.",
"success": "Deine Sprache wurde erfolgreich geändert."
},
"name": {
"change-name": "Name ändern",
"change-success": "Dein Name wurde erfolgreich geändert."
},
"newsletter": {
"newsletter": "Newsletter",
"newsletterFalse": "Du bist aus Newslettersystem ausgetragen.",
"newsletterTrue": "Du bist im Newslettersystem eingetraten."
},
"password": {
"change-password": "Passwort ändern",
"forgot_pwd": "Passwort vergessen?",
"reset": "Passwort zurücksetzen",
"reset-password": {
"not-authenticated": "Leider konnten wir dich nicht authentifizieren. Bitte wende dich an den Support.",
"text": "Jetzt kannst du ein neues Passwort speichern, mit dem du dich zukünftig in der Gradido-App anmelden kannst."
},
"send_now": "Jetzt senden",
"subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen."
}
}, },
"signup": "Registrieren", "signup": "Registrieren",
"site": { "site": {
@ -143,28 +144,13 @@
}, },
"login": { "login": {
"community": "Tausend Dank, weil du bei uns bist!", "community": "Tausend Dank, weil du bei uns bist!",
"forgot_pwd": "Passwort vergessen?",
"new_wallet": "Neues Konto erstellen", "new_wallet": "Neues Konto erstellen",
"remember": "Passwort merken",
"signin": "Anmelden" "signin": "Anmelden"
}, },
"navbar": { "navbar": {
"activity": "Aktivität",
"my-profil": "Mein Profil", "my-profil": "Mein Profil",
"settings": "Einstellungen",
"support": "Support" "support": "Support"
}, },
"overview": {
"account_overview": "Kontoübersicht",
"add_work": "neuer Gemeinschaftsbeitrag",
"send_gradido": "Gradido versenden",
"since_last_month": "seid letzten Monat"
},
"password": {
"send_now": "Jetzt senden",
"subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen.",
"title": "Passwort zurücksetzen"
},
"signup": { "signup": {
"agree": "Ich stimme der <a href='https://gradido.net/de/datenschutz/' target='_blank' >Datenschutzerklärung</a> zu.", "agree": "Ich stimme der <a href='https://gradido.net/de/datenschutz/' target='_blank' >Datenschutzerklärung</a> zu.",
"dont_match": "Die Passwörter stimmen nicht überein.", "dont_match": "Die Passwörter stimmen nicht überein.",
@ -192,6 +178,5 @@
"show_all": "Alle <strong>{count}</strong> Transaktionen ansehen" "show_all": "Alle <strong>{count}</strong> Transaktionen ansehen"
}, },
"transactions": "Transaktionen", "transactions": "Transaktionen",
"welcome": "Willkommen!",
"whitepaper": "Whitepaper" "whitepaper": "Whitepaper"
} }

View File

@ -45,21 +45,14 @@
"amount": "Amount", "amount": "Amount",
"at": "at", "at": "at",
"cancel": "Cancel", "cancel": "Cancel",
"change": "change",
"change-name": "Change name",
"change-password": "Change password",
"changeLanguage": "Change language",
"change_username_info": "Once saved, the username cannot be changed again!",
"close": "Close", "close": "Close",
"date": "Date", "date": "Date",
"description": "Description", "description": "Description",
"edit": "Edit", "edit": "Edit",
"email": "Email", "email": "Email",
"email_repeat": "Repeat Email",
"firstname": "Firstname", "firstname": "Firstname",
"from": "from", "from": "from",
"lastname": "Lastname", "lastname": "Lastname",
"max_gdd_info": "Maximum number of GDDs to be sent has been reached!",
"memo": "Message", "memo": "Message",
"message": "Message", "message": "Message",
"password": "Password", "password": "Password",
@ -81,12 +74,9 @@
"time": "Time", "time": "Time",
"to": "to", "to": "to",
"to1": "to", "to1": "to",
"username": "Username",
"validation": { "validation": {
"gddSendAmount": "The {_field_} field must be a number between {min} and {max} with at most two digits", "gddSendAmount": "The {_field_} field must be a number between {min} and {max} with at most two digits",
"is-not": "You cannot send Gradidos to yourself", "is-not": "You cannot send Gradidos to yourself"
"usernmae-regex": "The username must start with a letter, followed by at least two alphanumeric characters.",
"usernmae-unique": "The username is already taken."
} }
}, },
"gdt": { "gdt": {
@ -106,29 +96,40 @@
}, },
"imprint": "Legal notice", "imprint": "Legal notice",
"language": "Language", "language": "Language",
"languages": {
"de": "Deutsch",
"en": "English",
"success": "Your language has been successfully updated."
},
"login": "Login", "login": "Login",
"logout": "Logout", "logout": "Logout",
"members_area": "Member's area", "members_area": "Member's area",
"message": "hello gradido !!", "message": "hello gradido !!",
"privacy_policy": "Privacy policy", "privacy_policy": "Privacy policy",
"reset": "Reset password",
"reset-password": {
"not-authenticated": "Unfortunately we could not authenticate you. Please contact the support.",
"text": "Now you can save a new password to login to the Gradido-App in the future.",
"title": "Reset Password"
},
"select_language": "Please choose a language for the app and newsletter",
"send": "Send", "send": "Send",
"setting": { "setting": {
"changeNewsletter": "Newsletter status change", "language": {
"newsletter": "Newsletter", "changeLanguage": "Change language",
"newsletterFalse": "You are unsubscribed from newsletter system.", "de": "Deutsch",
"newsletterTrue": "You are subscribed to newsletter system." "en": "English",
"select_language": "Please choose a language.",
"success": "Your language has been successfully updated."
},
"name": {
"change-name": "Change name",
"change-success": "Your name has been successfully changed."
},
"newsletter": {
"newsletter": "Newsletter",
"newsletterFalse": "You are unsubscribed from newsletter system.",
"newsletterTrue": "You are subscribed to newsletter system."
},
"password": {
"change-password": "Change password",
"forgot_pwd": "Forgot password?",
"reset": "Reset password",
"reset-password": {
"not-authenticated": "Unfortunately we could not authenticate you. Please contact the support.",
"text": "Now you can save a new password to login to the Gradido-App in the future."
},
"send_now": "Send now",
"subtitle": "If you have forgotten your password, you can reset it here."
}
}, },
"signup": "Sign up", "signup": "Sign up",
"site": { "site": {
@ -143,28 +144,13 @@
}, },
"login": { "login": {
"community": "A thousand thanks for being with us!", "community": "A thousand thanks for being with us!",
"forgot_pwd": "Forgot password?",
"new_wallet": "Create new account", "new_wallet": "Create new account",
"remember": "Remember password",
"signin": "Sign in" "signin": "Sign in"
}, },
"navbar": { "navbar": {
"activity": "Activity",
"my-profil": "My profile", "my-profil": "My profile",
"settings": "Settings",
"support": "Support" "support": "Support"
}, },
"overview": {
"account_overview": "Account overview",
"add_work": "New Community Contribution",
"send_gradido": "Send Gradido",
"since_last_month": "since last month"
},
"password": {
"send_now": "Send now",
"subtitle": "If you have forgotten your password, you can reset it here.",
"title": "Reset password"
},
"signup": { "signup": {
"agree": "I agree to the <a href='https://gradido.net/en/datenschutz/' target='_blank' > privacy policy</a>.", "agree": "I agree to the <a href='https://gradido.net/en/datenschutz/' target='_blank' > privacy policy</a>.",
"dont_match": "Passwords don't match.", "dont_match": "Passwords don't match.",
@ -192,6 +178,5 @@
"show_all": "View all <strong>{count}</strong> transactions." "show_all": "View all <strong>{count}</strong> transactions."
}, },
"transactions": "Transactions", "transactions": "Transactions",
"welcome": "Welcome!",
"whitepaper": "Whitepaper" "whitepaper": "Whitepaper"
} }

View File

@ -39,11 +39,11 @@ describe('ForgotPassword', () => {
}) })
it('has a title', () => { it('has a title', () => {
expect(wrapper.find('h1').text()).toEqual('site.password.title') expect(wrapper.find('h1').text()).toEqual('setting.password.reset')
}) })
it('has a subtitle', () => { it('has a subtitle', () => {
expect(wrapper.find('p.text-lead').text()).toEqual('site.password.subtitle') expect(wrapper.find('p.text-lead').text()).toEqual('setting.password.subtitle')
}) })
describe('back button', () => { describe('back button', () => {

View File

@ -5,8 +5,8 @@
<div class="header-body text-center mb-7"> <div class="header-body text-center mb-7">
<b-row class="justify-content-center"> <b-row class="justify-content-center">
<b-col xl="5" lg="6" md="8" class="px-2"> <b-col xl="5" lg="6" md="8" class="px-2">
<h1>{{ $t('site.password.title') }}</h1> <h1>{{ $t('setting.password.reset') }}</h1>
<p class="text-lead">{{ $t('site.password.subtitle') }}</p> <p class="text-lead">{{ $t('setting.password.subtitle') }}</p>
</b-col> </b-col>
</b-row> </b-row>
</div> </div>
@ -22,7 +22,7 @@
<input-email v-model="form.email"></input-email> <input-email v-model="form.email"></input-email>
<div class="text-center"> <div class="text-center">
<b-button type="submit" variant="primary"> <b-button type="submit" variant="primary">
{{ $t('site.password.send_now') }} {{ $t('setting.password.send_now') }}
</b-button> </b-button>
</div> </div>
</b-form> </b-form>

View File

@ -71,7 +71,7 @@ describe('Login', () => {
describe('links', () => { describe('links', () => {
it('has a link "Forgot Password?"', () => { it('has a link "Forgot Password?"', () => {
expect(wrapper.findAllComponents(RouterLinkStub).at(0).text()).toEqual( expect(wrapper.findAllComponents(RouterLinkStub).at(0).text()).toEqual(
'site.login.forgot_pwd', 'setting.password.forgot_pwd',
) )
}) })

View File

@ -40,7 +40,7 @@
<b-row class="mt-3"> <b-row class="mt-3">
<b-col cols="6"> <b-col cols="6">
<router-link to="/password"> <router-link to="/password">
{{ $t('site.login.forgot_pwd') }} {{ $t('setting.password.forgot_pwd') }}
</router-link> </router-link>
</b-col> </b-col>
<b-col cols="6" class="text-right" v-show="allowRegister"> <b-col cols="6" class="text-right" v-show="allowRegister">

View File

@ -71,8 +71,10 @@ describe('ResetPassword', () => {
}) })
it('has a message suggesting to contact the support', () => { it('has a message suggesting to contact the support', () => {
expect(wrapper.find('div.header').text()).toContain('reset-password.title') expect(wrapper.find('div.header').text()).toContain('setting.password.reset')
expect(wrapper.find('div.header').text()).toContain('reset-password.not-authenticated') expect(wrapper.find('div.header').text()).toContain(
'setting.password.reset-password.not-authenticated',
)
}) })
}) })
@ -99,8 +101,10 @@ describe('ResetPassword', () => {
describe('Register header', () => { describe('Register header', () => {
it('has a welcome message', async () => { it('has a welcome message', async () => {
expect(wrapper.find('div.header').text()).toContain('reset-password.title') expect(wrapper.find('div.header').text()).toContain('setting.password.reset')
expect(wrapper.find('div.header').text()).toContain('reset-password.text') expect(wrapper.find('div.header').text()).toContain(
'setting.password.reset-password.text',
)
}) })
}) })

View File

@ -5,13 +5,13 @@
<div class="header-body text-center mb-7"> <div class="header-body text-center mb-7">
<b-row class="justify-content-center"> <b-row class="justify-content-center">
<b-col xl="5" lg="6" md="8" class="px-2"> <b-col xl="5" lg="6" md="8" class="px-2">
<h1>{{ $t('reset-password.title') }}</h1> <h1>{{ $t('setting.password.reset') }}</h1>
<div class="pb-4" v-if="!pending"> <div class="pb-4" v-if="!pending">
<span v-if="authenticated"> <span v-if="authenticated">
{{ $t('reset-password.text') }} {{ $t('setting.password.reset-password.text') }}
</span> </span>
<span v-else> <span v-else>
{{ $t('reset-password.not-authenticated') }} {{ $t('setting.password.reset-password.not-authenticated') }}
</span> </span>
</div> </div>
</b-col> </b-col>
@ -29,7 +29,7 @@
<input-password-confirmation v-model="form" :register="register" /> <input-password-confirmation v-model="form" :register="register" />
<div class="text-center"> <div class="text-center">
<b-button type="submit" variant="primary" class="mt-4"> <b-button type="submit" variant="primary" class="mt-4">
{{ $t('reset') }} {{ $t('setting.password.reset') }}
</b-button> </b-button>
</div> </div>
</b-form> </b-form>

View File

@ -139,7 +139,7 @@ describe('UserCard_FormUserData', () => {
}) })
it('toasts a success message', () => { it('toasts a success message', () => {
expect(toastSuccessMock).toBeCalledWith('site.profil.user-data.change-success') expect(toastSuccessMock).toBeCalledWith('setting.name.change-success')
}) })
it('has an edit button again', () => { it('has an edit button again', () => {

View File

@ -4,7 +4,7 @@
<b-row class="mb-4 text-right"> <b-row class="mb-4 text-right">
<b-col class="text-right"> <b-col class="text-right">
<a @click="showUserData ? (showUserData = !showUserData) : cancelEdit()"> <a @click="showUserData ? (showUserData = !showUserData) : cancelEdit()">
<span class="pointer mr-3">{{ $t('form.change-name') }}</span> <span class="pointer mr-3">{{ $t('setting.name.change-name') }}</span>
<b-icon v-if="showUserData" class="pointer ml-3" icon="pencil"></b-icon> <b-icon v-if="showUserData" class="pointer ml-3" icon="pencil"></b-icon>
<b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon> <b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon>
</a> </a>
@ -122,7 +122,7 @@ export default {
this.$store.commit('lastName', this.form.lastName) this.$store.commit('lastName', this.form.lastName)
this.$store.commit('description', this.form.description) this.$store.commit('description', this.form.description)
this.showUserData = true this.showUserData = true
this.$toasted.success(this.$t('site.profil.user-data.change-success')) this.$toasted.success(this.$t('setting.name.change-success'))
}) })
.catch((error) => { .catch((error) => {
this.$toasted.error(error.message) this.$toasted.error(error.message)

View File

@ -47,7 +47,7 @@ describe('UserCard_FormUserPasswort', () => {
}) })
it('has a change password button with text "form.change-password"', () => { it('has a change password button with text "form.change-password"', () => {
expect(wrapper.find('a').text()).toEqual('form.change-password') expect(wrapper.find('a').text()).toEqual('setting.password.change-password')
}) })
it('has a change password button with a pencil icon', () => { it('has a change password button with a pencil icon', () => {

View File

@ -4,7 +4,7 @@
<b-row class="mb-4 text-right"> <b-row class="mb-4 text-right">
<b-col class="text-right"> <b-col class="text-right">
<a @click="showPassword ? (showPassword = !showPassword) : cancelEdit()"> <a @click="showPassword ? (showPassword = !showPassword) : cancelEdit()">
<span class="pointer mr-3">{{ $t('form.change-password') }}</span> <span class="pointer mr-3">{{ $t('setting.password.change-password') }}</span>
<b-icon v-if="showPassword" class="pointer ml-3" icon="pencil"></b-icon> <b-icon v-if="showPassword" class="pointer ml-3" icon="pencil"></b-icon>
<b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon> <b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon>
</a> </a>

View File

@ -125,7 +125,7 @@ describe('UserCard_FormUsername', () => {
}) })
it('toasts an success message', () => { it('toasts an success message', () => {
expect(toastSuccessMock).toBeCalledWith('site.profil.user-data.change-success') expect(toastSuccessMock).toBeCalledWith('setting.name.change-success')
}) })
it('has no edit button anymore', () => { it('has no edit button anymore', () => {

View File

@ -98,7 +98,7 @@ export default {
this.$store.commit('username', this.form.username) this.$store.commit('username', this.form.username)
this.username = this.form.username this.username = this.form.username
this.showUsername = true this.showUsername = true
this.$toasted.success(this.$t('site.profil.user-data.change-success')) this.$toasted.success(this.$t('setting.name.change-success'))
}) })
.catch((error) => { .catch((error) => {
this.$toasted.error(error.message) this.$toasted.error(error.message)

View File

@ -4,7 +4,7 @@
<b-row class="mb-4 text-right"> <b-row class="mb-4 text-right">
<b-col class="text-right"> <b-col class="text-right">
<a @click="showLanguage ? (showLanguage = !showLanguage) : cancelEdit()"> <a @click="showLanguage ? (showLanguage = !showLanguage) : cancelEdit()">
<span class="pointer mr-3">{{ $t('form.changeLanguage') }}</span> <span class="pointer mr-3">{{ $t('setting.language.changeLanguage') }}</span>
<b-icon v-if="showLanguage" class="pointer ml-3" icon="pencil"></b-icon> <b-icon v-if="showLanguage" class="pointer ml-3" icon="pencil"></b-icon>
<b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon> <b-icon v-else icon="x-circle" class="pointer ml-3" variant="danger"></b-icon>
</a> </a>
@ -97,7 +97,7 @@ export default {
this.$i18n.locale = this.language this.$i18n.locale = this.language
localeChanged(this.language) localeChanged(this.language)
this.cancelEdit() this.cancelEdit()
this.$toasted.success(this.$t('languages.success')) this.$toasted.success(this.$t('setting.language.success'))
}) })
.catch((error) => { .catch((error) => {
this.language = this.$store.state.language this.language = this.$store.state.language

View File

@ -74,7 +74,7 @@ describe('UserCard_Newsletter', () => {
}) })
it('toasts a success message', () => { it('toasts a success message', () => {
expect(toastSuccessMock).toBeCalledWith('setting.newsletterFalse') expect(toastSuccessMock).toBeCalledWith('setting.newsletter.newsletterFalse')
}) })
}) })

View File

@ -4,7 +4,7 @@
<b-row class="mb-3"> <b-row class="mb-3">
<b-col class="mb-2 col-12"> <b-col class="mb-2 col-12">
<small> <small>
<b>{{ $t('setting.newsletter') }}</b> <b>{{ $t('setting.newsletter.newsletter') }}</b>
</small> </small>
</b-col> </b-col>
<b-col class="col-12"> <b-col class="col-12">
@ -15,7 +15,11 @@
switch switch
@change="onSubmit" @change="onSubmit"
> >
{{ newsletterState ? $t('setting.newsletterTrue') : $t('setting.newsletterFalse') }} {{
newsletterState
? $t('setting.newsletter.newsletterTrue')
: $t('setting.newsletter.newsletterFalse')
}}
</b-form-checkbox> </b-form-checkbox>
</b-col> </b-col>
</b-row> </b-row>
@ -46,8 +50,8 @@ export default {
this.$store.commit('newsletterState', this.newsletterState) this.$store.commit('newsletterState', this.newsletterState)
this.$toasted.success( this.$toasted.success(
this.newsletterState this.newsletterState
? this.$t('setting.newsletterTrue') ? this.$t('setting.newsletter.newsletterTrue')
: this.$t('setting.newsletterFalse'), : this.$t('setting.newsletter.newsletterFalse'),
) )
}) })
.catch((error) => { .catch((error) => {