mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 20:38:57 +00:00
Special string for skip field.
This commit is contained in:
@@ -410,12 +410,24 @@ class RecurringRepository implements RecurringRepositoryInterface
|
|||||||
return (string)trans('firefly.recurring_daily', [], $language);
|
return (string)trans('firefly.recurring_daily', [], $language);
|
||||||
}
|
}
|
||||||
if ('weekly' === $repetition->repetition_type) {
|
if ('weekly' === $repetition->repetition_type) {
|
||||||
|
|
||||||
$dayOfWeek = trans(sprintf('config.dow_%s', $repetition->repetition_moment), [], $language);
|
$dayOfWeek = trans(sprintf('config.dow_%s', $repetition->repetition_moment), [], $language);
|
||||||
|
if ($repetition->repetition_skip > 0) {
|
||||||
|
return (string)trans('firefly.recurring_weekly_skip', ['weekday' => $dayOfWeek, 'skip' => $repetition->repetition_skip + 1], $language);
|
||||||
|
}
|
||||||
|
|
||||||
return (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek], $language);
|
return (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek], $language);
|
||||||
}
|
}
|
||||||
if ('monthly' === $repetition->repetition_type) {
|
if ('monthly' === $repetition->repetition_type) {
|
||||||
return (string)trans('firefly.recurring_monthly', ['dayOfMonth' => $repetition->repetition_moment], $language);
|
if ($repetition->repetition_skip > 0) {
|
||||||
|
return (string)trans(
|
||||||
|
'firefly.recurring_monthly_skip', ['dayOfMonth' => $repetition->repetition_moment, 'skip' => $repetition->repetition_skip + 1], $language
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string)trans(
|
||||||
|
'firefly.recurring_monthly', ['dayOfMonth' => $repetition->repetition_moment, 'skip' => $repetition->repetition_skip - 1], $language
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ('ndom' === $repetition->repetition_type) {
|
if ('ndom' === $repetition->repetition_type) {
|
||||||
$parts = explode(',', $repetition->repetition_moment);
|
$parts = explode(',', $repetition->repetition_moment);
|
||||||
|
|||||||
@@ -1356,7 +1356,9 @@ return [
|
|||||||
'make_new_recurring' => 'Create a recurring transaction',
|
'make_new_recurring' => 'Create a recurring transaction',
|
||||||
'recurring_daily' => 'Every day',
|
'recurring_daily' => 'Every day',
|
||||||
'recurring_weekly' => 'Every week on :weekday',
|
'recurring_weekly' => 'Every week on :weekday',
|
||||||
|
'recurring_weekly_skip' => 'Every :skip(st/nd/rd/th) week on :weekday',
|
||||||
'recurring_monthly' => 'Every month on the :dayOfMonth(st/nd/rd/th) day',
|
'recurring_monthly' => 'Every month on the :dayOfMonth(st/nd/rd/th) day',
|
||||||
|
'recurring_monthly_skip' => 'Every :skip(st/nd/rd/th) month on the :dayOfMonth(st/nd/rd/th) day',
|
||||||
'recurring_ndom' => 'Every month on the :dayOfMonth(st/nd/rd/th) :weekday',
|
'recurring_ndom' => 'Every month on the :dayOfMonth(st/nd/rd/th) :weekday',
|
||||||
'recurring_yearly' => 'Every year on :date',
|
'recurring_yearly' => 'Every year on :date',
|
||||||
'overview_for_recurrence' => 'Overview for recurring transaction ":title"',
|
'overview_for_recurrence' => 'Overview for recurring transaction ":title"',
|
||||||
|
|||||||
Reference in New Issue
Block a user