diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index dc76ada7..0e7deba7 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -78,6 +78,29 @@ function Shift_editor_info_render(Shift $shift) $shift->transaction_id ); } + if ($shift->schedule) { + $angeltypeSource = $shift->schedule->needed_from_shift_type + ? __( + 'shift.angeltype_source.shift_type', + [ + '' + . htmlspecialchars($shift->schedule->name) + . '', + '' + . htmlspecialchars($shift->shiftType->name) + . '', + ] + ) + : __('shift.angeltype_source.location', [ + '' + . htmlspecialchars($shift->schedule->name) + . '', + location_name_render($shift->location), + ]); + } else { + $angeltypeSource = __('Shift'); + } + $info[] = sprintf(__('shift.angeltype_source'), $angeltypeSource); return join('
', $info); } diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index 8294ce72..652edbc1 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -596,6 +596,18 @@ msgstr "Engeltyp" msgid "shift.next" msgstr "Nächste Schicht" +msgid "general.shift" +msgstr "Schicht" + +msgid "shift.angeltype_source" +msgstr "Benötigte Engel von: %s" + +msgid "shift.angeltype_source.shift_type" +msgstr "Programm %s via Schichttyp %s" + +msgid "shift.angeltype_source.location" +msgstr "Programm %s via Ort %s" + msgid "Last shift" msgstr "Letzte Schicht" diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po index 8a844db0..30dd04e2 100644 --- a/resources/lang/en_US/default.po +++ b/resources/lang/en_US/default.po @@ -853,6 +853,18 @@ msgstr "Register" msgid "shift.next" msgstr "Next shift" +msgid "general.shift" +msgstr "Shift" + +msgid "shift.angeltype_source" +msgstr "Needed angels from: %s" + +msgid "shift.angeltype_source.shift_type" +msgstr "Schedule %s via shift type %s" + +msgid "shift.angeltype_source.location" +msgstr "Schedule %s via location %s" + msgid "general.logout" msgstr "Logout"