summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_active.php86
-rw-r--r--includes/pages/admin_arrive.php66
-rw-r--r--includes/pages/admin_free.php20
-rw-r--r--includes/pages/admin_groups.php12
-rw-r--r--includes/pages/admin_import.php116
-rw-r--r--includes/pages/admin_log.php6
-rw-r--r--includes/pages/admin_news.php22
-rw-r--r--includes/pages/admin_questions.php28
-rw-r--r--includes/pages/admin_rooms.php48
-rw-r--r--includes/pages/admin_shifts.php70
-rw-r--r--includes/pages/admin_user.php25
-rw-r--r--includes/pages/guest_credits.php2
-rw-r--r--includes/pages/guest_login.php114
-rw-r--r--includes/pages/user_messages.php34
-rw-r--r--includes/pages/user_myshifts.php14
-rw-r--r--includes/pages/user_news.php30
-rw-r--r--includes/pages/user_questions.php10
-rw-r--r--includes/pages/user_settings.php32
-rw-r--r--includes/pages/user_shifts.php50
19 files changed, 382 insertions, 403 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 33a7e01e..7aeb249f 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_active_title()
{
- return _('Active angels');
+ return __('Active angels');
}
/**
@@ -39,14 +39,14 @@ function admin_active()
$count = strip_request_item('count');
if ($count < $forced_count) {
error(sprintf(
- _('At least %s angels are forced to be active. The number has to be greater.'),
+ __('At least %s angels are forced to be active. The number has to be greater.'),
$forced_count
));
redirect(page_link_to('admin_active'));
}
} else {
$valid = false;
- $msg .= error(_('Please enter a number of angels to be marked as active.'), true);
+ $msg .= error(__('Please enter a number of angels to be marked as active.'), true);
}
if ($valid) {
@@ -84,16 +84,16 @@ function admin_active()
engelsystem_log('These angels are active now: ' . join(', ', $user_nicks));
$limit = '';
- $msg = success(_('Marked angels.'), true);
+ $msg = success(__('Marked angels.'), true);
} else {
$set_active = '<a href="' . page_link_to('admin_active', ['search' => $search]) . '">&laquo; '
- . _('back')
+ . __('back')
. '</a> | <a href="'
. page_link_to(
'admin_active',
['search' => $search, 'count' => $count, 'set_active' => 1, 'ack' => 1]
) . '">'
- . _('apply')
+ . __('apply')
. '</a>';
}
}
@@ -104,9 +104,9 @@ function admin_active()
if (!empty($user_source)) {
DB::update('UPDATE `User` SET `Aktiv`=1 WHERE `UID`=? LIMIT 1', [$user_id]);
engelsystem_log('User ' . User_Nick_render($user_source) . ' is active now.');
- $msg = success(_('Angel has been marked as active.'), true);
+ $msg = success(__('Angel has been marked as active.'), true);
} else {
- $msg = error(_('Angel not found.'), true);
+ $msg = error(__('Angel not found.'), true);
}
} elseif ($request->has('not_active') && preg_match('/^\d+$/', $request->input('not_active'))) {
$user_id = $request->input('not_active');
@@ -114,9 +114,9 @@ function admin_active()
if (!empty($user_source)) {
DB::update('UPDATE `User` SET `Aktiv`=0 WHERE `UID`=? LIMIT 1', [$user_id]);
engelsystem_log('User ' . User_Nick_render($user_source) . ' is NOT active now.');
- $msg = success(_('Angel has been marked as not active.'), true);
+ $msg = success(__('Angel has been marked as not active.'), true);
} else {
- $msg = error(_('Angel not found.'), true);
+ $msg = error(__('Angel not found.'), true);
}
} elseif ($request->has('tshirt') && preg_match('/^\d+$/', $request->input('tshirt'))) {
$user_id = $request->input('tshirt');
@@ -124,7 +124,7 @@ function admin_active()
if (!empty($user_source)) {
DB::update('UPDATE `User` SET `Tshirt`=1 WHERE `UID`=? LIMIT 1', [$user_id]);
engelsystem_log('User ' . User_Nick_render($user_source) . ' has tshirt now.');
- $msg = success(_('Angel has got a t-shirt.'), true);
+ $msg = success(__('Angel has got a t-shirt.'), true);
} else {
$msg = error('Angel not found.', true);
}
@@ -134,9 +134,9 @@ function admin_active()
if (!empty($user_source)) {
DB::update('UPDATE `User` SET `Tshirt`=0 WHERE `UID`=? LIMIT 1', [$user_id]);
engelsystem_log('User ' . User_Nick_render($user_source) . ' has NO tshirt.');
- $msg = success(_('Angel has got no t-shirt.'), true);
+ $msg = success(__('Angel has got no t-shirt.'), true);
} else {
- $msg = error(_('Angel not found.'), true);
+ $msg = error(__('Angel not found.'), true);
}
}
@@ -197,7 +197,7 @@ function admin_active()
$parameters['show_all_shifts'] = 1;
}
$actions[] = '<a href="' . page_link_to('admin_active', $parameters) . '">'
- . _('set active')
+ . __('set active')
. '</a>';
}
if ($usr['Aktiv'] == 1) {
@@ -209,7 +209,7 @@ function admin_active()
$parametersRemove['show_all_shifts'] = 1;
}
$actions[] = '<a href="' . page_link_to('admin_active', $parametersRemove) . '">'
- . _('remove active')
+ . __('remove active')
. '</a>';
}
if ($usr['Tshirt'] == 0) {
@@ -221,7 +221,7 @@ function admin_active()
$parametersShirt['show_all_shifts'] = 1;
}
$actions[] = '<a href="' . page_link_to('admin_active', $parametersShirt) . '">'
- . _('got t-shirt')
+ . __('got t-shirt')
. '</a>';
}
if ($usr['Tshirt'] == 1) {
@@ -233,7 +233,7 @@ function admin_active()
$parameters['show_all_shifts'] = 1;
}
$actions[] = '<a href="' . page_link_to('admin_active', $parameters) . '">'
- . _('remove t-shirt')
+ . __('remove t-shirt')
. '</a>';
}
@@ -244,52 +244,50 @@ function admin_active()
$shirt_statistics = [];
foreach (array_keys($tshirt_sizes) as $size) {
- if (!empty($size)) {
- $gc = DB::selectOne(
- 'SELECT count(*) FROM `User` WHERE `Size`=? AND `Tshirt`=1',
- [$size]
- );
- $gc = array_shift($gc);
+ $gc = DB::selectOne(
+ 'SELECT count(*) FROM `User` WHERE `Size`=? AND `Tshirt`=1',
+ [$size]
+ );
+ $gc = array_shift($gc);
- $shirt_statistics[] = [
- 'size' => $size,
- 'given' => (int)$gc
- ];
- }
+ $shirt_statistics[] = [
+ 'size' => $size,
+ 'given' => (int)$gc
+ ];
}
$shirtCount = User_tshirts_count();
$shirt_statistics[] = [
- 'size' => '<b>' . _('Sum') . '</b>',
+ 'size' => '<b>' . __('Sum') . '</b>',
'given' => '<b>' . $shirtCount . '</b>'
];
return page_with_title(admin_active_title(), [
form([
- form_text('search', _('Search angel:'), $search),
- form_checkbox('show_all_shifts', _('Show all shifts'), $show_all_shifts),
- form_submit('submit', _('Search'))
+ form_text('search', __('Search angel:'), $search),
+ form_checkbox('show_all_shifts', __('Show all shifts'), $show_all_shifts),
+ form_submit('submit', __('Search'))
], page_link_to('admin_active')),
$set_active == '' ? form([
- form_text('count', _('How much angels should be active?'), $count),
- form_submit('set_active', _('Preview'))
+ form_text('count', __('How much angels should be active?'), $count),
+ form_submit('set_active', __('Preview'))
]) : $set_active,
$msg . msg(),
table([
- 'nick' => _('Nickname'),
- 'shirt_size' => _('Size'),
- 'shift_count' => _('Shifts'),
- 'work_time' => _('Length'),
- 'active' => _('Active?'),
- 'force_active' => _('Forced'),
- 'tshirt' => _('T-shirt?'),
+ 'nick' => __('Nickname'),
+ 'shirt_size' => __('Size'),
+ 'shift_count' => __('Shifts'),
+ 'work_time' => __('Length'),
+ 'active' => __('Active?'),
+ 'force_active' => __('Forced'),
+ 'tshirt' => __('T-shirt?'),
'actions' => ''
], $matched_users),
- '<h2>' . _('Shirt statistics') . '</h2>',
+ '<h2>' . __('Shirt statistics') . '</h2>',
table([
- 'size' => _('Size'),
- 'given' => _('Given shirts')
+ 'size' => __('Size'),
+ 'given' => __('Given shirts')
], $shirt_statistics)
]);
}
diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php
index b1c38453..cb03437f 100644
--- a/includes/pages/admin_arrive.php
+++ b/includes/pages/admin_arrive.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_arrive_title()
{
- return _('Arrived angels');
+ return __('Arrived angels');
}
/**
@@ -35,10 +35,10 @@ function admin_arrive()
LIMIT 1
', [$user_id]);
engelsystem_log('User set to not arrived: ' . User_Nick_render($user_source));
- success(_('Reset done. Angel has not arrived.'));
+ success(__('Reset done. Angel has not arrived.'));
redirect(user_link($user_source));
} else {
- $msg = error(_('Angel not found.'), true);
+ $msg = error(__('Angel not found.'), true);
}
} elseif ($request->has('arrived') && preg_match('/^\d+$/', $request->input('arrived'))) {
$user_id = $request->input('arrived');
@@ -51,10 +51,10 @@ function admin_arrive()
LIMIT 1
', [time(), $user_id]);
engelsystem_log('User set has arrived: ' . User_Nick_render($user_source));
- success(_('Angel has been marked as arrived.'));
+ success(__('Angel has been marked as arrived.'));
redirect(user_link($user_source));
} else {
- $msg = error(_('Angel not found.'), true);
+ $msg = error(__('Angel not found.'), true);
}
}
@@ -91,16 +91,16 @@ function admin_arrive()
}
$usr['rendered_planned_arrival_date'] = date('Y-m-d', $usr['planned_arrival_date']);
$usr['rendered_arrival_date'] = $usr['arrival_date'] > 0 ? date('Y-m-d', $usr['arrival_date']) : '-';
- $usr['arrived'] = $usr['Gekommen'] == 1 ? _('yes') : '';
+ $usr['arrived'] = $usr['Gekommen'] == 1 ? __('yes') : '';
$usr['actions'] = $usr['Gekommen'] == 1
? '<a href="' . page_link_to(
'admin_arrive',
['reset' => $usr['UID'], 'search' => $search]
- ) . '">' . _('reset') . '</a>'
+ ) . '">' . __('reset') . '</a>'
: '<a href="' . page_link_to(
'admin_arrive',
['arrived' => $usr['UID'], 'search' => $search]
- ) . '">' . _('arrived') . '</a>';
+ ) . '">' . __('arrived') . '</a>';
if ($usr['arrival_date'] > 0) {
$day = date('Y-m-d', $usr['arrival_date']);
@@ -169,61 +169,61 @@ function admin_arrive()
return page_with_title(admin_arrive_title(), [
$msg . msg(),
form([
- form_text('search', _('Search'), $search),
- form_submit('submit', _('Search'))
+ form_text('search', __('Search'), $search),
+ form_submit('submit', __('Search'))
]),
table([
- 'nick' => _('Nickname'),
- 'rendered_planned_arrival_date' => _('Planned arrival'),
- 'arrived' => _('Arrived?'),
- 'rendered_arrival_date' => _('Arrival date'),
- 'rendered_planned_departure_date' => _('Planned departure'),
+ 'nick' => __('Nickname'),
+ 'rendered_planned_arrival_date' => __('Planned arrival'),
+ 'arrived' => __('Arrived?'),
+ 'rendered_arrival_date' => __('Arrival date'),
+ 'rendered_planned_departure_date' => __('Planned departure'),
'actions' => ''
], $users_matched),
div('row', [
div('col-md-4', [
- heading(_('Planned arrival statistics'), 2),
+ heading(__('Planned arrival statistics'), 2),
bargraph('planned_arrives', 'day', [
- 'count' => _('arrived'),
- 'sum' => _('arrived sum')
+ 'count' => __('arrived'),
+ 'sum' => __('arrived sum')
], [
'count' => '#090',
'sum' => '#888'
], $planned_arrival_at_day),
table([
- 'day' => _('Date'),
- 'count' => _('Count'),
- 'sum' => _('Sum')
+ 'day' => __('Date'),
+ 'count' => __('Count'),
+ 'sum' => __('Sum')
], $planned_arrival_at_day)
]),
div('col-md-4', [
- heading(_('Arrival statistics'), 2),
+ heading(__('Arrival statistics'), 2),
bargraph('arrives', 'day', [
- 'count' => _('arrived'),
- 'sum' => _('arrived sum')
+ 'count' => __('arrived'),
+ 'sum' => __('arrived sum')
], [
'count' => '#090',
'sum' => '#888'
], $arrival_at_day),
table([
- 'day' => _('Date'),
- 'count' => _('Count'),
- 'sum' => _('Sum')
+ 'day' => __('Date'),
+ 'count' => __('Count'),
+ 'sum' => __('Sum')
], $arrival_at_day)
]),
div('col-md-4', [
- heading(_('Planned departure statistics'), 2),
+ heading(__('Planned departure statistics'), 2),
bargraph('planned_departures', 'day', [
- 'count' => _('arrived'),
- 'sum' => _('arrived sum')
+ 'count' => __('arrived'),
+ 'sum' => __('arrived sum')
], [
'count' => '#090',
'sum' => '#888'
], $planned_departure_at_day),
table([
- 'day' => _('Date'),
- 'count' => _('Count'),
- 'sum' => _('Sum')
+ 'day' => __('Date'),
+ 'count' => __('Count'),
+ 'sum' => __('Sum')
], $planned_departure_at_day)
])
])
diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php
index a3c0d17f..d1d102c7 100644
--- a/includes/pages/admin_free.php
+++ b/includes/pages/admin_free.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_free_title()
{
- return _('Free angels');
+ return __('Free angels');
}
/**
@@ -94,7 +94,7 @@ function admin_free()
'email' => $usr['email_by_human_allowed'] ? $usr['email'] : glyph('eye-close'),
'actions' =>
in_array('admin_user', $privileges)
- ? button(page_link_to('admin_user', ['id' => $usr['UID']]), _('edit'), 'btn-xs')
+ ? button(page_link_to('admin_user', ['id' => $usr['UID']]), __('edit'), 'btn-xs')
: ''
];
}
@@ -102,25 +102,25 @@ function admin_free()
form([
div('row', [
div('col-md-4', [
- form_text('search', _('Search'), $search)
+ form_text('search', __('Search'), $search)
]),
div('col-md-4', [
- form_select('angeltype', _('Angeltype'), $angel_types, $angelType)
+ form_select('angeltype', __('Angeltype'), $angel_types, $angelType)
]),
div('col-md-2', [
- form_checkbox('confirmed_only', _('Only confirmed'), $request->has('confirmed_only'))
+ form_checkbox('confirmed_only', __('Only confirmed'), $request->has('confirmed_only'))
]),
div('col-md-2', [
- form_submit('submit', _('Search'))
+ form_submit('submit', __('Search'))
])
])
]),
table([
- 'name' => _('Nick'),
+ 'name' => __('Nick'),
'shift_state' => '',
- 'dect' => _('DECT'),
- 'jabber' => _('Jabber'),
- 'email' => _('E-Mail'),
+ 'dect' => __('DECT'),
+ 'jabber' => __('Jabber'),
+ 'email' => __('E-Mail'),
'actions' => ''
], $free_users_table)
]);
diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php
index 92b6a3ea..727d7be5 100644
--- a/includes/pages/admin_groups.php
+++ b/includes/pages/admin_groups.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_groups_title()
{
- return _('Grouprights');
+ return __('Grouprights');
}
/**
@@ -40,7 +40,7 @@ function admin_groups()
'actions' => button(
page_link_to('admin_groups',
['action' => 'edit', 'id' => $group['UID']]),
- _('edit'),
+ __('edit'),
'btn-xs'
)
];
@@ -48,8 +48,8 @@ function admin_groups()
return page_with_title(admin_groups_title(), [
table([
- 'name' => _('Name'),
- 'privileges' => _('Privileges'),
+ 'name' => __('Name'),
+ 'privileges' => __('Privileges'),
'actions' => ''
], $groups_table)
]);
@@ -97,8 +97,8 @@ function admin_groups()
);
}
- $privileges_form[] = form_submit('submit', _('Save'));
- $html .= page_with_title(_('Edit group'), [
+ $privileges_form[] = form_submit('submit', __('Save'));
+ $html .= page_with_title(__('Edit group'), [
form(
$privileges_form,
page_link_to('admin_groups', ['action' => 'save', 'id' => $group_id])
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php
index 3688259b..29aa719b 100644
--- a/includes/pages/admin_import.php
+++ b/includes/pages/admin_import.php
@@ -5,7 +5,7 @@
*/
function admin_import_title()
{
- return _('Frab import');
+ return __('Frab import');
}
/**
@@ -35,7 +35,7 @@ function admin_import()
fclose($test_handle);
@unlink($import_dir . '/tmp');
} catch (Exception $e) {
- error(_('Webserver has no write-permission on import directory.'));
+ error(__('Webserver has no write-permission on import directory.'));
}
$import_file = $import_dir . '/import_' . $user['UID'] . '.xml';
@@ -60,7 +60,7 @@ function admin_import()
$shifttype_id = $request->input('shifttype_id');
} else {
$valid = false;
- error(_('Please select a shift type.'));
+ error(__('Please select a shift type.'));
}
$minutes_start = trim($request->input('add_minutes_start'));
@@ -68,14 +68,14 @@ function admin_import()
$add_minutes_start = $minutes_start;
} else {
$valid = false;
- error(_('Please enter an amount of minutes to add to a talk\'s begin.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s begin.'));
}
if ($request->has('add_minutes_end') && is_numeric(trim($request->input('add_minutes_end')))) {
$add_minutes_end = trim($request->input('add_minutes_end'));
} else {
$valid = false;
- error(_('Please enter an amount of minutes to add to a talk\'s end.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s end.'));
}
if (isset($_FILES['xcal_file']) && ($_FILES['xcal_file']['error'] == 0)) {
@@ -83,16 +83,16 @@ function admin_import()
libxml_use_internal_errors(true);
if (simplexml_load_file($import_file) === false) {
$valid = false;
- error(_('No valid xml/xcal file provided.'));
+ error(__('No valid xml/xcal file provided.'));
unlink($import_file);
}
} else {
$valid = false;
- error(_('File upload went wrong.'));
+ error(__('File upload went wrong.'));
}
} else {
$valid = false;
- error(_('Please provide some data.'));
+ error(__('Please provide some data.'));
}
}
@@ -107,23 +107,23 @@ function admin_import()
);
} else {
$html .= div('well well-sm text-center', [
- _('File Upload')
+ __('File Upload')
. mute(glyph('arrow-right'))
- . mute(_('Validation'))
+ . mute(__('Validation'))
. mute(glyph('arrow-right'))
- . mute(_('Import'))
+ . mute(__('Import'))
]) . div('row', [
div('col-md-offset-3 col-md-6', [
form([
form_info(
'',
- _('This import will create/update/delete rooms and shifts by given FRAB-export file. The needed file format is xcal.')
+ __('This import will create/update/delete rooms and shifts by given FRAB-export file. The needed file format is xcal.')
),
- form_select('shifttype_id', _('Shifttype'), $shifttypes, $shifttype_id),
- form_spinner('add_minutes_start', _('Add minutes to start'), $add_minutes_start),
- form_spinner('add_minutes_end', _('Add minutes to end'), $add_minutes_end),
- form_file('xcal_file', _('xcal-File (.xcal)')),
- form_submit('submit', _('Import'))
+ form_select('shifttype_id', __('Shifttype'), $shifttypes, $shifttype_id),
+ form_spinner('add_minutes_start', __('Add minutes to start'), $add_minutes_start),
+ form_spinner('add_minutes_end', __('Add minutes to end'), $add_minutes_end),
+ form_file('xcal_file', __('xcal-File (.xcal)')),
+ form_submit('submit', __('Import'))
])
])
]);
@@ -132,28 +132,28 @@ function admin_import()
case 'check':
if (!file_exists($import_file)) {
- error(_('Missing import file.'));
+ error(__('Missing import file.'));
redirect(page_link_to('admin_import'));
}
if ($request->has('shifttype_id') && isset($shifttypes[$request->input('shifttype_id')])) {
$shifttype_id = $request->input('shifttype_id');
} else {
- error(_('Please select a shift type.'));
+ error(__('Please select a shift type.'));
redirect(page_link_to('admin_import'));
}
if ($request->has('add_minutes_start') && is_numeric(trim($request->input('add_minutes_start')))) {
$add_minutes_start = trim($request->input('add_minutes_start'));
} else {
- error(_('Please enter an amount of minutes to add to a talk\'s begin.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s begin.'));
redirect(page_link_to('admin_import'));
}
if ($request->has('add_minutes_end') && is_numeric(trim($request->input(('add_minutes_end'))))) {
$add_minutes_end = trim($request->input('add_minutes_end'));
} else {
- error(_('Please enter an amount of minutes to add to a talk\'s end.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s end.'));
redirect(page_link_to('admin_import'));
}
@@ -168,53 +168,53 @@ function admin_import()
$html .= div(
'well well-sm text-center',
[
- '<span class="text-success">' . _('File Upload') . glyph('ok-circle') . '</span>'
+ '<span class="text-success">' . __('File Upload') . glyph('ok-circle') . '</span>'
. mute(glyph('arrow-right'))
- . _('Validation')
+ . __('Validation')
. mute(glyph('arrow-right'))
- . mute(_('Import'))
+ . mute(__('Import'))
]
)
. form(
[
div('row', [
div('col-sm-6', [
- '<h3>' . _('Rooms to create') . '</h3>',
- table(_('Name'), $rooms_new)
+ '<h3>' . __('Rooms to create') . '</h3>',
+ table(__('Name'), $rooms_new)
]),
div('col-sm-6', [
- '<h3>' . _('Rooms to delete') . '</h3>',
- table(_('Name'), $rooms_deleted)
+ '<h3>' . __('Rooms to delete') . '</h3>',
+ table(__('Name'), $rooms_deleted)
])
]),
- '<h3>' . _('Shifts to create') . '</h3>',
+ '<h3>' . __('Shifts to create') . '</h3>',
table([
- 'day' => _('Day'),
- 'start' => _('Start'),
- 'end' => _('End'),
- 'shifttype' => _('Shift type'),
- 'title' => _('Title'),
- 'room' => _('Room')
+ 'day' => __('Day'),
+ 'start' => __('Start'),
+ 'end' => __('End'),
+ 'shifttype' => __('Shift type'),
+ 'title' => __('Title'),
+ 'room' => __('Room')
], shifts_printable($events_new, $shifttypes)),
- '<h3>' . _('Shifts to update') . '</h3>',
+ '<h3>' . __('Shifts to update') . '</h3>',
table([
- 'day' => _('Day'),
- 'start' => _('Start'),
- 'end' => _('End'),
- 'shifttype' => _('Shift type'),
- 'title' => _('Title'),
- 'room' => _('Room')
+ 'day' => __('Day'),
+ 'start' => __('Start'),
+ 'end' => __('End'),
+ 'shifttype' => __('Shift type'),
+ 'title' => __('Title'),
+ 'room' => __('Room')
], shifts_printable($events_updated, $shifttypes)),
- '<h3>' . _('Shifts to delete') . '</h3>',
+ '<h3>' . __('Shifts to delete') . '</h3>',
table([
- 'day' => _('Day'),
- 'start' => _('Start'),
- 'end' => _('End'),
- 'shifttype' => _('Shift type'),
- 'title' => _('Title'),
- 'room' => _('Room')
+ 'day' => __('Day'),
+ 'start' => __('Start'),
+ 'end' => __('End'),
+ 'shifttype' => __('Shift type'),
+ 'title' => __('Title'),
+ 'room' => __('Room')
], shifts_printable($events_deleted, $shifttypes)),
- form_submit('submit', _('Import'))
+ form_submit('submit', __('Import'))
],
page_link_to('admin_import', [
'step' => 'import',
@@ -227,7 +227,7 @@ function admin_import()
case 'import':
if (!file_exists($import_file)) {
- error(_('Missing import file.'));
+ error(__('Missing import file.'));
redirect(page_link_to('admin_import'));
}
@@ -238,21 +238,21 @@ function admin_import()
if ($request->has('shifttype_id') && isset($shifttypes[$request->input('shifttype_id')])) {
$shifttype_id = $request->input('shifttype_id');
} else {
- error(_('Please select a shift type.'));
+ error(__('Please select a shift type.'));
redirect(page_link_to('admin_import'));
}
if ($request->has('add_minutes_start') && is_numeric(trim($request->input('add_minutes_start')))) {
$add_minutes_start = trim($request->input('add_minutes_start'));
} else {
- error(_('Please enter an amount of minutes to add to a talk\'s begin.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s begin.'));
redirect(page_link_to('admin_import'));
}
if ($request->has('add_minutes_end') && is_numeric(trim($request->input('add_minutes_end')))) {
$add_minutes_end = trim($request->input('add_minutes_end'));
} else {
- error(_('Please enter an amount of minutes to add to a talk\'s end.'));
+ error(__('Please enter an amount of minutes to add to a talk\'s end.'));
redirect(page_link_to('admin_import'));
}
@@ -288,12 +288,12 @@ function admin_import()
unlink($import_file);
$html .= div('well well-sm text-center', [
- '<span class="text-success">' . _('File Upload') . glyph('ok-circle') . '</span>'
+ '<span class="text-success">' . __('File Upload') . glyph('ok-circle') . '</span>'
. mute(glyph('arrow-right'))
- . '<span class="text-success">' . _('Validation') . glyph('ok-circle') . '</span>'
+ . '<span class="text-success">' . __('Validation') . glyph('ok-circle') . '</span>'
. mute(glyph('arrow-right'))
- . '<span class="text-success">' . _('Import') . glyph('ok-circle') . '</span>'
- ]) . success(_('It\'s done!'), true);
+ . '<span class="text-success">' . __('Import') . glyph('ok-circle') . '</span>'
+ ]) . success(__('It\'s done!'), true);
break;
default:
redirect(page_link_to('admin_import'));
diff --git a/includes/pages/admin_log.php b/includes/pages/admin_log.php
index 694b1d5a..f80f59d2 100644
--- a/includes/pages/admin_log.php
+++ b/includes/pages/admin_log.php
@@ -5,7 +5,7 @@
*/
function admin_log_title()
{
- return _('Log');
+ return __('Log');
}
/**
@@ -26,8 +26,8 @@ function admin_log()
return page_with_title(admin_log_title(), [
msg(),
form([
- form_text('keyword', _('Search'), $filter),
- form_submit(_('Search'), 'Go')
+ form_text('keyword', __('Search'), $filter),
+ form_submit(__('Search'), 'Go')
]),
table([
'date' => 'Time',
diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php
index 7f912773..8a3fe9c2 100644
--- a/includes/pages/admin_news.php
+++ b/includes/pages/admin_news.php
@@ -14,7 +14,7 @@ function admin_news()
redirect(page_link_to('news'));
}
- $html = '<div class="col-md-12"><h1>' . _('Edit news entry') . '</h1>' . msg();
+ $html = '<div class="col-md-12"><h1>' . __('Edit news entry') . '</h1>' . msg();
if ($request->has('id') && preg_match('/^\d{1,11}$/', $request->input('id'))) {
$news_id = $request->input('id');
} else {
@@ -34,19 +34,19 @@ function admin_news()
&& strip_tags($news['Text']) != $news['Text']
) {
$html .= warning(
- _('This message contains HTML. After saving the post some formatting will be lost!'),
+ __('This message contains HTML. After saving the post some formatting will be lost!'),
true
);
}
$html .= form(
[
- form_info(_('Date'), date('Y-m-d H:i', $news['Datum'])),
- form_info(_('Author'), User_Nick_render($user_source)),
- form_text('eBetreff', _('Subject'), $news['Betreff']),
- form_textarea('eText', _('Message'), $news['Text']),
- form_checkbox('eTreffen', _('Meeting'), $news['Treffen'] == 1, 1),
- form_submit('submit', _('Save'))
+ form_info(__('Date'), date('Y-m-d H:i', $news['Datum'])),
+ form_info(__('Author'), User_Nick_render($user_source)),
+ form_text('eBetreff', __('Subject'), $news['Betreff']),
+ form_textarea('eText', __('Message'), $news['Text']),
+ form_checkbox('eTreffen', __('Meeting'), $news['Treffen'] == 1, 1),
+ form_submit('submit', __('Save'))
],
page_link_to('admin_news', ['action' => 'save', 'id' => $news_id])
);
@@ -54,7 +54,7 @@ function admin_news()
$html .= '<a class="btn btn-danger" href="'
. page_link_to('admin_news', ['action' => 'delete', 'id' => $news_id])
. '">'
- . '<span class="glyphicon glyphicon-trash"></span> ' . _('Delete')
+ . '<span class="glyphicon glyphicon-trash"></span> ' . __('Delete')
. '</a>';
break;
@@ -84,14 +84,14 @@ function admin_news()
);
engelsystem_log('News updated: ' . $request->postData('eBetreff'));
- success(_('News entry updated.'));
+ success(__('News entry updated.'));
redirect(page_link_to('news'));
break;
case 'delete':
DB::delete('DELETE FROM `News` WHERE `ID`=? LIMIT 1', [$news_id]);
engelsystem_log('News deleted: ' . $news['Betreff']);
- success(_('News entry deleted.'));
+ success(__('News entry deleted.'));
redirect(page_link_to('news'));
break;
default:
diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php
index 2d058b0d..b4a956d5 100644
--- a/includes/pages/admin_questions.php
+++ b/includes/pages/admin_questions.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_questions_title()
{
- return _('Answer questions');
+ return __('Answer questions');
}
/**
@@ -25,7 +25,7 @@ function admin_new_questions()
if ($new_messages > 0) {
return '<a href="' . page_link_to('admin_questions') . '">'
- . _('There are unanswered questions!')
+ . __('There are unanswered questions!')
. '</a>';
}
}
@@ -53,11 +53,11 @@ function admin_questions()
'question' => str_replace("\n", '<br />', $question['Question']),
'answer' => form([
form_textarea('answer', '', ''),
- form_submit('submit', _('Save'))
+ form_submit('submit', __('Save'))
], page_link_to('admin_questions', ['action' => 'answer', 'id' => $question['QID']])),
'actions' => button(
page_link_to('admin_questions', ['action' => 'delete', 'id' => $question['QID']]),
- _('delete'),
+ __('delete'),
'btn-xs'
)
];
@@ -75,26 +75,26 @@ function admin_questions()
'answer' => str_replace("\n", '<br />', $question['Answer']),
'actions' => button(
page_link_to('admin_questions', ['action' => 'delete', 'id' => $question['QID']]),
- _('delete'),
+ __('delete'),
'btn-xs'
)
];
}
return page_with_title(admin_questions_title(), [
- '<h2>' . _('Unanswered questions') . '</h2>',
+ '<h2>' . __('Unanswered questions') . '</h2>',
table([
- 'from' => _('From'),
- 'question' => _('Question'),
- 'answer' => _('Answer'),
+ 'from' => __('From'),
+ 'question' => __('Question'),
+ 'answer' => __('Answer'),
'actions' => ''
], $unanswered_questions_table),
- '<h2>' . _('Answered questions') . '</h2>',
+ '<h2>' . __('Answered questions') . '</h2>',
table([
- 'from' => _('From'),
- 'question' => _('Question'),
- 'answered_by' => _('Answered by'),
- 'answer' => _('Answer'),
+ 'from' => __('From'),
+ 'question' => __('Question'),
+ 'answered_by' => __('Answered by'),
+ 'answer' => __('Answer'),
'actions' => ''
], $answered_questions_table)
]);
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index bbbc24ae..5be3f926 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -4,7 +4,7 @@
*/
function admin_rooms_title()
{
- return _('Rooms');
+ return __('Rooms');
}
/**
@@ -24,12 +24,12 @@ function admin_rooms()
'actions' => table_buttons([
button(
page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room['RID']]),
- _('edit'),
+ __('edit'),
'btn-xs'
),
button(
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room['RID']]),
- _('delete'),
+ __('delete'),
'btn-xs'
)
])
@@ -79,13 +79,13 @@ function admin_rooms()
$result = Room_validate_name(strip_request_item('name'), $room_id);
if (!$result->isValid()) {
$valid = false;
- $msg .= error(_('This name is already in use.'), true);
+ $msg .= error(__('This name is already in use.'), true);
} else {
$name = $result->getValue();
}
} else {
$valid = false;
- $msg .= error(_('Please enter a name.'), true);
+ $msg .= error(__('Please enter a name.'), true);
}
$from_frab = $request->has('from_frab');
@@ -110,7 +110,7 @@ function admin_rooms()
} else {
$valid = false;
$msg .= error(sprintf(
- _('Please enter needed angels for type %s.'),
+ __('Please enter needed angels for type %s.'),
$angeltype
), true);
}
@@ -139,7 +139,7 @@ function admin_rooms()
'Set needed angeltypes of room ' . $name
. ' to: ' . join(', ', $needed_angeltype_info)
);
- success(_('Room saved.'));
+ success(__('Room saved.'));
redirect(page_link_to('admin_rooms'));
}
}
@@ -152,29 +152,29 @@ function admin_rooms()
return page_with_title(admin_rooms_title(), [
buttons([
- button(page_link_to('admin_rooms'), _('back'), 'back')
+ button(page_link_to('admin_rooms'), __('back'), 'back')
]),
$msg,
form([
div('row', [
div('col-md-6', [
- form_text('name', _('Name'), $name),
- form_checkbox('from_frab', _('Frab import'), $from_frab),
- form_text('map_url', _('Map URL'), $map_url),
- form_info('', _('The map url is used to display an iframe on the room page.')),
- form_textarea('description', _('Description'), $description),
- form_info('', _('Please use markdown for the description.')),
+ form_text('name', __('Name'), $name),
+ form_checkbox('from_frab', __('Frab import'), $from_frab),
+ form_text('map_url', __('Map URL'), $map_url),
+ form_info('', __('The map url is used to display an iframe on the room page.')),
+ form_textarea('description', __('Description'), $description),
+ form_info('', __('Please use markdown for the description.')),
]),
div('col-md-6', [
div('row', [
div('col-md-12', [
- form_info(_('Needed angels:'))
+ form_info(__('Needed angels:'))
]),
join($angeltypes_count_form)
])
])
]),
- form_submit('submit', _('Save'))
+ form_submit('submit', __('Save'))
])
]);
} elseif ($request->input('show') == 'delete') {
@@ -182,19 +182,19 @@ function admin_rooms()
Room_delete($room_id);
engelsystem_log('Room deleted: ' . $name);
- success(sprintf(_('Room %s deleted.'), $name));
+ success(sprintf(__('Room %s deleted.'), $name));
redirect(page_link_to('admin_rooms'));
}
return page_with_title(admin_rooms_title(), [
buttons([
- button(page_link_to('admin_rooms'), _('back'), 'back')
+ button(page_link_to('admin_rooms'), __('back'), 'back')
]),
- sprintf(_('Do you want to delete room %s?'), $name),
+ sprintf(__('Do you want to delete room %s?'), $name),
buttons([
button(
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room_id, 'ack' => 1]),
- _('Delete'),
+ __('Delete'),
'delete btn-danger'
)
])
@@ -204,13 +204,13 @@ function admin_rooms()
return page_with_title(admin_rooms_title(), [
buttons([
- button(page_link_to('admin_rooms', ['show' => 'edit']), _('add'))
+ button(page_link_to('admin_rooms', ['show' => 'edit']), __('add'))
]),
msg(),
table([
- 'name' => _('Name'),
- 'from_frab' => _('Frab import'),
- 'map_url' => _('Map'),
+ 'name' => __('Name'),
+ 'from_frab' => __('Frab import'),
+ 'map_url' => __('Map'),
'actions' => ''
], $rooms)
]);
diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php
index 3fecbcd5..171fa073 100644
--- a/includes/pages/admin_shifts.php
+++ b/includes/pages/admin_shifts.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_shifts_title()
{
- return _('Create shifts');
+ return __('Create shifts');
}
/**
@@ -55,13 +55,13 @@ function admin_shifts()
$shifttype = ShiftType($request->input('shifttype_id'));
if (empty($shifttype)) {
$valid = false;
- error(_('Please select a shift type.'));
+ error(__('Please select a shift type.'));
} else {
$shifttype_id = $request->input('shifttype_id');
}
} else {
$valid = false;
- error(_('Please select a shift type.'));
+ error(__('Please select a shift type.'));
}
// Name/Bezeichnung der Schicht, darf leer sein
@@ -77,26 +77,26 @@ function admin_shifts()
} else {
$valid = false;
$rid = $rooms[0]['RID'];
- error(_('Please select a location.'));
+ error(__('Please select a location.'));
}
if ($request->has('start') && $tmp = parse_date('Y-m-d H:i', $request->input('start'))) {
$start = $tmp;
} else {
$valid = false;
- error(_('Please select a start time.'));
+ error(__('Please select a start time.'));
}
if ($request->has('end') && $tmp = parse_date('Y-m-d H:i', $request->input('end'))) {
$end = $tmp;
} else {
$valid = false;
- error(_('Please select an end time.'));
+ error(__('Please select an end time.'));
}
if ($start >= $end) {
$valid = false;
- error(_('The shifts end has to be after its start.'));
+ error(__('The shifts end has to be after its start.'));
}
if ($request->has('mode')) {
@@ -108,7 +108,7 @@ function admin_shifts()
$length = trim($request->input('length'));
} else {
$valid = false;
- error(_('Please enter a shift duration in minutes.'));
+ error(__('Please enter a shift duration in minutes.'));
}
} elseif ($request->input('mode') == 'variable') {
if (
@@ -125,12 +125,12 @@ function admin_shifts()
);
} else {
$valid = false;
- error(_('Please split the shift-change hours by colons.'));
+ error(__('Please split the shift-change hours by colons.'));
}
}
} else {
$valid = false;
- error(_('Please select a mode.'));
+ error(__('Please select a mode.'));
}
if ($request->has('angelmode')) {
@@ -143,21 +143,21 @@ function admin_shifts()
$needed_angel_types[$type['id']] = trim($request->input('type_' . $type['id'], 0));
} else {
$valid = false;
- error(sprintf(_('Please check the needed angels for team %s.'), $type['name']));
+ error(sprintf(__('Please check the needed angels for team %s.'), $type['name']));
}
}
if (array_sum($needed_angel_types) == 0) {
$valid = false;
- error(_('There are 0 angels needed. Please enter the amounts of needed angels.'));
+ error(__('There are 0 angels needed. Please enter the amounts of needed angels.'));
}
} else {
$valid = false;
- error(_('Please select a mode for needed angels.'));
+ error(__('Please select a mode for needed angels.'));
}
} else {
$valid = false;
- error(_('Please select needed angels.'));
+ error(__('Please select needed angels.'));
}
// Beim Zurück-Knopf das Formular zeigen
@@ -285,7 +285,7 @@ function admin_shifts()
foreach ($needed_angel_types as $type_id => $count) {
$hidden_types .= form_hidden('type_' . $type_id, $count);
}
- return page_with_title(_('Preview'), [
+ return page_with_title(__('Preview'), [
form([
$hidden_types,
form_hidden('shifttype_id', $shifttype_id),
@@ -297,13 +297,13 @@ function admin_shifts()
form_hidden('length', $length),
form_hidden('change_hours', implode(', ', $change_hours)),
form_hidden('angelmode', $angelmode),
- form_submit('back', _('back')),
+ form_submit('back', __('back')),
table([
- 'timeslot' => _('Time and location'),
- 'title' => _('Type and title'),
- 'needed_angels' => _('Needed angels')
+ 'timeslot' => __('Time and location'),
+ 'title' => __('Type and title'),
+ 'needed_angels' => __('Needed angels')
], $shifts_table),
- form_submit('submit', _('Save'))
+ form_submit('submit', __('Save'))
])
]);
}
@@ -379,48 +379,48 @@ function admin_shifts()
return page_with_title(admin_shifts_title(), [
msg(),
form([
- form_select('shifttype_id', _('Shifttype'), $shifttypes, $shifttype_id),
- form_text('title', _('Title'), $title),
- form_select('rid', _('Room'), $room_array, $rid),
+ form_select('shifttype_id', __('Shifttype'), $shifttypes, $shifttype_id),
+ form_text('title', __('Title'), $title),
+ form_select('rid', __('Room'), $room_array, $rid),
div('row', [
div('col-md-6', [
- form_text('start', _('Start'), date('Y-m-d H:i', $start)),
- form_text('end', _('End'), date('Y-m-d H:i', $end)),
- form_info(_('Mode'), ''),
- form_radio('mode', _('Create one shift'), $mode == 'single', 'single'),
- form_radio('mode', _('Create multiple shifts'), $mode == 'multi', 'multi'),
+ form_text('start', __('Start'), date('Y-m-d H:i', $start)),
+ form_text('end', __('End'), date('Y-m-d H:i', $end)),
+ form_info(__('Mode'), ''),
+ form_radio('mode', __('Create one shift'), $mode == 'single', 'single'),
+ form_radio('mode', __('Create multiple shifts'), $mode == 'multi', 'multi'),
form_text(
'length',
- _('Length'),
+ __('Length'),
$request->has('length')
? $request->input('length')
: '120'
),
form_radio(
'mode',
- _('Create multiple shifts with variable length'),
+ __('Create multiple shifts with variable length'),
$mode == 'variable',
'variable'
),
form_text(
'change_hours',
- _('Shift change hours'),
+ __('Shift change hours'),
$request->has('change_hours')
? $request->input('input')
: '00, 04, 08, 10, 12, 14, 16, 18, 20, 22'
)
]),
div('col-md-6', [
- form_info(_('Needed angels'), ''),
+ form_info(__('Needed angels'), ''),
form_radio(
'angelmode',
- _('Take needed angels from room settings'),
+ __('Take needed angels from room settings'),
$angelmode == 'location',
'location'
),
form_radio(
'angelmode',
- _('The following angels are needed'),
+ __('The following angels are needed'),
$angelmode == 'manually',
'manually'
),
@@ -429,7 +429,7 @@ function admin_shifts()
])
])
]),
- form_submit('preview', _('Preview'))
+ form_submit('preview', __('Preview'))
])
]);
}
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php
index 514e4b1b..1eb1f08f 100644
--- a/includes/pages/admin_user.php
+++ b/includes/pages/admin_user.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function admin_user_title()
{
- return _('All Angels');
+ return __('All Angels');
}
/**
@@ -18,13 +18,6 @@ function admin_user()
global $user, $privileges;
$tshirt_sizes = config('tshirt_sizes');
$request = request();
-
- foreach ($tshirt_sizes as $key => $size) {
- if (empty($size)) {
- unset($tshirt_sizes[$key]);
- }
- }
-
$html = '';
if (!$request->has('id')) {
@@ -35,7 +28,7 @@ function admin_user()
if (!$request->has('action')) {
$user_source = User($user_id);
if (empty($user_source)) {
- error(_('This user does not exist.'));
+ error(__('This user does not exist.'));
redirect(users_link());
}
@@ -68,11 +61,11 @@ function admin_user()
}
$html .= " <tr><td>jabber</td><td>" . '<input size="40" name="ejabber" value="' . $user_source['jabber'] . '" class="form-control"></td></tr>' . "\n";
$html .= ' <tr><td>Size</td><td>'
- . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . '</td></tr>' . "\n";
+ . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size'], __('Please select...')) . '</td></tr>' . "\n";
$options = [
- '1' => _('Yes'),
- '0' => _('No')
+ '1' => __('Yes'),
+ '0' => __('No')
];
// Gekommen?
@@ -85,7 +78,7 @@ function admin_user()
// Aktiv erzwingen
if (in_array('admin_active', $privileges)) {
- $html .= ' <tr><td>' . _('Force active') . '</td><td>' . "\n";
+ $html .= ' <tr><td>' . __('Force active') . '</td><td>' . "\n";
$html .= html_options('force_active', $options, $user_source['force_active']) . '</td></tr>' . "\n";
}
@@ -104,7 +97,7 @@ function admin_user()
$html .= '<hr />';
- $html .= form_info('', _('Please visit the angeltypes page or the users profile to manage users angeltypes.'));
+ $html .= form_info('', __('Please visit the angeltypes page or the users profile to manage users angeltypes.'));
$html .= 'Hier kannst Du das Passwort dieses Engels neu setzen:<form action="'
. page_link_to('admin_user', ['action' => 'change_pw', 'id' => $user_id])
@@ -171,7 +164,7 @@ function admin_user()
}
$html .= buttons([
- button(user_delete_link($user_source), glyph('lock') . _('delete'), 'btn-danger')
+ button(user_delete_link($user_source), glyph('lock') . __('delete'), 'btn-danger')
]);
$html .= "<hr />";
@@ -319,7 +312,7 @@ function admin_user()
}
}
- return page_with_title(_('Edit user'), [
+ return page_with_title(__('Edit user'), [
$html
]);
}
diff --git a/includes/pages/guest_credits.php b/includes/pages/guest_credits.php
index 308e6c94..8388c386 100644
--- a/includes/pages/guest_credits.php
+++ b/includes/pages/guest_credits.php
@@ -5,7 +5,7 @@
*/
function credits_title()
{
- return _('Credits');
+ return __('Credits');
}
/**
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index 47e16915..fbad8ff6 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function login_title()
{
- return _('Login');
+ return __('Login');
}
/**
@@ -15,7 +15,7 @@ function login_title()
*/
function register_title()
{
- return _('Register');
+ return __('Register');
}
/**
@@ -23,7 +23,7 @@ function register_title()
*/
function logout_title()
{
- return _('Logout');
+ return __('Logout');
}
/**
@@ -69,14 +69,8 @@ function guest_register()
}
}
- foreach ($tshirt_sizes as $key => $size) {
- if (empty($size)) {
- unset($tshirt_sizes[$key]);
- }
- }
-
if (!in_array('register', $privileges) || (!isset($user) && !config('registration_enabled'))) {
- error(_('Registration is disabled.'));
+ error(__('Registration is disabled.'));
return page_with_title(register_title(), [
msg(),
@@ -90,12 +84,12 @@ function guest_register()
$nick = User_validate_Nick($request->input('nick'));
if (count(DB::select('SELECT `UID` FROM `User` WHERE `Nick`=? LIMIT 1', [$nick])) > 0) {
$valid = false;
- $msg .= error(sprintf(_('Your nick &quot;%s&quot; already exists.'), $nick), true);
+ $msg .= error(sprintf(__('Your nick &quot;%s&quot; already exists.'), $nick), true);
}
} else {
$valid = false;
$msg .= error(sprintf(
- _('Your nick &quot;%s&quot; is too short (min. 2 characters).'),
+ __('Your nick &quot;%s&quot; is too short (min. 2 characters).'),
User_validate_Nick($request->input('nick'))
), true);
}
@@ -104,11 +98,11 @@ function guest_register()
$mail = strip_request_item('mail');
if (!check_email($mail)) {
$valid = false;
- $msg .= error(_('E-mail address is not correct.'), true);
+ $msg .= error(__('E-mail address is not correct.'), true);
}
} else {
$valid = false;
- $msg .= error(_('Please enter your e-mail.'), true);
+ $msg .= error(__('Please enter your e-mail.'), true);
}
if ($request->has('email_shiftinfo')) {
@@ -123,7 +117,7 @@ function guest_register()
$jabber = strip_request_item('jabber');
if (!check_email($jabber)) {
$valid = false;
- $msg .= error(_('Please check your jabber account information.'), true);
+ $msg .= error(__('Please check your jabber account information.'), true);
}
}
@@ -132,19 +126,19 @@ function guest_register()
$tshirt_size = $request->input('tshirt_size');
} else {
$valid = false;
- $msg .= error(_('Please select your shirt size.'), true);
+ $msg .= error(__('Please select your shirt size.'), true);
}
}
if ($request->has('password') && strlen($request->postData('password')) >= $min_password_length) {
if ($request->postData('password') != $request->postData('password2')) {
$valid = false;
- $msg .= error(_('Your passwords don\'t match.'), true);
+ $msg .= error(__('Your passwords don\'t match.'), true);
}
} else {
$valid = false;
$msg .= error(sprintf(
- _('Your password is too short (please use at least %s characters).'),
+ __('Your password is too short (please use at least %s characters).'),
$min_password_length
), true);
}
@@ -155,11 +149,11 @@ function guest_register()
$planned_arrival_date = $result->getValue();
if (!$result->isValid()) {
$valid = false;
- error(_('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
+ error(__('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
}
} else {
$valid = false;
- error(_('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
+ error(__('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
}
$selected_angel_types = [];
@@ -187,7 +181,7 @@ function guest_register()
$dect = strip_request_item('dect');
} else {
$valid = false;
- error(_('For dect numbers are only 5 digits allowed.'));
+ error(__('For dect numbers are only 5 digits allowed.'));
}
}
if ($request->has('mobile')) {
@@ -271,7 +265,7 @@ function guest_register()
'User ' . User_Nick_render(User($user_id))
. ' signed up as: ' . join(', ', $user_angel_types_info)
);
- success(_('Angel registration successful!'));
+ success(__('Angel registration successful!'));
// User is already logged in - that means a supporter has registered an angel. Return to register page.
if (isset($user)) {
@@ -299,7 +293,7 @@ function guest_register()
}
return page_with_title(register_title(), [
- _('By completing this form you\'re registering as a Chaos-Angel. This script will create you an account in the angel task scheduler.'),
+ __('By completing this form you\'re registering as a Chaos-Angel. This script will create you an account in the angel task scheduler.'),
$msg,
msg(),
form([
@@ -307,18 +301,18 @@ function guest_register()
div('col-md-6', [
div('row', [
div('col-sm-4', [
- form_text('nick', _('Nick') . ' ' . entry_required(), $nick)
+ form_text('nick', __('Nick') . ' ' . entry_required(), $nick)
]),
div('col-sm-8', [
- form_email('mail', _('E-Mail') . ' ' . entry_required(), $mail),
+ form_email('mail', __('E-Mail') . ' ' . entry_required(), $mail),
form_checkbox(
'email_shiftinfo',
- _('The engelsystem is allowed to send me an email (e.g. when my shifts change)'),
+ __('The engelsystem is allowed to send me an email (e.g. when my shifts change)'),
$email_shiftinfo
),
form_checkbox(
'email_by_human_allowed',
- _('Humans are allowed to send me an email (e.g. for ticket vouchers)'),
+ __('Humans are allowed to send me an email (e.g. for ticket vouchers)'),
$email_by_human_allowed
)
])
@@ -327,72 +321,72 @@ function guest_register()
div('col-sm-6', [
form_date(
'planned_arrival_date',
- _('Planned date of arrival') . ' ' . entry_required(),
+ __('Planned date of arrival') . ' ' . entry_required(),
$planned_arrival_date, $buildup_start_date, $teardown_end_date
)
]),
div('col-sm-6', [
$enable_tshirt_size ? form_select('tshirt_size',
- _('Shirt size') . ' ' . entry_required(),
- $tshirt_sizes, $tshirt_size) : ''
+ __('Shirt size') . ' ' . entry_required(),
+ $tshirt_sizes, $tshirt_size, __('Please select...')) : ''
])
]),
div('row', [
div('col-sm-6', [
- form_password('password', _('Password') . ' ' . entry_required())
+ form_password('password', __('Password') . ' ' . entry_required())
]),
div('col-sm-6', [
- form_password('password2', _('Confirm password') . ' ' . entry_required())
+ form_password('password2', __('Confirm password') . ' ' . entry_required())
])
]),
form_checkboxes(
'angel_types',
- _('What do you want to do?') . sprintf(
+ __('What do you want to do?') . sprintf(
' (<a href="%s">%s</a>)',
page_link_to('angeltypes', ['action' => 'about']),
- _('Description of job types')
+ __('Description of job types')
),
$angel_types,
$selected_angel_types
),
form_info(
'',
- _('Restricted angel types need will be confirmed later by a supporter. You can change your selection in the options section.')
+ __('Restricted angel types need will be confirmed later by a supporter. You can change your selection in the options section.')
)
]),
div('col-md-6', [
div('row', [
div('col-sm-4', [
- form_text('dect', _('DECT'), $dect)
+ form_text('dect', __('DECT'), $dect)
]),
div('col-sm-4', [
- form_text('mobile', _('Mobile'), $mobile)
+ form_text('mobile', __('Mobile'), $mobile)
]),
div('col-sm-4', [
- form_text('tel', _('Phone'), $tel)
+ form_text('tel', __('Phone'), $tel)
])
]),
- form_text('jabber', _('Jabber'), $jabber),
+ form_text('jabber', __('Jabber'), $jabber),
div('row', [
div('col-sm-6', [
- form_text('prename', _('First name'), $preName)
+ form_text('prename', __('First name'), $preName)
]),
div('col-sm-6', [
- form_text('lastname', _('Last name'), $lastName)
+ form_text('lastname', __('Last name'), $lastName)
])
]),
div('row', [
div('col-sm-3', [
- form_text('age', _('Age'), $age)
+ form_text('age', __('Age'), $age)
]),
div('col-sm-9', [
- form_text('hometown', _('Hometown'), $hometown)
+ form_text('hometown', __('Hometown'), $hometown)
])
]),
- form_info(entry_required() . ' = ' . _('Entry required!'))
+ form_info(entry_required() . ' = ' . __('Entry required!'))
])
]),
- form_submit('submit', _('Register'))
+ form_submit('submit', __('Register'))
])
]);
}
@@ -435,19 +429,19 @@ function guest_login()
if ($request->has('password')) {
if (!verify_password($request->postData('password'), $login_user['Passwort'], $login_user['UID'])) {
$valid = false;
- error(_('Your password is incorrect. Please try it again.'));
+ error(__('Your password is incorrect. Please try it again.'));
}
} else {
$valid = false;
- error(_('Please enter a password.'));
+ error(__('Please enter a password.'));
}
} else {
$valid = false;
- error(_('No user was found with that Nickname. Please try again. If you are still having problems, ask a Dispatcher.'));
+ error(__('No user was found with that Nickname. Please try again. If you are still having problems, ask a Dispatcher.'));
}
} else {
$valid = false;
- error(_('Please enter a nickname.'));
+ error(__('Please enter a nickname.'));
}
if ($valid && !empty($login_user)) {
@@ -469,21 +463,21 @@ function guest_login()
div('col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4', [
div('panel panel-primary first', [
div('panel-heading', [
- '<span class="icon-icon_angel"></span> ' . _('Login')
+ '<span class="icon-icon_angel"></span> ' . __('Login')
]),
div('panel-body', [
msg(),
form([
- form_text_placeholder('nick', _('Nick'), $nick),
- form_password_placeholder('password', _('Password')),
- form_submit('submit', _('Login')),
+ form_text_placeholder('nick', __('Nick'), $nick),
+ form_password_placeholder('password', __('Password')),
+ form_submit('submit', __('Login')),
!$valid ? buttons([
- button(page_link_to('user_password_recovery'), _('I forgot my password'))
+ button(page_link_to('user_password_recovery'), __('I forgot my password'))
]) : ''
])
]),
div('panel-footer', [
- glyph('info-sign') . _('Please note: You have to activate cookies!')
+ glyph('info-sign') . __('Please note: You have to activate cookies!')
])
])
])
@@ -494,12 +488,12 @@ function guest_login()
get_register_hint()
]),
div('col-sm-6 text-center', [
- heading(_('What can I do?'), 2),
- '<p>' . _('Please read about the jobs you can do to help us.') . '</p>',
+ heading(__('What can I do?'), 2),
+ '<p>' . __('Please read about the jobs you can do to help us.') . '</p>',
buttons([
button(
page_link_to('angeltypes', ['action' => 'about']),
- _('Teams/Job description') . ' &raquo;'
+ __('Teams/Job description') . ' &raquo;'
)
])
])
@@ -517,12 +511,12 @@ function get_register_hint()
if (in_array('register', $privileges) && config('registration_enabled')) {
return join('', [
- '<p>' . _('Please sign up, if you want to help us!') . '</p>',
+ '<p>' . __('Please sign up, if you want to help us!') . '</p>',
buttons([
button(page_link_to('register'), register_title() . ' &raquo;')
])
]);
}
- return error(_('Registration is disabled.'), true);
+ return error(__('Registration is disabled.'), true);
}
diff --git a/includes/pages/user_messages.php b/includes/pages/user_messages.php
index 06ae7e75..0738f433 100644
--- a/includes/pages/user_messages.php
+++ b/includes/pages/user_messages.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function messages_title()
{
- return _('Messages');
+ return __('Messages');
}
/**
@@ -44,7 +44,7 @@ function user_messages()
);
$to_select_data = [
- '' => _('Select recipient...')
+ '' => __('Select recipient...')
];
foreach ($users as $u) {
@@ -73,7 +73,7 @@ function user_messages()
'from' => User_Nick_render($user),
'to' => $to_select,
'text' => form_textarea('text', '', ''),
- 'actions' => form_submit('submit', _('Save'))
+ 'actions' => form_submit('submit', __('Save'))
]
];
@@ -93,14 +93,14 @@ function user_messages()
if ($message['isRead'] == 'N') {
$messages_table_entry['actions'] = button(
page_link_to('user_messages', ['action' => 'read', 'id' => $message['id']]),
- _('mark as read'),
+ __('mark as read'),
'btn-xs'
);
}
} else {
$messages_table_entry['actions'] = button(
page_link_to('user_messages', ['action' => 'delete', 'id' => $message['id']]),
- _('delete message'),
+ __('delete message'),
'btn-xs'
);
}
@@ -109,14 +109,14 @@ function user_messages()
return page_with_title(messages_title(), [
msg(),
- sprintf(_('Hello %s, here can you leave messages for other angels'), User_Nick_render($user)),
+ sprintf(__('Hello %s, here can you leave messages for other angels'), User_Nick_render($user)),
form([
table([
- 'new' => _('New'),
- 'timestamp' => _('Date'),
- 'from' => _('Transmitted'),
- 'to' => _('Recipient'),
- 'text' => _('Message'),
+ 'new' => __('New'),
+ 'timestamp' => __('Date'),
+ 'from' => __('Transmitted'),
+ 'to' => __('Recipient'),
+ 'text' => __('Message'),
'actions' => ''
], $messages_table)
], page_link_to('user_messages', ['action' => 'send']))
@@ -127,7 +127,7 @@ function user_messages()
if ($request->has('id') && preg_match('/^\d{1,11}$/', $request->input('id'))) {
$message_id = $request->input('id');
} else {
- return error(_('Incomplete call, missing Message ID.'), true);
+ return error(__('Incomplete call, missing Message ID.'), true);
}
$message = DB::selectOne(
@@ -141,7 +141,7 @@ function user_messages()
);
redirect(page_link_to('user_messages'));
} else {
- return error(_('No Message found.'), true);
+ return error(__('No Message found.'), true);
}
break;
@@ -149,7 +149,7 @@ function user_messages()
if ($request->has('id') && preg_match('/^\d{1,11}$/', $request->input('id'))) {
$message_id = $request->input('id');
} else {
- return error(_('Incomplete call, missing Message ID.'), true);
+ return error(__('Incomplete call, missing Message ID.'), true);
}
$message = DB::selectOne(
@@ -160,7 +160,7 @@ function user_messages()
DB::delete('DELETE FROM `Messages` WHERE `id`=? LIMIT 1', [$message_id]);
redirect(page_link_to('user_messages'));
} else {
- return error(_('No Message found.'), true);
+ return error(__('No Message found.'), true);
}
break;
@@ -169,12 +169,12 @@ function user_messages()
if (Message_send($request->input('to'), $request->input('text'))) {
redirect(page_link_to('user_messages'));
} else {
- return error(_('Transmitting was terminated with an Error.'), true);
+ return error(__('Transmitting was terminated with an Error.'), true);
}
break;
default:
- return error(_('Wrong action.'), true);
+ return error(__('Wrong action.'), true);
}
}
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index b61fc1e4..2a8a5d5a 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function myshifts_title()
{
- return _('My shifts');
+ return __('My shifts');
}
/**
@@ -35,15 +35,15 @@ function user_myshifts()
if ($request->has('reset')) {
if ($request->input('reset') == 'ack') {
User_reset_api_key($user);
- success(_('Key changed.'));
+ success(__('Key changed.'));
redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']]));
}
- return page_with_title(_('Reset API key'), [
+ return page_with_title(__('Reset API key'), [
error(
- _('If you reset the key, the url to your iCal- and JSON-export and your atom feed changes! You have to update it in every application using one of these exports.'),
+ __('If you reset the key, the url to your iCal- and JSON-export and your atom feed changes! You have to update it in every application using one of these exports.'),
true
),
- button(page_link_to('user_myshifts', ['reset' => 'ack']), _('Continue'), 'btn-danger')
+ button(page_link_to('user_myshifts', ['reset' => 'ack']), __('Continue'), 'btn-danger')
]);
} elseif ($request->has('edit') && preg_match('/^\d+$/', $request->input('edit'))) {
$shift_entry_id = $request->input('edit');
@@ -82,7 +82,7 @@ function user_myshifts()
$freeload_comment = strip_request_item_nl('freeload_comment');
if ($freeloaded && $freeload_comment == '') {
$valid = false;
- error(_('Please enter a freeload comment!'));
+ error(__('Please enter a freeload comment!'));
}
}
@@ -104,7 +104,7 @@ function user_myshifts()
. ' with comment ' . $comment
. '. Freeloaded: ' . ($freeloaded ? 'YES Comment: ' . $freeload_comment : 'NO')
);
- success(_('Shift saved.'));
+ success(__('Shift saved.'));
redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']]));
}
}
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index 0ec93627..f95b6ae8 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function user_news_comments_title()
{
- return _('News comments');
+ return __('News comments');
}
/**
@@ -15,7 +15,7 @@ function user_news_comments_title()
*/
function news_title()
{
- return _('News');
+ return __('News');
}
/**
@@ -23,7 +23,7 @@ function news_title()
*/
function meetings_title()
{
- return _('Meetings');
+ return __('Meetings');
}
/**
@@ -117,7 +117,7 @@ function display_news($news)
if ($page != 'news_comments') {
$html .= '&emsp;<a href="' . page_link_to('news_comments', ['nid' => $news['ID']]) . '">'
. '<span class="glyphicon glyphicon-comment"></span> '
- . _('Comments') . ' &raquo;</a> '
+ . __('Comments') . ' &raquo;</a> '
. '<span class="badge">'
. count(DB::select('SELECT `ID` FROM `NewsComments` WHERE `Refid`=?', [$news['ID']]))
. '</span>';
@@ -162,7 +162,7 @@ function user_news_comments()
]
);
engelsystem_log('Created news_comment: ' . $text);
- $html .= success(_('Entry saved.'), true);
+ $html .= success(__('Entry saved.'), true);
}
$html .= display_news($news);
@@ -183,13 +183,13 @@ function user_news_comments()
$html .= '</div>';
}
- $html .= '<hr /><h2>' . _('New Comment:') . '</h2>';
+ $html .= '<hr /><h2>' . __('New Comment:') . '</h2>';
$html .= form([
- form_textarea('text', _('Message'), ''),
- form_submit('submit', _('Save'))
+ form_textarea('text', __('Message'), ''),
+ form_submit('submit', __('Save'))
], page_link_to('news_comments', ['nid' => $news['ID']]));
} else {
- $html .= _('Invalid request.');
+ $html .= __('Invalid request.');
}
return $html . '</div>';
@@ -230,7 +230,7 @@ function user_news()
]
);
engelsystem_log('Created news: ' . $request->postData('betreff') . ', treffen: ' . $isMeeting);
- success(_('Entry saved.'));
+ success(__('Entry saved.'));
redirect(page_link_to('news'));
}
@@ -269,13 +269,13 @@ function user_news()
if (in_array('admin_news', $privileges)) {
$html .= '<hr />';
- $html .= '<h2>' . _('Create news:') . '</h2>';
+ $html .= '<h2>' . __('Create news:') . '</h2>';
$html .= form([
- form_text('betreff', _('Subject'), ''),
- form_textarea('text', _('Message'), ''),
- form_checkbox('treffen', _('Meeting'), false, 1),
- form_submit('submit', _('Save'))
+ form_text('betreff', __('Subject'), ''),
+ form_textarea('text', __('Message'), ''),
+ form_checkbox('treffen', __('Meeting'), false, 1),
+ form_submit('submit', __('Save'))
]);
}
return $html . '</div>';
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index 41fbe64d..ea255a3d 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function questions_title()
{
- return _('Ask the Heaven');
+ return __('Ask the Heaven');
}
/**
@@ -50,11 +50,11 @@ function user_questions()
[$user['UID'], $question]
);
- success(_('You question was saved.'));
+ success(__('You question was saved.'));
redirect(page_link_to('user_questions'));
} else {
return page_with_title(questions_title(), [
- error(_('Please enter a question!'), true)
+ error(__('Please enter a question!'), true)
]);
}
break;
@@ -62,7 +62,7 @@ function user_questions()
if ($request->has('id') && preg_match('/^\d{1,11}$/', $request->input('id'))) {
$question_id = $request->input('id');
} else {
- return error(_('Incomplete call, missing Question ID.'), true);
+ return error(__('Incomplete call, missing Question ID.'), true);
}
$question = DB::selectOne(
@@ -77,7 +77,7 @@ function user_questions()
redirect(page_link_to('user_questions'));
} else {
return page_with_title(questions_title(), [
- error(_('No question found.'), true)
+ error(__('No question found.'), true)
]);
}
break;
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index b3a5bdf5..d8f6e44b 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -7,7 +7,7 @@ use Engelsystem\Database\DB;
*/
function settings_title()
{
- return _('Settings');
+ return __('Settings');
}
/**
@@ -28,11 +28,11 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['email'] = $result->getValue();
if (!$result->isValid()) {
$valid = false;
- error(_('E-mail address is not correct.'));
+ error(__('E-mail address is not correct.'));
}
} else {
$valid = false;
- error(_('Please enter your e-mail.'));
+ error(__('Please enter your e-mail.'));
}
$user_source['email_shiftinfo'] = $request->has('email_shiftinfo');
@@ -43,7 +43,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['jabber'] = $result->getValue();
if (!$result->isValid()) {
$valid = false;
- error(_('Please check your jabber account information.'));
+ error(__('Please check your jabber account information.'));
}
}
@@ -59,7 +59,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['planned_arrival_date'] = $result->getValue();
if (!$result->isValid()) {
$valid = false;
- error(_('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
+ error(__('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.'));
}
}
@@ -69,7 +69,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['planned_departure_date'] = $result->getValue();
if (!$result->isValid()) {
$valid = false;
- error(_('Please enter your planned date of departure. It should be after your planned arrival date and after buildup start date and before teardown end date.'));
+ error(__('Please enter your planned date of departure. It should be after your planned arrival date and after buildup start date and before teardown end date.'));
}
}
@@ -82,7 +82,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['DECT'] = strip_request_item('dect', $user_source['DECT']);
} else {
$valid = false;
- error(_('For dect numbers are only 5 digits allowed.'));
+ error(__('For dect numbers are only 5 digits allowed.'));
}
$user_source['Handy'] = strip_request_item('mobile', $user_source['Handy']);
$user_source['Hometown'] = strip_request_item('hometown', $user_source['Hometown']);
@@ -90,7 +90,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
if ($valid) {
User_update($user_source);
- success(_('Settings saved.'));
+ success(__('Settings saved.'));
redirect(page_link_to('user_settings'));
}
@@ -109,14 +109,14 @@ function user_settings_password($user_source)
!$request->has('password')
|| !verify_password($request->postData('password'), $user_source['Passwort'], $user_source['UID'])
) {
- error(_('-> not OK. Please try again.'));
+ error(__('-> not OK. Please try again.'));
} elseif (strlen($request->postData('new_password')) < config('min_password_length')) {
- error(_('Your password is to short (please use at least 6 characters).'));
+ error(__('Your password is to short (please use at least 6 characters).'));
} elseif ($request->postData('new_password') != $request->postData('new_password2')) {
- error(_('Your passwords don\'t match.'));
+ error(__('Your passwords don\'t match.'));
} else {
set_password($user_source['UID'], $request->postData('new_password'));
- success(_('Password saved.'));
+ success(__('Password saved.'));
}
redirect(page_link_to('user_settings'));
}
@@ -151,7 +151,7 @@ function user_settings_theme($user_source, $themes)
]
);
- success(_('Theme changed.'));
+ success(__('Theme changed.'));
redirect(page_link_to('user_settings'));
}
@@ -224,12 +224,6 @@ function user_settings()
}
}
- foreach ($tshirt_sizes as $key => $size) {
- if (empty($size)) {
- unset($tshirt_sizes[$key]);
- }
- }
-
$user_source = $user;
if ($request->has('submit')) {
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 06a77591..6754292e 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -8,7 +8,7 @@ use Engelsystem\ShiftsFilter;
*/
function shifts_title()
{
- return _('Shifts');
+ return __('Shifts');
}
/**
@@ -99,7 +99,7 @@ function load_rooms()
'SELECT `RID` AS `id`, `Name` AS `name` FROM `Room` ORDER BY `Name`'
);
if (empty($rooms)) {
- error(_('The administration has not configured any rooms yet.'));
+ error(__('The administration has not configured any rooms yet.'));
redirect(page_link_to('/'));
}
return $rooms;
@@ -118,7 +118,7 @@ function load_days()
$days = array_map('array_shift', $days);
if (empty($days)) {
- error(_('The administration has not configured any shifts yet.'));
+ error(__('The administration has not configured any shifts yet.'));
redirect(page_link_to('/'));
}
return $days;
@@ -132,7 +132,7 @@ function load_types()
global $user;
if (!count(DB::select('SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0'))) {
- error(_('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.'));
+ error(__('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.'));
redirect(page_link_to('/'));
}
$types = DB::select('
@@ -200,11 +200,11 @@ function view_user_shifts()
$filled = [
[
'id' => '1',
- 'name' => _('occupied')
+ 'name' => __('occupied')
],
[
'id' => '0',
- 'name' => _('free')
+ 'name' => __('free')
]
];
$start_day = date('Y-m-d', $shiftsFilter->getStartTime());
@@ -226,7 +226,7 @@ function view_user_shifts()
msg(),
view(__DIR__ . '/../../resources/views/pages/user-shifts.html', [
'title' => shifts_title(),
- 'room_select' => make_select($rooms, $shiftsFilter->getRooms(), 'rooms', _('Rooms')),
+ 'room_select' => make_select($rooms, $shiftsFilter->getRooms(), 'rooms', __('Rooms')),
'start_select' => html_select_key(
'start_day',
'start_day',
@@ -245,34 +245,34 @@ function view_user_shifts()
$types,
$shiftsFilter->getTypes(),
'types',
- _('Angeltypes') . '<sup>1</sup>',
+ __('Angeltypes') . '<sup>1</sup>',
[
button(
'javascript: checkOwnTypes(\'selection_types\', ' . json_encode($ownTypes) . ')',
- _('Own')
+ __('Own')
),
]
),
- 'filled_select' => make_select($filled, $shiftsFilter->getFilled(), 'filled', _('Occupancy')),
+ 'filled_select' => make_select($filled, $shiftsFilter->getFilled(), 'filled', __('Occupancy')),
'task_notice' =>
'<sup>1</sup>'
- . _('The tasks shown here are influenced by the angeltypes you joined already!')
+ . __('The tasks shown here are influenced by the angeltypes you joined already!')
. ' <a href="' . page_link_to('angeltypes', ['action' => 'about']) . '">'
- . _('Description of the jobs.')
+ . __('Description of the jobs.')
. '</a>',
'shifts_table' => msg() . $shiftCalendarRenderer->render(),
'ical_text' => ical_hint(),
- 'filter' => _('Filter'),
- 'set_yesterday' => _('Yesterday'),
- 'set_today' => _('Today'),
- 'set_tomorrow' => _('Tomorrow'),
- 'set_last_8h' => _('last 8h'),
- 'set_last_4h' => _('last 4h'),
- 'set_next_4h' => _('next 4h'),
- 'set_next_8h' => _('next 8h'),
+ 'filter' => __('Filter'),
+ 'set_yesterday' => __('Yesterday'),
+ 'set_today' => __('Today'),
+ 'set_tomorrow' => __('Tomorrow'),
+ 'set_last_8h' => __('last 8h'),
+ 'set_last_4h' => __('last 4h'),
+ 'set_next_4h' => __('next 4h'),
+ 'set_next_8h' => __('next 8h'),
'buttons' => button(
public_dashboard_link(),
- glyph('dashboard') . _('Public Dashboard')
+ glyph('dashboard') . __('Public Dashboard')
)
])
])
@@ -286,9 +286,9 @@ function ical_hint()
{
global $user;
- return heading(_('iCal export'), 2)
+ return heading(__('iCal export'), 2)
. '<p>' . sprintf(
- _('Export your own shifts. <a href="%s">iCal format</a> or <a href="%s">JSON format</a> available (please keep secret, otherwise <a href="%s">reset the api key</a>).'),
+ __('Export your own shifts. <a href="%s">iCal format</a> or <a href="%s">JSON format</a> available (please keep secret, otherwise <a href="%s">reset the api key</a>).'),
page_link_to('ical', ['key' => $user['api_key']]),
page_link_to('shifts_json_export', ['key' => $user['api_key']]),
page_link_to('user_myshifts', ['reset' => 1])
@@ -321,8 +321,8 @@ function make_select($items, $selected, $name, $title = null, $additionalButtons
}
$buttons = [];
- $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', true)', _('All'));
- $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', false)', _('None'));
+ $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', true)', __('All'));
+ $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', false)', __('None'));
$buttons = array_merge($buttons, $additionalButtons);
$html .= buttons($buttons);