summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-06-04 19:26:50 +0200
committermsquare <msquare@notrademark.de>2019-06-04 21:24:59 +0200
commit0458ce95097f97a3469db48bd6f655c8dd3d4674 (patch)
treefa58b2c11d542ed31696d9fa4786dbd9fce54e9e
parent142871f852c717319608de43d954180f17e5ed66 (diff)
Added more error messages
-rw-r--r--includes/controller/shift_entries_controller.php2
-rw-r--r--includes/model/ShiftSignupState.php2
-rw-r--r--includes/view/ShiftCalendarRenderer.php2
-rw-r--r--includes/view/ShiftCalendarShiftRenderer.php2
-rw-r--r--resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mobin45132 -> 45461 bytes
-rw-r--r--resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po7
6 files changed, 11 insertions, 4 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php
index 3c6c3a7c..5547c183 100644
--- a/includes/controller/shift_entries_controller.php
+++ b/includes/controller/shift_entries_controller.php
@@ -212,6 +212,8 @@ function shift_entry_error_message(ShiftSignupState $shift_signup_state)
error(__('This shift ended already.'));
} elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_ARRIVED) {
error(__('You are not marked as arrived.'));
+ } elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_YET) {
+ error(__('You are not allowed to sign up yet.'));
} elseif ($shift_signup_state->getState() == ShiftSignupState::SIGNED_UP) {
error(__('You are signed up for this shift.'));
}
diff --git a/includes/model/ShiftSignupState.php b/includes/model/ShiftSignupState.php
index a2618cf1..70ae5059 100644
--- a/includes/model/ShiftSignupState.php
+++ b/includes/model/ShiftSignupState.php
@@ -93,6 +93,7 @@ class ShiftSignupState
{
switch ($state) {
case ShiftSignupState::NOT_ARRIVED:
+ case ShiftSignupState::NOT_YET:
case ShiftSignupState::SHIFT_ENDED:
return 100;
@@ -109,6 +110,7 @@ class ShiftSignupState
case ShiftSignupState::OCCUPIED:
case ShiftSignupState::ADMIN:
return 60;
+
default:
return 0;
}
diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php
index dfc55d54..23fc0051 100644
--- a/includes/view/ShiftCalendarRenderer.php
+++ b/includes/view/ShiftCalendarRenderer.php
@@ -313,7 +313,7 @@ class ShiftCalendarRenderer
label(__('Help needed'), 'danger'),
label(__('Other angeltype needed / collides with my shifts'), 'warning'),
label(__('Shift is full'), 'success'),
- label(__('Shift running/ended or user not arrived'), 'default')
+ label(__('Shift running/ended or user not arrived/allowed'), 'default')
]);
}
}
diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php
index ac206ad0..89f66275 100644
--- a/includes/view/ShiftCalendarShiftRenderer.php
+++ b/includes/view/ShiftCalendarShiftRenderer.php
@@ -205,7 +205,7 @@ class ShiftCalendarShiftRenderer
break;
case ShiftSignupState::NOT_YET:
- $entry_list[] = $inner_text . '(' . _('not yet') . ')';
+ $entry_list[] = $inner_text . ' (' . _('not yet') . ')';
break;
case ShiftSignupState::ANGELTYPE:
diff --git a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo
index 0eb381de..f5635121 100644
--- a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo
+++ b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo
Binary files differ
diff --git a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po
index 58bc44e9..f779529a 100644
--- a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po
+++ b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po
@@ -178,6 +178,9 @@ msgstr "Die Schicht ist schon vorbei."
msgid "You are not marked as arrived."
msgstr "Du bist nicht als angekommen markiert."
+msgid "You are not allowed to sign up yet."
+msgstr "Du darfst dich noch nicht anmelden."
+
#: includes/controller/shift_entries_controller.php:216
#: includes/view/Shifts_view.php:129
msgid "You are signed up for this shift."
@@ -2108,8 +2111,8 @@ msgid "Shift is full"
msgstr "Schicht ist voll"
#: includes/view/ShiftCalendarRenderer.php:316
-msgid "Shift running/ended or user not arrived"
-msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen"
+msgid "Shift running/ended or user not arrived/allowed"
+msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen/darfst dich noch nicht anmelden"
#: includes/view/ShiftCalendarShiftRenderer.php:134
msgid "Add more angels"