diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..3b6641073 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/admin/src/components/ConfirmRegisterMailFormular.spec.js b/admin/src/components/ConfirmRegisterMailFormular.spec.js index 8872128e9..705a185a3 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.spec.js +++ b/admin/src/components/ConfirmRegisterMailFormular.spec.js @@ -8,6 +8,7 @@ const toastSuccessMock = jest.fn() const toastErrorMock = jest.fn() const mocks = { + $t: jest.fn((t) => t), $apollo: { mutate: apolloMutateMock, }, @@ -52,9 +53,7 @@ describe('ConfirmRegisterMailFormular', () => { }) it('toasts a success message', () => { - expect(toastSuccessMock).toBeCalledWith( - 'Erfolgreich senden der Confirmation Link an die E-Mail des Users! bob@baumeister.de', - ) + expect(toastSuccessMock).toBeCalledWith('unregister_mail.success') }) }) @@ -66,9 +65,7 @@ describe('ConfirmRegisterMailFormular', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith( - 'Fehler beim senden des confirmation link an den Benutzer: OUCH!', - ) + expect(toastErrorMock).toBeCalledWith('unregister_mail.error') }) }) }) diff --git a/admin/src/components/ConfirmRegisterMailFormular.vue b/admin/src/components/ConfirmRegisterMailFormular.vue index 866e8a487..5052a8a3e 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.vue +++ b/admin/src/components/ConfirmRegisterMailFormular.vue @@ -2,17 +2,15 @@
- Die letzte Email wurde am - {{ dateLastSend }} Uhr - an das Mitglied ({{ email }}) gesendet. + {{ $t('unregister_mail.text', { date: dateLastSend, mail: email }) }}
- + - Registrierungs-Email bestätigen, jetzt senden + {{ $t('unregister_mail.button') }} @@ -42,14 +40,10 @@ export default { }, }) .then(() => { - this.$toasted.success( - 'Erfolgreich senden der Confirmation Link an die E-Mail des Users! ' + this.email, - ) + this.$toasted.success(this.$t('unregister_mail.success', { email: this.email })) }) .catch((error) => { - this.$toasted.error( - 'Fehler beim senden des confirmation link an den Benutzer: ' + error.message, - ) + this.$toasted.error(this.$t('unregister_mail.error', { message: error.message })) }) }, }, diff --git a/admin/src/components/ContentFooter.vue b/admin/src/components/ContentFooter.vue index ade4e0a83..1e7e20f9e 100644 --- a/admin/src/components/ContentFooter.vue +++ b/admin/src/components/ContentFooter.vue @@ -3,8 +3,8 @@

