From 55141154c083acc2d0397f4c62b4e0be1c7a19fa Mon Sep 17 00:00:00 2001 From: Bot Date: Tue, 3 Jan 2017 14:12:17 +0100 Subject: Replaced " with ' --- includes/view/AngelTypes_view.php | 148 ++++++++-------- includes/view/EventConfig_view.php | 60 +++---- includes/view/Questions_view.php | 26 +-- includes/view/ShiftCalendarRenderer.php | 9 +- includes/view/ShiftCalendarShiftRenderer.php | 20 +-- includes/view/ShiftEntry_view.php | 22 +-- includes/view/ShiftTypes_view.php | 10 +- includes/view/ShiftsFilterRenderer.php | 2 +- includes/view/Shifts_view.php | 8 +- includes/view/UserAngelTypes_view.php | 60 +++---- includes/view/UserDriverLicenses_view.php | 24 +-- includes/view/User_view.php | 244 ++++++++++++++------------- 12 files changed, 317 insertions(+), 316 deletions(-) (limited to 'includes/view') diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 0a97488d..be866c9b 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -26,15 +26,15 @@ function AngelType_render_membership($user_angeltype) if ($user_angeltype['user_angeltype_id'] != null) { if ($user_angeltype['restricted']) { if ($user_angeltype['confirm_user_id'] == null) { - return glyph('lock') . _("Unconfirmed"); + return glyph('lock') . _('Unconfirmed'); } elseif ($user_angeltype['supporter']) { - return glyph_bool(true) . _("supporter"); + return glyph_bool(true) . _('supporter'); } - return glyph_bool(true) . _("Member"); + return glyph_bool(true) . _('Member'); } elseif ($user_angeltype['supporter']) { - return glyph_bool(true) . _("supporter"); + return glyph_bool(true) . _('supporter'); } - return glyph_bool(true) . _("Member"); + return glyph_bool(true) . _('Member'); } return glyph_bool(false); } @@ -45,13 +45,13 @@ function AngelType_render_membership($user_angeltype) */ function AngelType_delete_view($angeltype) { - return page_with_title(sprintf(_("Delete angeltype %s"), $angeltype['name']), [ - info(sprintf(_("Do you want to delete angeltype %s?"), $angeltype['name']), true), + return page_with_title(sprintf(_('Delete angeltype %s'), $angeltype['name']), [ + info(sprintf(_('Do you want to delete angeltype %s?'), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes'), _("cancel"), 'cancel'), + button(page_link_to('angeltypes'), _('cancel'), 'cancel'), button( page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '&confirmed', - _("delete"), + _('delete'), 'ok' ) ]) @@ -68,38 +68,38 @@ function AngelType_delete_view($angeltype) function AngelType_edit_view($angeltype, $supporter_mode) { $contact_info = AngelType_contact_info($angeltype); - return page_with_title(sprintf(_("Edit %s"), $angeltype['name']), [ + return page_with_title(sprintf(_('Edit %s'), $angeltype['name']), [ buttons([ - button(page_link_to('angeltypes'), _("Angeltypes"), 'back') + button(page_link_to('angeltypes'), _('Angeltypes'), 'back') ]), msg(), form([ $supporter_mode - ? form_info(_("Name"), $angeltype['name']) - : form_text('name', _("Name"), $angeltype['name']), + ? form_info(_('Name'), $angeltype['name']) + : form_text('name', _('Name'), $angeltype['name']), $supporter_mode - ? form_info(_("Restricted"), $angeltype['restricted'] ? _("Yes") : _("No")) - : form_checkbox('restricted', _("Restricted"), $angeltype['restricted']), + ? form_info(_('Restricted'), $angeltype['restricted'] ? _('Yes') : _('No')) + : form_checkbox('restricted', _('Restricted'), $angeltype['restricted']), $supporter_mode - ? form_info(_("No Self Sign Up"), $angeltype['no_self_signup'] ? _("Yes") : _("No")) - : form_checkbox('no_self_signup', _("No Self Sign Up"), $angeltype['no_self_signup']), + ? form_info(_('No Self Sign Up'), $angeltype['no_self_signup'] ? _('Yes') : _('No')) + : form_checkbox('no_self_signup', _('No Self Sign Up'), $angeltype['no_self_signup']), $supporter_mode - ? form_info(_("Requires driver license"), $angeltype['requires_driver_license'] ? _("Yes") : _("No")) + ? form_info(_('Requires driver license'), $angeltype['requires_driver_license'] ? _('Yes') : _('No')) : form_checkbox( 'requires_driver_license', - _("Requires driver license"), + _('Requires driver license'), $angeltype['requires_driver_license'] ), - //form_text('contact_name', _("Name"), $angeltype['contact_name']), - //form_text('contact_dect', _("DECT"), $angeltype['contact_dect']), - //form_text('contact_email', _("E-Mail"), $angeltype['contact_email']), + //form_text('contact_name', _('Name'), $angeltype['contact_name']), + //form_text('contact_dect', _('DECT'), $angeltype['contact_dect']), + //form_text('contact_email', _('E-Mail'), $angeltype['contact_email']), form_info( - "", - _("Restricted angel types can only be used by an angel if enabled by a supporter (double opt-in).") + '', + _('Restricted angel types can only be used by an angel if enabled by a supporter (double opt-in).') ), - form_textarea('description', _("Description"), $angeltype['description']), - form_info("", _("Please use markdown for the description.")), - form_submit('submit', _("Save")) + form_textarea('description', _('Description'), $angeltype['description']), + form_info('', _('Please use markdown for the description.')), + form_submit('submit', _('Save')) ]) ]); } @@ -118,45 +118,45 @@ function AngelType_edit_view($angeltype, $supporter_mode) function AngelType_view_buttons($angeltype, $user_angeltype, $admin_angeltypes, $supporter, $user_driver_license, $user) { $buttons = [ - button(page_link_to('angeltypes'), _("Angeltypes"), 'back') + button(page_link_to('angeltypes'), _('Angeltypes'), 'back') ]; if ($angeltype['requires_driver_license']) { - $buttons[] = button(user_driver_license_edit_link($user), glyph("road") . _("my driving license")); + $buttons[] = button(user_driver_license_edit_link($user), glyph('road') . _('my driving license')); } if ($user_angeltype == null) { $buttons[] = button( page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], - _("join"), + _('join'), 'add' ); } else { if ($angeltype['requires_driver_license'] && $user_driver_license == null) { - error(_("This angeltype requires a driver license. Please enter your driver license information!")); + error(_('This angeltype requires a driver license. Please enter your driver license information!')); } if ($angeltype['restricted'] && $user_angeltype['confirm_user_id'] == null) { error(sprintf( - _("You are unconfirmed for this angeltype. Please go to the introduction for %s to get confirmed."), + _('You are unconfirmed for this angeltype. Please go to the introduction for %s to get confirmed.'), $angeltype['name'] )); } $buttons[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'], - _("leave"), 'cancel'); + _('leave'), 'cancel'); } if ($admin_angeltypes || $supporter) { $buttons[] = button( page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'], - _("edit"), + _('edit'), 'edit' ); } if ($admin_angeltypes) { $buttons[] = button( page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'], - _("delete"), + _('delete'), 'delete' ); } @@ -195,12 +195,12 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a $member['actions'] = table_buttons([ button( page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'], - _("confirm"), + _('confirm'), 'btn-xs' ), button( page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], - _("deny"), + _('deny'), 'btn-xs' ) ]); @@ -210,7 +210,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a $member['actions'] = table_buttons([ button( page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&supporter=0', - _("Remove supporter rights"), + _('Remove supporter rights'), 'btn-xs' ) ]); @@ -223,11 +223,11 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a $member['actions'] = table_buttons([ $admin_angeltypes ? button(page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&supporter=1', - _("Add supporter rights"), 'btn-xs') + _('Add supporter rights'), 'btn-xs') : '', button( page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], - _("remove"), + _('remove'), 'btn-xs' ) ]); @@ -255,21 +255,21 @@ function AngelType_view_table_headers($angeltype, $supporter, $admin_angeltypes) { if ($angeltype['requires_driver_license'] && ($supporter || $admin_angeltypes)) { return [ - 'Nick' => _("Nick"), - 'DECT' => _("DECT"), - 'wants_to_drive' => _("Driver"), - 'has_car' => _("Has car"), - 'has_license_car' => _("Car"), - 'has_license_3_5t_transporter' => _("3,5t Transporter"), - 'has_license_7_5t_truck' => _("7,5t Truck"), - 'has_license_12_5t_truck' => _("12,5t Truck"), - 'has_license_forklift' => _("Forklift"), + 'Nick' => _('Nick'), + 'DECT' => _('DECT'), + 'wants_to_drive' => _('Driver'), + 'has_car' => _('Has car'), + 'has_license_car' => _('Car'), + 'has_license_3_5t_transporter' => _('3,5t Transporter'), + 'has_license_7_5t_truck' => _('7,5t Truck'), + 'has_license_12_5t_truck' => _('12,5t Truck'), + 'has_license_forklift' => _('Forklift'), 'actions' => '' ]; } return [ - 'Nick' => _("Nick"), - 'DECT' => _("DECT"), + 'Nick' => _('Nick'), + 'DECT' => _('DECT'), 'actions' => '' ]; } @@ -302,9 +302,9 @@ function AngelType_view( msg() ]; - $page[] = '

