From d6c81d21d33bc82285d0c2ac14697eebbef15781 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 23 Aug 2022 10:08:31 +0200 Subject: [PATCH 1/3] add redeem link hint to locales --- frontend/src/locales/de.json | 1 + frontend/src/locales/en.json | 1 + frontend/src/locales/es.json | 1 + frontend/src/locales/fr.json | 1 + frontend/src/locales/nl.json | 1 + 5 files changed, 5 insertions(+) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 9d63efdc6..dfd7c8335 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -174,6 +174,7 @@ "link-copied": "Link wurde in die Zwischenablage kopiert. Du kannst ihn jetzt in eine E-Mail oder Nachricht einfügen.", "link-deleted": "Der Link wurde am {date} gelöscht.", "link-expired": "Der Link ist nicht mehr gültig. Die Gültigkeit ist am {date} abgelaufen.", + "link-hint": "Achtung: Jeder kann diesen Link einlösen. Gib ihn bitte nicht weiter!", "link-overview": "Linkübersicht", "links_count": "Aktive Links", "links_sum": "Offene Links und QR-Codes", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 7d90c9683..ff46cf95a 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -174,6 +174,7 @@ "link-copied": "Link has been copied to the clipboard. You can now paste it into an email or message.", "link-deleted": "The link was deleted on {date}.", "link-expired": "The link is no longer valid. The validity expired on {date}.", + "link-hint": "Attention: Anyone can redeem this link. Please do not share it!", "link-overview": "Link overview", "links_count": "Active links", "links_sum": "Open links and QR codes", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index 77a564589..834c74af4 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -174,6 +174,7 @@ "link-copied": "El enlace se ha copiado en el portapapeles. Ahora puedes pegarlo en un correo electrónico o mensaje.", "link-deleted": "El enlace se eliminó el {date}.", "link-expired": "El enlace ya no es válido. La validez expiró el {date}.", + "link-hint": "Atención: cualquiera puede canjear este enlace. Por favor, no lo transmitan.", "link-overview": "Resumen de enlaces", "links_count": "Enlaces activos", "links_sum": "Enlaces abiertos y códigos QR", diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index 81426ffe4..e2e8747b5 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -174,6 +174,7 @@ "link-copied": "Le lien a été copié dans le presse-papier. Vous pouvez désormais le coller dans votre email ou votre message.", "link-deleted": "Le lien a été supprimé le on {date}.", "link-expired": "Le lien n´est plus valide. Sa validité a expiré le {date}.", + "link-hint": "Attention : tout le monde peut utiliser ce lien. Ne le partage pas, s'il te plaît!", "link-overview": "Aperçu du lien", "links_count": "Liens actifs", "links_sum": "Ouvrir les liens et les QR codes", diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index 480f3f55d..38c5b9c1a 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -174,6 +174,7 @@ "link-copied": "Link werd naar het klembord gekopieerd. Je kunt deze nu in een email of bericht invoegen.", "link-deleted": "De link werd op {date} verwijderd.", "link-expired": "De link is niet meer geldig. De geldigheid is op {date} afgelopen.", + "link-hint": "Attentie: Iedereen kan deze link inwisselen. Geef het alsjeblieft niet door!", "link-overview": "Overzicht links", "links_count": "Actieve links", "links_sum": "Open links en QR-Codes", From f55851e4d0aee61fac4a73b7cafe1e1fb179999e Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 23 Aug 2022 11:39:43 +0200 Subject: [PATCH 2/3] add hint text to copyLinkWithText method --- frontend/src/mixins/copyLinks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/mixins/copyLinks.js b/frontend/src/mixins/copyLinks.js index 415358c9b..ac6be95c5 100644 --- a/frontend/src/mixins/copyLinks.js +++ b/frontend/src/mixins/copyLinks.js @@ -30,7 +30,8 @@ ${this.$store.state.firstName} ${this.$t('transaction-link.send_you')} ${this.am "${this.memo}" ${this.$t('gdd_per_link.credit-your-gradido')} ${this.$t('gdd_per_link.validUntilDate', { date: this.$d(new Date(this.validUntil), 'short'), - })}`, + })} +${this.$t('gdd_per_link.link-hint')}`, ) .then(() => { this.toastSuccess(this.$t('gdd_per_link.link-and-text-copied')) From 1ea43130dc452c75984b962663df54eeb5f76b94 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 23 Aug 2022 11:41:01 +0200 Subject: [PATCH 3/3] adapt unit tests to link text changes --- .../src/components/TransactionLinks/TransactionLink.spec.js | 3 ++- frontend/src/pages/Send.spec.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/TransactionLinks/TransactionLink.spec.js b/frontend/src/components/TransactionLinks/TransactionLink.spec.js index d06f0f726..798223f60 100644 --- a/frontend/src/components/TransactionLinks/TransactionLink.spec.js +++ b/frontend/src/components/TransactionLinks/TransactionLink.spec.js @@ -105,7 +105,8 @@ describe('TransactionLink', () => { 'http://localhost/redeem/c00000000c000000c0000\n' + 'Testy transaction-link.send_you 75 Gradido.\n' + '"Katzenauge, Eulenschrei, was verschwunden komm herbei!"\n' + - 'gdd_per_link.credit-your-gradido gdd_per_link.validUntilDate', + 'gdd_per_link.credit-your-gradido gdd_per_link.validUntilDate\n' + + 'gdd_per_link.link-hint', ) }) it('toasts success message', () => { diff --git a/frontend/src/pages/Send.spec.js b/frontend/src/pages/Send.spec.js index 0738d9720..c1b6fb635 100644 --- a/frontend/src/pages/Send.spec.js +++ b/frontend/src/pages/Send.spec.js @@ -283,7 +283,8 @@ describe('Send', () => { 'http://localhost/redeem/0123456789\n' + 'Testy transaction-link.send_you 56.78 Gradido.\n' + '"Make the best of the link!"\n' + - 'gdd_per_link.credit-your-gradido gdd_per_link.validUntilDate', + 'gdd_per_link.credit-your-gradido gdd_per_link.validUntilDate\n' + + 'gdd_per_link.link-hint', ) }) it('toasts success message', () => {