From 049b9728c558fe502901ce2cadbf79ae3a2972cd Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 26 Jul 2022 11:17:35 +0200 Subject: [PATCH 1/3] Replace own logic to validation-provider. --- .../Contributions/ContributionForm.vue | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 6b8ef39d0..1c98dfd98 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -25,25 +25,27 @@ :label-no-date-selected="$t('contribution.noDateSelected')" required > - - -
- {{ form.memo.length }} - {{ $t('math.lower') }} {{ minlength }} - {{ $t('math.divide') }} {{ maxlength }} -
+ + + + {{ error }} + + Date: Tue, 26 Jul 2022 11:21:57 +0200 Subject: [PATCH 2/3] Remove unused locales. --- frontend/src/locales/de.json | 2 -- frontend/src/locales/en.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index ef81d463e..62edd9815 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -203,10 +203,8 @@ "login": "Anmeldung", "math": { "aprox": "~", - "divide": "/", "equal": "=", "exclaim": "!", - "lower": "<", "minus": "−", "pipe": "|" }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 47753487d..1cbdc5a8a 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -203,10 +203,8 @@ "login": "Login", "math": { "aprox": "~", - "divide": "/", "equal": "=", "exclaim": "!", - "lower": "<", "minus": "−", "pipe": "|" }, From 2eaf93bb34f9c3de7f7b0a65e4a3ec7c7c61766f Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 26 Jul 2022 12:01:14 +0200 Subject: [PATCH 3/3] errors in red, datepicker localized --- .../src/components/Contributions/ContributionForm.spec.js | 3 +++ frontend/src/components/Contributions/ContributionForm.vue | 6 ++++++ frontend/src/pages/Community.spec.js | 3 +++ 3 files changed, 12 insertions(+) diff --git a/frontend/src/components/Contributions/ContributionForm.spec.js b/frontend/src/components/Contributions/ContributionForm.spec.js index 5b05957bb..4f3ee6fa6 100644 --- a/frontend/src/components/Contributions/ContributionForm.spec.js +++ b/frontend/src/components/Contributions/ContributionForm.spec.js @@ -23,6 +23,9 @@ describe('ContributionForm', () => { creation: ['1000', '1000', '1000'], }, }, + $i18n: { + locale: 'en', + }, } const Wrapper = () => { diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 1c98dfd98..f345ffff4 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -18,6 +18,7 @@ id="contribution-date" v-model="form.date" size="lg" + :locale="$i18n.locale" :max="maximalDate" :min="minimalDate" class="mb-4" @@ -168,3 +169,8 @@ export default { }, } + diff --git a/frontend/src/pages/Community.spec.js b/frontend/src/pages/Community.spec.js index d834ddac1..deccabbb1 100644 --- a/frontend/src/pages/Community.spec.js +++ b/frontend/src/pages/Community.spec.js @@ -26,6 +26,9 @@ describe('Community', () => { creation: ['1000', '1000', '1000'], }, }, + $i18n: { + locale: 'en', + }, } const Wrapper = () => {