WIP: feat: add default reminder for tasks with a due date #2360

Draft
konrad wants to merge 17 commits from feature/add-default-reminder into main
4 changed files with 37 additions and 37 deletions
Showing only changes of commit 5b4fe9176e - Show all commits

View File

@ -36,35 +36,35 @@
<tbody>
<tr>
<td><code>s</code></td>
<td>{{ $t('input.datemathHelp.units.seconds') }}</td>
<td>{{ $t('time.seconds') }}</td>
</tr>
<tr>
<td><code>m</code></td>
<td>{{ $t('input.datemathHelp.units.minutes') }}</td>
<td>{{ $t('time.minutes') }}</td>
</tr>
<tr>
<td><code>h</code></td>
<td>{{ $t('input.datemathHelp.units.hours') }}</td>
<td>{{ $t('time.hours') }}</td>
</tr>
<tr>
<td><code>H</code></td>
<td>{{ $t('input.datemathHelp.units.hours') }}</td>
<td>{{ $t('time.hours') }}</td>
</tr>
<tr>
<td><code>d</code></td>
<td>{{ $t('input.datemathHelp.units.days') }}</td>
<td>{{ $t('time.days') }}</td>
</tr>
<tr>
<td><code>w</code></td>
<td>{{ $t('input.datemathHelp.units.weeks') }}</td>
<td>{{ $t('time.weeks') }}</td>
</tr>
<tr>
<td><code>M</code></td>
<td>{{ $t('input.datemathHelp.units.months') }}</td>
<td>{{ $t('time.months') }}</td>
</tr>
<tr>
<td><code>y</code></td>
<td>{{ $t('input.datemathHelp.units.years') }}</td>
<td>{{ $t('time.years') }}</td>
</tr>
</tbody>
</table>

View File

@ -48,11 +48,11 @@
@change="updateData"
:disabled="disabled || undefined"
>
<option value="hours">{{ $t('task.repeat.hours') }}</option>
<option value="days">{{ $t('task.repeat.days') }}</option>
<option value="weeks">{{ $t('task.repeat.weeks') }}</option>
<option value="months">{{ $t('task.repeat.months') }}</option>
<option value="years">{{ $t('task.repeat.years') }}</option>
<option value="hours">{{ $t('time.hours') }}</option>
<option value="days">{{ $t('time.days') }}</option>
<option value="weeks">{{ $t('time.weeks') }}</option>
<option value="months">{{ $t('time.months') }}</option>
<option value="years">{{ $t('time.years') }}</option>
</select>
</div>
</div>

View File

@ -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": {
konrad marked this conversation as resolved Outdated

Use vue-i18n pluralisation feature.
Or didn't you use that to be more because of crowdin?

Use [vue-i18n pluralisation](https://vue-i18n.intlify.dev/guide/essentials/pluralization.html) feature. Or didn't you use that to be more because of crowdin?

I actually just forgot about that feature :) will change it.

I actually just forgot about that feature :) will change it.

Done.

Done.
"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",

View File

@ -43,21 +43,17 @@
</div>
<div class="control select">
<select v-model="defaultReminderAmountType">
<option value="minutes">{{
$t('task.repeat.minute' + (defaultReminderAmount === 1 ? '' : 's'))
}}
<option value="minutes">
{{ $t('time.minute' + (defaultReminderAmount === 1 ? '' : 's')) }}
konrad marked this conversation as resolved Outdated

In case we don't use vue-i18n pluralisation feature we shouldn't use local messages that can't be precompiled (see: https://vue-i18n.intlify.dev/guide/advanced/optimization.html#optimization).

{{ defaultReminderAmount === 1 ? $t('time.minute') : $t('time.minutes') }}
In case we don't use vue-i18n pluralisation feature we shouldn't use local messages that can't be precompiled (see: https://vue-i18n.intlify.dev/guide/advanced/optimization.html#optimization). ```ts {{ defaultReminderAmount === 1 ? $t('time.minute') : $t('time.minutes') }} ```
</option>
<option value="hours">{{
$t('task.repeat.hour' + (defaultReminderAmount === 1 ? '' : 's'))
}}
<option value="hours">
{{ $t('time.hour' + (defaultReminderAmount === 1 ? '' : 's')) }}
</option>
<option value="days">{{
$t('task.repeat.day' + (defaultReminderAmount === 1 ? '' : 's'))
}}
<option value="days">
{{ $t('time.day' + (defaultReminderAmount === 1 ? '' : 's')) }}
</option>
<option value="months">{{
$t('task.repeat.month' + (defaultReminderAmount === 1 ? '' : 's'))
}}
<option value="months">
{{ $t('time.month' + (defaultReminderAmount === 1 ? '' : 's')) }}
</option>
</select>
</div>