From 5b4fe9176e528e6ab2052f3702da03112ab9be45 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 8 Sep 2022 14:26:24 +0200 Subject: [PATCH] feat: unify time units and use the same ones everywhere --- src/components/date/datemathHelp.vue | 16 +++++------ src/components/tasks/partials/repeatAfter.vue | 10 +++---- src/i18n/lang/en.json | 28 +++++++++++-------- src/views/user/settings/General.vue | 20 ++++++------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/components/date/datemathHelp.vue b/src/components/date/datemathHelp.vue index 4e4319ed..eeda712f 100644 --- a/src/components/date/datemathHelp.vue +++ b/src/components/date/datemathHelp.vue @@ -36,35 +36,35 @@ s - {{ $t('input.datemathHelp.units.seconds') }} + {{ $t('time.seconds') }} m - {{ $t('input.datemathHelp.units.minutes') }} + {{ $t('time.minutes') }} h - {{ $t('input.datemathHelp.units.hours') }} + {{ $t('time.hours') }} H - {{ $t('input.datemathHelp.units.hours') }} + {{ $t('time.hours') }} d - {{ $t('input.datemathHelp.units.days') }} + {{ $t('time.days') }} w - {{ $t('input.datemathHelp.units.weeks') }} + {{ $t('time.weeks') }} M - {{ $t('input.datemathHelp.units.months') }} + {{ $t('time.months') }} y - {{ $t('input.datemathHelp.units.years') }} + {{ $t('time.years') }} diff --git a/src/components/tasks/partials/repeatAfter.vue b/src/components/tasks/partials/repeatAfter.vue index e416e2a6..e0e7b200 100644 --- a/src/components/tasks/partials/repeatAfter.vue +++ b/src/components/tasks/partials/repeatAfter.vue @@ -48,11 +48,11 @@ @change="updateData" :disabled="disabled || undefined" > - - - - - + + + + + diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index cf5b4550..0dd088db 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -551,19 +551,16 @@ "fromto": "{from} to {to}", "ranges": { "today": "Today", - "thisWeek": "This Week", "restOfThisWeek": "The Rest of This Week", "nextWeek": "Next Week", "next7Days": "Next 7 Days", "lastWeek": "Last Week", - "thisMonth": "This Month", "restOfThisMonth": "The Rest of This Month", "nextMonth": "Next Month", "next30Days": "Next 30 Days", "lastMonth": "Last Month", - "thisYear": "This Year", "restOfThisYear": "The Rest of This Year" } @@ -580,15 +577,6 @@ "roundDay": "Round down to the nearest day", "supportedUnits": "Supported time units are:", "someExamples": "Some examples of time expressions:", - "units": { - "seconds": "Seconds", - "minutes": "Minutes", - "hours": "Hours", - "days": "Days", - "weeks": "Weeks", - "months": "Months", - "years": "Years" - }, "examples": { "now": "Right now", "in24h": "In 24h", @@ -600,6 +588,22 @@ } } }, + "time": { + "seconds": "Seconds", + "second": "Second", + "minutes": "Minutes", + "minute": "Minute", + "hours": "Hours", + "hour": "Hour", + "days": "Days", + "day": "Day", + "weeks": "Weeks", + "week": "Week", + "months": "Months", + "month": "Month", + "years": "Years", + "year": "Year" + }, "task": { "task": "Task", "new": "Create a new task", diff --git a/src/views/user/settings/General.vue b/src/views/user/settings/General.vue index 34f0adb9..ef86589b 100644 --- a/src/views/user/settings/General.vue +++ b/src/views/user/settings/General.vue @@ -43,21 +43,17 @@