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 24 additions and 31 deletions
Showing only changes of commit 2aee048f61 - Show all commits

View File

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

View File

@ -48,11 +48,11 @@
@change="updateData"
:disabled="disabled || undefined"
>
<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>
<option value="hours">{{ $tc('time.hours', 2) }}</option>
<option value="days">{{ $tc('time.days', 2) }}</option>
<option value="weeks">{{ $tc('time.weeks', 2) }}</option>
<option value="months">{{ $tc('time.months', 2) }}</option>
<option value="years">{{ $tc('time.years', 2) }}</option>
</select>
</div>
</div>

View File

@ -589,20 +589,13 @@
}
},
"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"
"seconds": "Second | Seconds",
"minutes": "Minute | Minutes",
"hours": "Hour | Hours",
"days": "Day | Days",
"weeks": "Week | Weeks",
"months": "Month | Months",
"years": "Year | Years"
},
"task": {
"task": "Task",

View File

@ -44,16 +44,16 @@
<div class="control select">
<select v-model="defaultReminderAmountType">
<option value="minutes">
{{ $t('time.minute' + (defaultReminderAmount === 1 ? '' : 's')) }}
{{ $tc('time.minutes', defaultReminderAmount) }}
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('time.hour' + (defaultReminderAmount === 1 ? '' : 's')) }}
{{ $tc('time.hours', defaultReminderAmount) }}
</option>
<option value="days">
{{ $t('time.day' + (defaultReminderAmount === 1 ? '' : 's')) }}
{{ $tc('time.days', defaultReminderAmount) }}
</option>
<option value="months">
{{ $t('time.month' + (defaultReminderAmount === 1 ? '' : 's')) }}
{{ $tc('time.months', defaultReminderAmount) }}
</option>
</select>
</div>