- Gradido Akademie Adminkonsole -
Version: 0.0.1
+ {{ $t('gradido_admin_footer') }} +
Version: 1.0.0
diff --git a/admin/src/components/CreationFormular.spec.js b/admin/src/components/CreationFormular.spec.js index 1c7dd40fc..388ab6aa9 100644 --- a/admin/src/components/CreationFormular.spec.js +++ b/admin/src/components/CreationFormular.spec.js @@ -21,6 +21,7 @@ const toastedErrorMock = jest.fn() const toastedSuccessMock = jest.fn() const mocks = { + $t: jest.fn((t) => t), $moment: jest.fn(() => { return { format: jest.fn((m) => m), diff --git a/admin/src/components/CreationFormular.vue b/admin/src/components/CreationFormular.vue index 9d1309cae..af966a952 100644 --- a/admin/src/components/CreationFormular.vue +++ b/admin/src/components/CreationFormular.vue @@ -1,10 +1,10 @@ diff --git a/admin/src/components/UserTable.spec.js b/admin/src/components/UserTable.spec.js index 3db0131a3..e25f53015 100644 --- a/admin/src/components/UserTable.spec.js +++ b/admin/src/components/UserTable.spec.js @@ -13,8 +13,12 @@ describe('UserTable', () => { creation: [], } + const mocks = { + $t: jest.fn((t) => t), + } + const Wrapper = () => { - return mount(UserTable, { localVue, propsData }) + return mount(UserTable, { localVue, propsData, mocks }) } describe('mount', () => { diff --git a/admin/src/components/UserTable.vue b/admin/src/components/UserTable.vue index 3a82663ce..3f5393412 100644 --- a/admin/src/components/UserTable.vue +++ b/admin/src/components/UserTable.vue @@ -248,21 +248,18 @@ export default { this.overlayItem = item if (bookmarkType === 'remove') { - this.overlayText.header = 'Achtung! Schöpfung löschen!' - this.overlayText.text1 = - 'Nach dem Löschen gibt es keine Möglichkeit mehr diesen Datensatz wiederherzustellen. Es wird aber der gesamte Vorgang in der Logdatei als Übersicht gespeichert.' - this.overlayText.text2 = 'Willst du die vorgespeicherte Schöpfung wirklich löschen? ' - this.overlayText.button_ok = 'Ja, Schöpfung löschen!' - this.overlayText.button_cancel = 'Nein, nicht löschen.' + this.overlayText.header = this.$t('overlay.remove.title') + this.overlayText.text1 = this.$t('overlay.remove.text') + this.overlayText.text2 = this.$t('overlay.remove.question') + this.overlayText.button_ok = this.$t('overlay.remove.yes') + this.overlayText.button_cancel = this.$t('overlay.remove.no') } if (bookmarkType === 'confirm') { - this.overlayText.header = 'Schöpfung bestätigen!' - this.overlayText.text1 = - 'Nach dem Speichern ist der Datensatz nicht mehr änderbar und kann auch nicht mehr gelöscht werden. Bitte überprüfe genau, dass alles stimmt.' - this.overlayText.text2 = - 'Willst du diese vorgespeicherte Schöpfung wirklich vollziehen und entgültig speichern?' - this.overlayText.button_ok = 'Ja, Schöpfung speichern und bestätigen!' - this.overlayText.button_cancel = 'Nein, nicht speichern.' + this.overlayText.header = this.$t('overlay.confirm.title') + this.overlayText.text1 = this.$t('overlay.confirm.text') + this.overlayText.text2 = this.$t('overlay.confirm.question') + this.overlayText.button_ok = this.$t('overlay.confirm.yes') + this.overlayText.button_cancel = this.$t('overlay.confirm.no') } }, overlayOK(bookmarkType, item) { diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 96a409c60..b2f0e427d 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -1,4 +1,65 @@ { - "not_open_creations": "keine offene Schöpfungen", - "open_creations": "offene Schöpfungen" + "bookmark": "bookmark", + "confirmed": "bestätigt", + "creation_form": { + "creation_for": "Schöpfung für ", + "enter_text": "Text eintragen", + "form": "Schöpfungsformular", + "min_characters": "Mindestens 10 Zeichen eingeben", + "reset": "Zurücksetzen", + "select_month": "Monat auswählen", + "select_value": "Betrag auswählen", + "submit_creation": "Schöpfung einreichen", + "toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit", + "toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit", + "update_creation": "Schöpfung aktualisieren" + }, + "details": "Details", + "e_mail": "E-Mail", + "firstname": "Vorname", + "gradido_admin_footer": "Gradido Akademie Adminkonsole", + "hide_details": "Details verbergen von", + "lastname": "Nachname", + "multiple_creation_text": "Bitte wähle ein oder mehrere Mitglieder aus für die du Schöpfen möchtest.", + "navbar": { + "logout": "Abmelden", + "multi_creation": "Mehrfachschöpfung", + "open_creation": "Offene Schöpfungen", + "overview": "Übersicht", + "user_search": "Nutzersuche", + "wallet": "Wallet" + }, + "not_open_creations": "Keine offenen Schöpfungen", + "open_creation": "Offene Schöpfung", + "open_creations": "Offene Schöpfungen", + "overlay": { + "confirm": { + "no": "Nein, nicht speichern.", + "question": "Willst du diese vorgespeicherte Schöpfung wirklich vollziehen und entgültig speichern?", + "text": "Nach dem Speichern ist der Datensatz nicht mehr änderbar und kann auch nicht mehr gelöscht werden. Bitte überprüfe genau, dass alles stimmt.", + "title": "Schöpfung bestätigen!", + "yes": "Ja, Schöpfung bestätigen und speichern!" + }, + "remove": { + "no": "Nein, nicht löschen.", + "question": "Willst du die vorgespeicherte Schöpfung wirklich löschen?", + "text": "Nach dem Löschen gibt es keine Möglichkeit mehr diesen Datensatz wiederherzustellen. Es wird aber der gesamte Vorgang in der Logdatei als Übersicht gespeichert.", + "title": "Achtung! Schöpfung löschen!", + "yes": "Ja, Schöpfung löschen!" + } + }, + "remove": "Entfernen", + "transaction": "Transaktion", + "transactionlist": { + "title": "Alle geschöpften Transaktionen für den Nutzer" + }, + "unregistered_emails": "Unregistrierte E-Mails", + "unregister_mail": { + "button": "Registrierungs-Email bestätigen, jetzt senden", + "error": "Fehler beim Senden des Bestätigungs-Links an den Benutzer: {message}", + "info": "Email bestätigen, wiederholt senden an:", + "success": "Erfolgreiches Senden des Bestätigungs-Links an die E-Mail des Nutzers! ({email})", + "text": " Die letzte Email wurde am {date} Uhr an das Mitglied ({mail}) gesendet." + }, + "user_search": "Nutzer-Suche" } diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 20ab609e0..398f4b5f6 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -1,4 +1,65 @@ { + "bookmark": "Remember", + "confirmed": "confirmed", + "creation_form": { + "creation_for": "Creation for ", + "enter_text": "Enter text", + "form": "Creation form", + "min_characters": "Enter at least 10 characters", + "reset": "Reset", + "select_month": "Select month", + "select_value": "Select amount", + "submit_creation": "Submit creation", + "toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.", + "toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.", + "update_creation": "Creation update" + }, + "details": "Details", + "e_mail": "E-Mail", + "firstname": "Firstname", + "gradido_admin_footer": "Gradido Academy Admin Console", + "hide_details": "Hide details from", + "lastname": "Lastname", + "multiple_creation_text": "Please select one or more members for which you would like to perform creations.", + "navbar": { + "logout": "Logout", + "multi_creation": "Multiple creation", + "open_creation": "Open creations", + "overview": "Overview", + "user_search": "User search", + "wallet": "Wallet" + }, "not_open_creations": "No open creations", - "open_creations": "Open creations" + "open_creation": "Open creation", + "open_creations": "Open creations", + "overlay": { + "confirm": { + "no": "No, do not save.", + "question": "Do you really want to carry out and finally save this pre-stored creation?", + "text": "After saving, the record can no longer be changed or deleted. Please check carefully that everything is correct.", + "title": "Confirm creation!", + "yes": "Yes, confirm and save creation!" + }, + "remove": { + "no": "No, do not delete.", + "question": "Do you really want to delete the pre-stored creation?", + "text": "After deletion, there is no possibility to restore this data record. However, the entire process is saved in the log file as an overview.", + "title": "Attention! Delete creation!", + "yes": "Yes, delete creation!" + } + }, + "remove": "Remove", + "transaction": "Transaction", + "transactionlist": { + "title": "All creation-transactions for the user" + }, + "unregistered_emails": "Unregistered e-mails", + "unregister_mail": { + "button": "Confirm registration email, send now", + "error": "Error sending the confirmation link to the user: {message}", + "info": "Confirm email, send repeatedly to:", + "success": "Successfully send the confirmation link to the user's email! ({email})", + "text": " The last email was sent to the member ({mail}) on {date} clock." + }, + "user_search": "User search" } diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index 65e56ca33..073b22c0e 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -28,6 +28,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ const toastErrorMock = jest.fn() const mocks = { + $t: jest.fn((t) => t), $apollo: { query: apolloQueryMock, }, diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index e8651357e..4d6dca920 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -31,7 +31,7 @@ @update-item="updateItem" />
- Bitte wähle ein oder Mehrere Mitglieder aus für die du Schöpfen möchtest + {{ $t('multiple_creation_text') }}
t), $store: { commit: storeCommitMock, }, diff --git a/admin/src/pages/Overview.spec.js b/admin/src/pages/Overview.spec.js index b0b8dc6fb..b3d720d5c 100644 --- a/admin/src/pages/Overview.spec.js +++ b/admin/src/pages/Overview.spec.js @@ -22,6 +22,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ const storeCommitMock = jest.fn() const mocks = { + $t: jest.fn((t) => t), $apollo: { query: apolloQueryMock, }, @@ -31,7 +32,6 @@ const mocks = { openCreations: 2, }, }, - $t: jest.fn((t) => t), } describe('Overview', () => { diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js index 63fcefb5b..473b2bbdc 100644 --- a/admin/src/pages/UserSearch.spec.js +++ b/admin/src/pages/UserSearch.spec.js @@ -20,6 +20,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ const toastErrorMock = jest.fn() const mocks = { + $t: jest.fn((t) => t), $apollo: { query: apolloQueryMock, }, diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue index 186f2c8ce..2c8b289e0 100644 --- a/admin/src/pages/UserSearch.vue +++ b/admin/src/pages/UserSearch.vue @@ -3,15 +3,15 @@
- Anzeigen aller nicht registrierten E-Mails. + {{ $t('unregistered_emails') }}
- + @@ -37,12 +37,12 @@ export default { return { showArrays: false, fields: [ - { key: 'email', label: 'Email' }, - { key: 'firstName', label: 'Firstname' }, - { key: 'lastName', label: 'Lastname' }, + { key: 'email', label: this.$t('e_mail') }, + { key: 'firstName', label: this.$t('firstname') }, + { key: 'lastName', label: this.$t('lastname') }, { key: 'creation', - label: 'Open creations', + label: this.$t('open_creation'), formatter: (value, key, item) => { return ( ` @@ -65,9 +65,9 @@ export default { ) }, }, - { key: 'show_details', label: 'Details' }, - { key: 'confirm_mail', label: 'Mail' }, - { key: 'transactions_list', label: 'Transaction' }, + { key: 'show_details', label: this.$t('details') }, + { key: 'confirm_mail', label: this.$t('confirmed') }, + { key: 'transactions_list', label: this.$t('transaction') }, ], searchResult: [], massCreation: [],