' . _("Description") . '

'; + $page[] = '

' . _('Description') . '

'; $parsedown = new Parsedown(); - if ($angeltype['description'] != "") { + if ($angeltype['description'] != '') { $page[] = '
' . $parsedown->parse($angeltype['description']) . '
'; } @@ -317,7 +317,7 @@ function AngelType_view( $table_headers = AngelType_view_table_headers($angeltype, $supporter, $admin_angeltypes); if (count($supporters) > 0) { - $page[] = '

' . _("supporters") . '

'; + $page[] = '

' . _('supporters') . '

'; $page[] = table($table_headers, $supporters); } @@ -337,32 +337,32 @@ function AngelType_view( ]; } - $page[] = '

' . _("Members") . '

'; + $page[] = '

' . _('Members') . '

'; if ($admin_user_angeltypes) { $page[] = buttons([ - button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("Add"), 'add') + button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _('Add'), 'add') ]); } $page[] = table($table_headers, $members_confirmed); if ($admin_user_angeltypes && $angeltype['restricted'] && count($members_unconfirmed) > 0) { - $page[] = '

' . _("Unconfirmed") . '

'; + $page[] = '

' . _('Unconfirmed') . '

'; $page[] = buttons([ button( page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'], - _("confirm all"), + _('confirm all'), 'ok' ), button( page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'], - _("deny all"), + _('deny all'), 'cancel' ) ]); $page[] = table($table_headers, $members_unconfirmed); } - return page_with_title(sprintf(_("Team %s"), $angeltype['name']), $page); + return page_with_title(sprintf(_('Team %s'), $angeltype['name']), $page); } /** @@ -377,15 +377,15 @@ function AngelTypes_list_view($angeltypes, $admin_angeltypes) return page_with_title(angeltypes_title(), [ msg(), buttons([ - $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') : '', - button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description")) + $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _('New angeltype'), 'add') : '', + button(page_link_to('angeltypes') . '&action=about', _('Teams/Job description')) ]), table([ - 'name' => _("Name"), - 'restricted' => glyph('lock') . _("Restricted"), - 'no_self_signup' => glyph('share') . _("Self Sign Up Allowed"), - 'membership' => _("Membership"), - 'actions' => "" + 'name' => _('Name'), + 'restricted' => glyph('lock') . _('Restricted'), + 'no_self_signup' => glyph('share') . _('Self Sign Up Allowed'), + 'membership' => _('Membership'), + 'actions' => '' ], $angeltypes) ]); } @@ -407,13 +407,13 @@ function AngelTypes_about_view_angeltype($angeltype) if ($angeltype['user_angeltype_id'] != null) { $buttons[] = button( page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'], - _("leave"), + _('leave'), 'cancel' ); } else { $buttons[] = button( page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], - _("join"), + _('join'), 'add' ); } @@ -422,11 +422,11 @@ function AngelTypes_about_view_angeltype($angeltype) if ($angeltype['restricted']) { $html .= info( - _("This angeltype is restricted by double-opt-in by a team supporter. Please show up at the according introduction meetings."), + _('This angeltype is restricted by double-opt-in by a team supporter. Please show up at the according introduction meetings.'), true ); } - if ($angeltype['description'] != "") { + if ($angeltype['description'] != '') { $html .= '
' . $parsedown->parse($angeltype['description']) . '
'; } $html .= '
'; @@ -450,14 +450,14 @@ function AngelTypes_about_view($angeltypes, $user_logged_in) !$user_logged_in ? button(page_link_to('register'), register_title()) : '', !$user_logged_in ? button(page_link_to('login'), login_title()) : '', $user_logged_in ? button(page_link_to('angeltypes'), angeltypes_title(), 'back') : '', - button($faq_url, _("FAQ"), "btn-primary") + button($faq_url, _('FAQ'), 'btn-primary') ]), - '

' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '

', + '

' . _('Here is the list of teams and their tasks. If you have questions, read the FAQ.') . '

', '
' ]; foreach ($angeltypes as $angeltype) { $content[] = AngelTypes_about_view_angeltype($angeltype); } - return page_with_title(_("Teams/Job description"), $content); + return page_with_title(_('Teams/Job description'), $content); } diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php index 3cb85e0b..2b092962 100644 --- a/includes/view/EventConfig_view.php +++ b/includes/view/EventConfig_view.php @@ -10,7 +10,7 @@ function EventConfig_countdown_page($event_config) { if ($event_config == null) { return div('col-md-12 text-center', [ - heading(sprintf(_("Welcome to the %s!"), ' ENGELSYSTEM'), 2) + heading(sprintf(_('Welcome to the %s!'), ' ENGELSYSTEM'), 2) ]); } @@ -19,7 +19,7 @@ function EventConfig_countdown_page($event_config) if ($event_config['event_name'] != null) { $elements[] = div('col-sm-12 text-center', [ heading(sprintf( - _("Welcome to the %s!"), + _('Welcome to the %s!'), $event_config['event_name'] . ' ENGELSYSTEM' ), 2) ]); @@ -27,37 +27,37 @@ function EventConfig_countdown_page($event_config) if ($event_config['buildup_start_date'] != null && time() < $event_config['buildup_start_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ - heading(_("Buildup starts"), 4), + heading(_('Buildup starts'), 4), '%c', - '' . date(_("Y-m-d"), $event_config['buildup_start_date']) . '' + '' . date(_('Y-m-d'), $event_config['buildup_start_date']) . '' ]); } if ($event_config['event_start_date'] != null && time() < $event_config['event_start_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ - heading(_("Event starts"), 4), + heading(_('Event starts'), 4), '%c', - '' . date(_("Y-m-d"), $event_config['event_start_date']) . '' + '' . date(_('Y-m-d'), $event_config['event_start_date']) . '' ]); } if ($event_config['event_end_date'] != null && time() < $event_config['event_end_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ - heading(_("Event ends"), 4), + heading(_('Event ends'), 4), '%c', - '' . date(_("Y-m-d"), $event_config['event_end_date']) . '' + '' . date(_('Y-m-d'), $event_config['event_end_date']) . '' ]); } if ($event_config['teardown_end_date'] != null && time() < $event_config['teardown_end_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ - heading(_("Teardown ends"), 4), + heading(_('Teardown ends'), 4), '%c', - '' . date(_("Y-m-d"), $event_config['teardown_end_date']) . '' + '' . date(_('Y-m-d'), $event_config['teardown_end_date']) . '' ]); } - return join("", $elements); + return join('', $elements); } /** @@ -69,33 +69,33 @@ function EventConfig_countdown_page($event_config) function EventConfig_info($event_config) { if ($event_config == null) { - return ""; + return ''; } // Event name, start+end date are set if ($event_config['event_name'] != null && $event_config['event_start_date'] != null && $event_config['event_end_date'] != null) { return sprintf( - _("%s, from %s to %s"), + _('%s, from %s to %s'), $event_config['event_name'], - date(_("Y-m-d"), $event_config['event_start_date']), - date(_("Y-m-d"), $event_config['event_end_date']) + date(_('Y-m-d'), $event_config['event_start_date']), + date(_('Y-m-d'), $event_config['event_end_date']) ); } // Event name, start date are set if ($event_config['event_name'] != null && $event_config['event_start_date'] != null) { return sprintf( - _("%s, starting %s"), $event_config['event_name'], - date(_("Y-m-d"), $event_config['event_start_date']) + _('%s, starting %s'), $event_config['event_name'], + date(_('Y-m-d'), $event_config['event_start_date']) ); } // Event start+end date are set if ($event_config['event_start_date'] != null && $event_config['event_end_date'] != null) { return sprintf( - _("Event from %s to %s"), - date(_("Y-m-d"), $event_config['event_start_date']), - date(_("Y-m-d"), $event_config['event_end_date']) + _('Event from %s to %s'), + date(_('Y-m-d'), $event_config['event_start_date']), + date(_('Y-m-d'), $event_config['event_end_date']) ); } @@ -104,7 +104,7 @@ function EventConfig_info($event_config) return sprintf($event_config['event_name']); } - return ""; + return ''; } /** @@ -131,23 +131,23 @@ function EventConfig_edit_view( form([ div('row', [ div('col-md-6', [ - form_text('event_name', _("Event Name"), $event_name), - form_info('', _("Event Name is shown on the start page.")), - form_textarea('event_welcome_msg', _("Event Welcome Message"), $event_welcome_msg), - form_info('', _("Welcome message is shown after successful registration. You can use markdown.")) + form_text('event_name', _('Event Name'), $event_name), + form_info('', _('Event Name is shown on the start page.')), + form_textarea('event_welcome_msg', _('Event Welcome Message'), $event_welcome_msg), + form_info('', _('Welcome message is shown after successful registration. You can use markdown.')) ]), div('col-md-3 col-xs-6', [ - form_date('buildup_start_date', _("Buildup date"), $buildup_start_date), - form_date('event_start_date', _("Event start date"), $event_start_date) + form_date('buildup_start_date', _('Buildup date'), $buildup_start_date), + form_date('event_start_date', _('Event start date'), $event_start_date) ]), div('col-md-3 col-xs-6', [ - form_date('teardown_end_date', _("Teardown end date"), $teardown_end_date), - form_date('event_end_date', _("Event end date"), $event_end_date) + form_date('teardown_end_date', _('Teardown end date'), $teardown_end_date), + form_date('event_end_date', _('Event end date'), $event_end_date) ]) ]), div('row', [ div('col-md-6', [ - form_submit('submit', _("Save")) + form_submit('submit', _('Save')) ]) ]) ]) diff --git a/includes/view/Questions_view.php b/includes/view/Questions_view.php index 3276baf6..dee7585c 100644 --- a/includes/view/Questions_view.php +++ b/includes/view/Questions_view.php @@ -9,34 +9,34 @@ function Questions_view($open_questions, $answered_questions, $ask_action) { foreach ($open_questions as &$question) { - $question['actions'] = '' . _("delete") . ''; + $question['actions'] = '' . _('delete') . ''; $question['Question'] = str_replace("\n", '
', $question['Question']); } foreach ($answered_questions as &$question) { $question['Question'] = str_replace("\n", '
', $question['Question']); $question['Answer'] = str_replace("\n", '
', $question['Answer']); - $question['actions'] = '' . _("delete") . ''; + $question['actions'] = '' . _('delete') . ''; } return page_with_title(questions_title(), [ msg(), - heading(_("Open questions"), 2), + heading(_('Open questions'), 2), table([ - 'Question' => _("Question"), - 'actions' => "" + 'Question' => _('Question'), + 'actions' => '' ], $open_questions), - heading(_("Answered questions"), 2), + heading(_('Answered questions'), 2), table([ - 'Question' => _("Question"), - 'answer_user' => _("Answered by"), - 'Answer' => _("Answer"), - 'actions' => "" + 'Question' => _('Question'), + 'answer_user' => _('Answered by'), + 'Answer' => _('Answer'), + 'actions' => '' ], $answered_questions), - heading(_("Ask the Heaven"), 2), + heading(_('Ask the Heaven'), 2), form([ - form_textarea('question', _("Your Question:"), ""), - form_submit('submit', _("Save")) + form_textarea('question', _('Your Question:'), ''), + form_submit('submit', _('Save')) ], $ask_action) ]); } diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php index e2a574e6..aad0d643 100644 --- a/includes/view/ShiftCalendarRenderer.php +++ b/includes/view/ShiftCalendarRenderer.php @@ -4,7 +4,6 @@ namespace Engelsystem; class ShiftCalendarRenderer { - /** * 15m * 60s/m = 900s */ @@ -102,7 +101,7 @@ class ShiftCalendarRenderer if ($shift_added == false) { $newLane = new ShiftCalendarLane($header, $this->getFirstBlockStartTime(), $this->getBlocksPerSlot()); if (!$newLane->addShift($shift)) { - engelsystem_error("Unable to add shift to new lane."); + engelsystem_error('Unable to add shift to new lane.'); } $lanes[$room_id][] = $newLane; } @@ -161,7 +160,7 @@ class ShiftCalendarRenderer */ private function renderShiftLanes() { - $html = ""; + $html = ''; foreach ($this->lanes as $room_lanes) { foreach ($room_lanes as $lane) { $html .= $this->renderLane($lane); @@ -182,7 +181,7 @@ class ShiftCalendarRenderer global $user; $shift_renderer = new ShiftCalendarShiftRenderer(); - $html = ""; + $html = ''; $rendered_until = $this->getFirstBlockStartTime(); foreach ($lane->getShifts() as $shift) { @@ -248,7 +247,7 @@ class ShiftCalendarRenderer { $time_slot = [ div('header', [ - _("Time") + _('Time') ]) ]; for ($block = 0; $block < $this->getBlocksPerSlot(); $block++) { diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index 1f6ceef8..8560d47d 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -18,7 +18,7 @@ class ShiftCalendarShiftRenderer */ public function render($shift, $needed_angeltypes, $shift_entries, $user) { - $info_text = ""; + $info_text = ''; if ($shift['title'] != '') { $info_text = glyph('info-sign') . $shift['title'] . '
'; } @@ -31,7 +31,7 @@ class ShiftCalendarShiftRenderer $class = $this->classForSignupState($shift_signup_state); - $blocks = ceil(($shift["end"] - $shift["start"]) / ShiftCalendarRenderer::SECONDS_PER_ROW); + $blocks = ceil(($shift['end'] - $shift['start']) / ShiftCalendarRenderer::SECONDS_PER_ROW); $blocks = max(1, $blocks); return [ $blocks, @@ -100,7 +100,7 @@ class ShiftCalendarShiftRenderer $shift_entries_filtered[$shift_entry['TID']][] = $shift_entry; } - $html = ""; + $html = ''; /** @var ShiftSignupState $shift_signup_state */ $shift_signup_state = null; foreach ($needed_angeltypes as $angeltype) { @@ -126,7 +126,7 @@ class ShiftCalendarShiftRenderer if (in_array('user_shifts_admin', $privileges)) { $html .= '
  • ' . button( page_link_to('user_shifts') . '&shift_id=' . $shift['SID'], - _("Add more angels"), + _('Add more angels'), 'btn-xs' ) . '
  • '; } @@ -138,7 +138,7 @@ class ShiftCalendarShiftRenderer } return [ $shift_signup_state, - "" + '' ]; } @@ -156,12 +156,12 @@ class ShiftCalendarShiftRenderer { $entry_list = []; foreach ($shift_entries as $entry) { - $style = $entry['freeloaded'] ? " text-decoration: line-through;" : ''; - $entry_list[] = "" . User_Nick_render($entry) . ""; + $style = $entry['freeloaded'] ? ' text-decoration: line-through;' : ''; + $entry_list[] = '' . User_Nick_render($entry) . ''; } $shift_signup_state = Shift_signup_allowed($user, $shift, $angeltype, null, null, $angeltype, $shift_entries); $inner_text = sprintf( - ngettext("%d helper needed", "%d helpers needed", $shift_signup_state->getFreeEntries()), + ngettext('%d helper needed', '%d helpers needed', $shift_signup_state->getFreeEntries()), $shift_signup_state->getFreeEntries() ); @@ -211,7 +211,7 @@ class ShiftCalendarShiftRenderer $shifts_row = '
  • '; $shifts_row .= '' . AngelType_name_render($angeltype) . ': '; - $shifts_row .= join(", ", $entry_list); + $shifts_row .= join(', ', $entry_list); $shifts_row .= '
  • '; return [ $shift_signup_state, @@ -229,7 +229,7 @@ class ShiftCalendarShiftRenderer { global $privileges; - $header_buttons = ""; + $header_buttons = ''; if (in_array('admin_shifts', $privileges)) { $header_buttons = '
    ' . table_buttons([ button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'), diff --git a/includes/view/ShiftEntry_view.php b/includes/view/ShiftEntry_view.php index 92fb1528..2e638df6 100644 --- a/includes/view/ShiftEntry_view.php +++ b/includes/view/ShiftEntry_view.php @@ -28,21 +28,21 @@ function ShiftEntry_edit_view( $freeload_form = []; if ($user_admin_shifts) { $freeload_form = [ - form_checkbox('freeloaded', _("Freeloaded"), $freeloaded), - form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment) + form_checkbox('freeloaded', _('Freeloaded'), $freeloaded), + form_textarea('freeload_comment', _('Freeload comment (Only for shift coordination):'), $freeload_comment) ]; } - return page_with_title(_("Edit shift entry"), [ + return page_with_title(_('Edit shift entry'), [ msg(), form([ - form_info(_("Angel:"), $angel), - form_info(_("Date, Duration:"), $date), - form_info(_("Location:"), $location), - form_info(_("Title:"), $title), - form_info(_("Type:"), $type), - form_textarea('comment', _("Comment (for your eyes only):"), $comment), - join("", $freeload_form), - form_submit('submit', _("Save")) + form_info(_('Angel:'), $angel), + form_info(_('Date, Duration:'), $date), + form_info(_('Location:'), $location), + form_info(_('Title:'), $title), + form_info(_('Type:'), $type), + form_textarea('comment', _('Comment (for your eyes only):'), $comment), + join('', $freeload_form), + form_submit('submit', _('Save')) ]) ]); } diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php index e5064388..d8e21347 100644 --- a/includes/view/ShiftTypes_view.php +++ b/includes/view/ShiftTypes_view.php @@ -19,13 +19,13 @@ function ShiftType_name_render($shifttype) */ function ShiftType_delete_view($shifttype) { - return page_with_title(sprintf(_("Delete shifttype %s"), $shifttype['name']), [ - info(sprintf(_("Do you want to delete shifttype %s?"), $shifttype['name']), true), + return page_with_title(sprintf(_('Delete shifttype %s'), $shifttype['name']), [ + info(sprintf(_('Do you want to delete shifttype %s?'), $shifttype['name']), true), buttons([ - button(page_link_to('shifttypes'), _("cancel"), 'cancel'), + button(page_link_to('shifttypes'), _('cancel'), 'cancel'), button( page_link_to('shifttypes') . '&action=delete&shifttype_id=' . $shifttype['id'] . '&confirmed', - _("delete"), + _('delete'), 'ok' ) ]) @@ -91,7 +91,7 @@ function ShiftType_view($shifttype, $angeltype) 'delete' ) ]), - heading(_("Description"), 2), + heading(_('Description'), 2), $parsedown->parse($shifttype['description']) ]); } diff --git a/includes/view/ShiftsFilterRenderer.php b/includes/view/ShiftsFilterRenderer.php index 051843c2..43a23ef6 100644 --- a/includes/view/ShiftsFilterRenderer.php +++ b/includes/view/ShiftsFilterRenderer.php @@ -46,7 +46,7 @@ class ShiftsFilterRenderer { $toolbar = []; if ($this->daySelectionEnabled && !empty($this->days)) { - $selected_day = date("Y-m-d", $this->shiftsFilter->getStartTime()); + $selected_day = date('Y-m-d', $this->shiftsFilter->getStartTime()); $day_dropdown_items = []; foreach ($this->days as $day) { $day_dropdown_items[] = toolbar_item_link($link_base . '&shifts_filter_day=' . $day, '', $day); diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index 41fde1e6..094af7ad 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -10,14 +10,14 @@ function Shift_editor_info_render($shift) $info = []; if ($shift['created_by_user_id'] != null) { $info[] = sprintf( - glyph('plus') . _("created at %s by %s"), + glyph('plus') . _('created at %s by %s'), date('Y-m-d H:i', $shift['created_at_timestamp']), User_Nick_render(User($shift['created_by_user_id'])) ); } if ($shift['edited_by_user_id'] != null) { $info[] = sprintf( - glyph('pencil') . _("edited at %s by %s"), + glyph('pencil') . _('edited at %s by %s'), date('Y-m-d H:i', $shift['edited_at_timestamp']), User_Nick_render(User($shift['edited_by_user_id'])) ); @@ -226,7 +226,7 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty */ function shift_length($shift) { - $length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ":"; - $length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, "0", STR_PAD_LEFT) . "h"; + $length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ':'; + $length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, '0', STR_PAD_LEFT) . 'h'; return $length; } diff --git a/includes/view/UserAngelTypes_view.php b/includes/view/UserAngelTypes_view.php index 9f978bc7..15d99961 100644 --- a/includes/view/UserAngelTypes_view.php +++ b/includes/view/UserAngelTypes_view.php @@ -9,23 +9,23 @@ */ function UserAngelType_update_view($user_angeltype, $user, $angeltype, $supporter) { - return page_with_title($supporter ? _("Add supporter rights") : _("Remove supporter rights"), [ + return page_with_title($supporter ? _('Add supporter rights') : _('Remove supporter rights'), [ msg(), info(sprintf( $supporter - ? _("Do you really want to add supporter rights for %s to %s?") - : _("Do you really want to remove supporter rights for %s from %s?"), + ? _('Do you really want to add supporter rights for %s to %s?') + : _('Do you really want to remove supporter rights for %s from %s?'), $angeltype['name'], User_Nick_render($user) ), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $user_angeltype['id'] . '&supporter=' . ($supporter ? '1' : '0') . '&confirmed', - _("yes"), + _('yes'), 'ok' ) ]) @@ -38,14 +38,14 @@ function UserAngelType_update_view($user_angeltype, $user, $angeltype, $supporte */ function UserAngelTypes_delete_all_view($angeltype) { - return page_with_title(_("Deny all users"), [ + return page_with_title(_('Deny all users'), [ msg(), - info(sprintf(_("Do you really want to deny all users for %s?"), $angeltype['name']), true), + info(sprintf(_('Do you really want to deny all users for %s?'), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'] . '&confirmed', - _("yes"), + _('yes'), 'ok' ) ]) @@ -58,14 +58,14 @@ function UserAngelTypes_delete_all_view($angeltype) */ function UserAngelTypes_confirm_all_view($angeltype) { - return page_with_title(_("Confirm all users"), [ + return page_with_title(_('Confirm all users'), [ msg(), - info(sprintf(_("Do you really want to confirm all users for %s?"), $angeltype['name']), true), + info(sprintf(_('Do you really want to confirm all users for %s?'), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'] . '&confirmed', - _("yes"), + _('yes'), 'ok' ) ]) @@ -80,14 +80,14 @@ function UserAngelTypes_confirm_all_view($angeltype) */ function UserAngelType_confirm_view($user_angeltype, $user, $angeltype) { - return page_with_title(_("Confirm angeltype for user"), [ + return page_with_title(_('Confirm angeltype for user'), [ msg(), - info(sprintf(_("Do you really want to confirm %s for %s?"), User_Nick_render($user), $angeltype['name']), true), + info(sprintf(_('Do you really want to confirm %s for %s?'), User_Nick_render($user), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed', - _("yes"), + _('yes'), 'ok' ) ]) @@ -102,14 +102,14 @@ function UserAngelType_confirm_view($user_angeltype, $user, $angeltype) */ function UserAngelType_delete_view($user_angeltype, $user, $angeltype) { - return page_with_title(_("Remove angeltype"), [ + return page_with_title(_('Remove angeltype'), [ msg(), - info(sprintf(_("Do you really want to delete %s from %s?"), User_Nick_render($user), $angeltype['name']), true), + info(sprintf(_('Do you really want to delete %s from %s?'), User_Nick_render($user), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed', - _("yes"), + _('yes'), 'ok' ) ]) @@ -129,15 +129,15 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id) $users[$user_source['UID']] = User_Nick_render($user_source); } - return page_with_title(_("Add user to angeltype"), [ + return page_with_title(_('Add user to angeltype'), [ msg(), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("back"), 'back') + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('back'), 'back') ]), form([ - form_info(_("Angeltype"), $angeltype['name']), - form_select('user_id', _("User"), $users, $user_id), - form_submit('submit', _("Add")) + form_info(_('Angeltype'), $angeltype['name']), + form_select('user_id', _('User'), $users, $user_id), + form_submit('submit', _('Add')) ]) ]); } @@ -149,14 +149,14 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id) */ function UserAngelType_join_view($user, $angeltype) { - return page_with_title(sprintf(_("Become a %s"), $angeltype['name']), [ + return page_with_title(sprintf(_('Become a %s'), $angeltype['name']), [ msg(), - info(sprintf(_("Do you really want to add %s to %s?"), User_Nick_render($user), $angeltype['name']), true), + info(sprintf(_('Do you really want to add %s to %s?'), User_Nick_render($user), $angeltype['name']), true), buttons([ - button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'), + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'), button( page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '&user_id=' . $user['UID'] . '&confirmed', - _("save"), + _('save'), 'ok' ) ]) diff --git a/includes/view/UserDriverLicenses_view.php b/includes/view/UserDriverLicenses_view.php index 3241ade5..320966ef 100644 --- a/includes/view/UserDriverLicenses_view.php +++ b/includes/view/UserDriverLicenses_view.php @@ -10,42 +10,42 @@ */ function UserDriverLicense_edit_view($user_source, $wants_to_drive, $user_driver_license) { - return page_with_title(sprintf(_("Edit %s driving license information"), User_Nick_render($user_source)), [ + return page_with_title(sprintf(_('Edit %s driving license information'), User_Nick_render($user_source)), [ buttons([ - button(user_link($user_source), _("Back to profile"), 'back') + button(user_link($user_source), _('Back to profile'), 'back') ]), msg(), form([ - form_info(_("Privacy"), _("Your driving license information is only visible for supporters and admins.")), - form_checkbox('wants_to_drive', _("I am willing to operate cars for the PL"), $wants_to_drive), + form_info(_('Privacy'), _('Your driving license information is only visible for supporters and admins.')), + form_checkbox('wants_to_drive', _('I am willing to operate cars for the PL'), $wants_to_drive), div('panel panel-default', [ div('panel-body', [ form_checkbox( 'has_car', - _("I have my own car with me and am willing to use it for the PL (You'll get reimbursed for fuel)"), + _('I have my own car with me and am willing to use it for the PL (You\'ll get reimbursed for fuel)'), $user_driver_license['has_car'] ), - heading(_("Driver license"), 3), - form_checkbox('has_license_car', _("Car"), $user_driver_license['has_license_car']), + heading(_('Driver license'), 3), + form_checkbox('has_license_car', _('Car'), $user_driver_license['has_license_car']), form_checkbox( 'has_license_3_5t_transporter', - _("Transporter 3,5t"), + _('Transporter 3,5t'), $user_driver_license['has_license_3_5t_transporter'] ), form_checkbox( 'has_license_7_5t_truck', - _("Truck 7,5t"), + _('Truck 7,5t'), $user_driver_license['has_license_7_5t_truck'] ), form_checkbox( 'has_license_12_5t_truck', - _("Truck 12,5t"), + _('Truck 12,5t'), $user_driver_license['has_license_12_5t_truck'] ), - form_checkbox('has_license_forklift', _("Forklift"), $user_driver_license['has_license_forklift']) + form_checkbox('has_license_forklift', _('Forklift'), $user_driver_license['has_license_forklift']) ]) ], 'driving_license'), - form_submit('submit', _("Save")) + form_submit('submit', _('Save')) ]), '