Skip to content

Commit 3a50bc7

Browse files
committed
Language: #add missing and #fix legacy language terms
1 parent 403d294 commit 3a50bc7

13 files changed

+99
-39
lines changed

public/main/admin/access_url_add_courses_to_url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class="space-y-6"
9090
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
9191
<div>
9292
<label class="block text-sm font-bold text-gray-90 mb-2"><?php echo get_lang('Course list'); ?></label>
93-
<input type="text" id="courseFilter" onkeyup="filterSelect('courseFilter', 'courseSelect')" placeholder="<?php echo get_lang('Search course'); ?>"
93+
<input type="text" id="courseFilter" onkeyup="filterSelect('courseFilter', 'courseSelect')" placeholder="<?php echo get_lang('Search courses'); ?>"
9494
class="mb-2 w-full rounded-md border border-gray-25 p-2 text-sm focus:outline-none">
9595
<select name="course_list[]" id="courseSelect" multiple size="20"
9696
class="w-full h-[400px] rounded-md border border-gray-25 p-2 text-sm focus:outline-none">

public/main/admin/legal_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
// action menu
2323
echo '<div class="actions">';
2424
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_add.php">';
25-
echo Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('EditTerms and Conditions'));
26-
echo get_lang('EditTerms and Conditions').'</a>&nbsp;&nbsp;';
25+
echo Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit terms and conditions'));
26+
echo get_lang('Edit terms and conditions').'</a>&nbsp;&nbsp;';
2727
echo '</div>';
2828

2929
$em = Database::getManager();

public/main/admin/resource_sequence.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
$httpRequest = HttpRequest::createFromGlobals();
1919

2020
// setting breadcrumbs
21-
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Platform Admin')];
21+
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')];
2222

2323
$type = $httpRequest->query->has('type')
2424
? $httpRequest->query->getInt('type', SequenceResource::SESSION_TYPE)
2525
: $httpRequest->request->getInt('type', SequenceResource::SESSION_TYPE);
2626

27-
$tpl = new Template(get_lang('Resources Sequencing'));
27+
$tpl = new Template(get_lang('Resources sequencing'));
2828
$em = Database::getManager();
2929
$sequenceRepository = $em->getRepository(Sequence::class);
3030

@@ -33,7 +33,7 @@
3333
$formSequence = new FormValidator('sequence_form', 'post', $currentUrl, null, null, FormValidator::LAYOUT_INLINE);
3434
$formSequence->addText('name', get_lang('Sequence'), true, ['cols-size' => [3, 8, 1]]);
3535
$formSequence->applyFilter('name', 'html_filter');
36-
$formSequence->addButtonCreate(get_lang('Add sequence'), 'submit_sequence', false, ['cols-size' => [3, 8, 1]]);
36+
$formSequence->addButtonCreate(get_lang('Add new sequence'), 'submit_sequence', false, ['cols-size' => [3, 8, 1]]);
3737

3838
$em = Database::getManager();
3939

@@ -44,7 +44,7 @@
4444
$sequence->setTitle($values['name']);
4545
$em->persist($sequence);
4646
$em->flush();
47-
Display::addFlash(Display::return_message(get_lang('Saved')));
47+
Display::addFlash(Display::return_message(get_lang('Saved.')));
4848
header('Location: '.$currentUrl);
4949
exit;
5050
}
@@ -121,7 +121,7 @@
121121
);
122122

123123
$form->addButtonCreate(
124-
get_lang('Set as requirement'),
124+
get_lang('Set as a requirement'),
125125
'set_requirement',
126126
false,
127127
['class' => 'mt-2']

public/main/admin/settings.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function handlePlugins()
137137

138138
// Header
139139
echo '<div class="mb-4 flex items-center justify-between">';
140-
echo '<h2 class="text-2xl font-semibold text-gray-90">'.get_lang('Manage Plugins').'</h2>';
140+
echo '<h2 class="text-2xl font-semibold text-gray-90">'.get_lang('Manage plugins').'</h2>';
141141
echo '<p class="text-gray-50 text-sm">'.get_lang('Install, activate or deactivate plugins easily.').'</p>';
142142
echo '</div>';
143143

public/main/admin/update_schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
$content .= '</pre>';
5454
} else {
55-
Display::addFlash(Display::return_message(get_lang('Nothing else to update')));
55+
Display::addFlash(Display::return_message(get_lang('Nothing left to update.')));
5656
}
5757

5858
Display::display_header(get_lang('Synchronize the database with the schema'));

public/main/admin/user_anonymize_import.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
$this_section = SECTION_PLATFORM_ADMIN;
1515
api_protect_admin_script(true, null);
1616

17-
$tool_name = get_lang('BulkAnonymizeUsers');
18-
$interbreadcrumb[] = ["url" => 'index.php', "name" => get_lang('PlatformAdmin')];
17+
$tool_name = get_lang('Anonymise users list');
18+
$interbreadcrumb[] = ["url" => 'index.php', "name" => get_lang('Administration')];
1919

2020
set_time_limit(0);
2121
ini_set('memory_limit', -1);
@@ -24,50 +24,50 @@
2424

2525
$step1Form = new FormValidator('step1Form');
2626

27-
$usernameListFile = $step1Form->addFile('usernameList', get_lang('UsernameList'));
27+
$usernameListFile = $step1Form->addFile('usernameList', get_lang('Username list'));
2828
$step1Form->addButtonUpload(get_lang('Upload'));
2929

3030
$step2Form = new FormValidator('step2Form');
3131
$usernameTextarea = $step2Form->addTextarea(
3232
'usersToBeAnonymized',
33-
get_lang('UsersAboutToBeAnonymized'),
33+
get_lang('Users about to be anonymized:'),
3434
[
3535
'readonly' => 1,
3636
]
3737
);
38-
$anonymizedSessions = $step2Form->addCheckBox('anonymize_sessions', null, get_lang('AnonymizeUserSessions'));
38+
$anonymizedSessions = $step2Form->addCheckBox('anonymize_sessions', null, get_lang("Anonymize user's sessions"));
3939
$step2Form->addButtonUpdate(get_lang('Anonymize'));
4040

4141
if ($step1Form->validate() && $usernameListFile->isUploadedFile()) {
4242
$usernameListFileUploaded = $usernameListFile->getValue();
4343
$usernameListFileUploaded['name'] = api_htmlentities($usernameListFileUploaded['name']);
4444
$filePath = $usernameListFileUploaded['tmp_name'];
4545
if (!file_exists($filePath)) {
46-
throw new Exception(get_lang('CouldNotReadFile').' '.$filePath);
46+
throw new Exception(get_lang('Could not read file.').' '.$filePath);
4747
}
4848
$submittedUsernames = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
4949
if (false === $submittedUsernames) {
50-
throw new Exception(get_lang('CouldNotReadFileLines').' '.$filePath);
50+
throw new Exception(get_lang('Could not read file lines.').' '.$filePath);
5151
}
5252

5353
$submittedUsernames = array_map('api_htmlentities', $submittedUsernames);
5454
$submittedUsernames = array_filter($submittedUsernames);
5555

5656
if (empty($submittedUsernames)) {
5757
printf(
58-
'<p>'.get_lang('FileXHasNoData').'</p>',
58+
'<p>'.get_lang('File %s is empty or only contains empty lines.').'</p>',
5959
'<em>'.$usernameListFileUploaded['name'].'</em>'
6060
);
6161
} else {
6262
printf(
63-
'<p>'.get_lang('FileXHasYNonEmptyLines').'</p>',
63+
'<p>'.get_lang('File %s has %d non-empty lines.').'</p>',
6464
'<em>'.$usernameListFileUploaded['name'].'</em>',
6565
count($submittedUsernames)
6666
);
6767
$uniqueSubmittedUsernames = array_values(array_unique($submittedUsernames));
6868
if (count($uniqueSubmittedUsernames) !== count($submittedUsernames)) {
6969
printf(
70-
'<p>'.get_lang('DuplicatesOnlyXUniqueUserNames').'</p>',
70+
'<p>'.get_lang('There are duplicates: only %d unique user names were extracted.').'</p>',
7171
count($uniqueSubmittedUsernames)
7272
);
7373
}
@@ -82,23 +82,23 @@
8282
}
8383
}
8484
if (empty($users)) {
85-
echo '<p>'.get_lang('NoLineMatchedAnyActualUserName').'</p>';
85+
echo '<p>'.get_lang('No line matched any actual user name.').'</p>';
8686
} else {
8787
$foundUsernames = [];
8888
/** @var User $user */
8989
foreach ($users as $user) {
9090
$foundUsernames[] = $user->getUsername();
9191
}
9292
if (count($users) !== count($uniqueSubmittedUsernames)) {
93-
printf('<p>'.get_lang('OnlyXLinesMatchedActualUsers').'</p>', count($users));
93+
printf('<p>'.get_lang('Only %d lines matched actual users.').'</p>', count($users));
9494
$usernamesNotFound = array_diff($uniqueSubmittedUsernames, $foundUsernames);
9595
printf(
96-
'<p>'.get_lang('TheFollowingXLinesDoNotMatchAnyActualUser').'<pre>%s</pre></p>',
96+
'<p>'.get_lang('The following %d line(s) do not match any actual user:').'<pre>%s</pre></p>',
9797
count($usernamesNotFound),
9898
join("\n", $usernamesNotFound)
9999
);
100100
}
101-
printf('<p>'.get_lang('XUsersAreAboutToBeAnonymized').'</p>', count($foundUsernames));
101+
printf('<p>'.get_lang('%d users are about to be anonymized :').'</p>', count($foundUsernames));
102102
$usernameTextarea->setValue(join("\n", $foundUsernames));
103103
$step2Form->display();
104104
}
@@ -108,15 +108,15 @@
108108
if (false === $usernames) {
109109
throw new Exception('preg_split failed');
110110
}
111-
printf('<p>'.get_lang('LoadingXUsers')."</p>\n", count($usernames));
111+
printf('<p>'.get_lang('Loading %d users...')."</p>\n", count($usernames));
112112
$users = UserManager::getRepository()->matching(
113113
Criteria::create()->where(
114114
Criteria::expr()->in('username', $usernames)
115115
)
116116
);
117117
$anonymizedSessionsValue = $anonymizedSessions->getValue();
118118
if (count($users) === count($usernames)) {
119-
printf('<p>'.get_lang('AnonymizingXUsers')."</p>\n", count($users));
119+
printf('<p>'.get_lang('Anonymizing %d users...')."</p>\n", count($users));
120120
$anonymized = [];
121121
$errors = [];
122122
$tableSession = Database::get_main_table(TABLE_MAIN_SESSION);
@@ -136,14 +136,14 @@
136136
$sessionId = $session['id'];
137137
$sessionTitle = $session['name'];
138138
$usersCount = SessionManager::get_users_by_session($sessionId, null, true);
139-
echo '<p> '.$sessionTitle.' ('.$sessionId.') - '.get_lang('Students').': '.$usersCount.'</p>';
139+
echo '<p> '.$sessionTitle.' ('.$sessionId.') - '.get_lang('Learners').': '.$usersCount.'</p>';
140140
if (1 === $usersCount) {
141141
$uniqueId = uniqid('anon_session', true);
142142
echo '<p> '.get_lang('Rename').': '.$sessionTitle.' -> '.$uniqueId.'</p>';
143143
$sql = "UPDATE $tableSession SET name = '$uniqueId' WHERE id = $sessionId";
144144
Database::query($sql);
145145
} else {
146-
echo '<p> '.sprintf(get_lang('SessionXSkipped'), $sessionTitle).'</p>';
146+
echo '<p> '.sprintf(get_lang('Session %s skipped'), $sessionTitle).'</p>';
147147
}
148148
}
149149
}
@@ -161,13 +161,13 @@
161161
echo "</p>\n";
162162
}
163163
if (empty($error)) {
164-
printf('<p>'.get_lang('AllXUsersWereAnonymized').'</p>', count($users));
164+
printf('<p>'.get_lang('All %d users were anonymized.').'</p>', count($users));
165165
} else {
166166
printf(
167167
'<p>'
168-
.get_lang('OnlyXUsersWereAnonymized')
168+
.get_lang('Only %d users were anonymized.')
169169
.' '
170-
.get_lang('AttemptedAnonymizationOfTheseXUsersFailed')
170+
.get_lang('Attempted anonymization of the following %d users failed:')
171171
.'<pre>%s</pre></p>',
172172
count($users),
173173
count($errors),
@@ -176,13 +176,13 @@
176176
}
177177
} else {
178178
printf(
179-
'<p>'.get_lang('InternalInconsistencyXUsersFoundForYUserNames').'</p>',
179+
'<p>'.get_lang('Internal inconsistency found : %d users found from %d submitted usernames. Please start over.').'</p>',
180180
count($users),
181181
count($usernames)
182182
);
183183
}
184184
} else {
185-
echo '<p>'.get_lang('PleaseUploadListOfUsers').'</p>';
185+
echo '<p>'.get_lang('Please upload a text file listing the users to be anonymized, one username per line.').'</p>';
186186
$step1Form->display();
187187
}
188188

public/main/cron/user_import/resend_email_with_new_password.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
PERSON_NAME_EMAIL_ADDRESS
7070
);
7171
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('Your registration on').' '.api_get_setting('siteName');
72-
$emailbody = sprintf(get_lang('Dear %s,'), api_get_person_name($user['FirstName'], $user['LastName']))."\n\n".get_lang('You are registered to')." ".api_get_setting('siteName')." ".get_lang('with the following settings:')."\n\n".get_lang('Username')." : ".$user['UserName']."\n".get_lang('Password')." : ".$user['Password']."\n\n".get_lang('Address')." ".api_get_setting('siteName')." ".get_lang('is')." : ".api_get_path(WEB_PATH)." \n\n".get_lang('Problem')."\n\n".get_lang('Formula').",\n\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Administrator')." ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".get_lang('E-mail')." : ".api_get_setting('emailAdministrator');
72+
$emailbody = sprintf(get_lang('Dear %s,'), api_get_person_name($user['FirstName'], $user['LastName']))."\n\n".get_lang('You are registered to')." ".api_get_setting('siteName')." ".get_lang('with the following settings:')."\n\n".get_lang('Username')." : ".$user['UserName']."\n".get_lang('Password')." : ".$user['Password']."\n\n".get_lang('Address')." ".api_get_setting('siteName')." ".get_lang('is')." : ".api_get_path(WEB_PATH)." \n\n".get_lang('In case of trouble, contact us.')."\n\n".get_lang('Formula').",\n\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Administrator')." ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".get_lang('E-mail')." : ".api_get_setting('emailAdministrator');
7373
$sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS);
7474
$email_admin = api_get_setting('emailAdministrator');
7575
@api_mail_html(

public/main/extrafield/translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
$interbreadcrumb[] = [
6767
'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type='.$type,
68-
'name' => get_lang('Fields'),
68+
'name' => get_lang('Extra fields'),
6969
];
7070

7171
$interbreadcrumb[] = [

public/main/extrafield/translate_option.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
$interbreadcrumb[] = [
6969
'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type='.$type,
70-
'name' => get_lang('Fields'),
70+
'name' => get_lang('Extra fields'),
7171
];
7272

7373
$interbreadcrumb[] = [
@@ -97,7 +97,7 @@
9797
api_location($currentUrl);
9898
}
9999

100-
$tpl = new Template(get_lang('Translations'));
100+
$tpl = new Template(get_lang('Translation'));
101101
$tpl->assign('form', $form->returnForm());
102102
$template = $tpl->get_template('extrafield/translate.html.twig');
103103
$content = $tpl->fetch($template);

public/main/session/session_list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function show_cols(grid, added_cols) {
409409
}
410410
}
411411
}).navButtonAdd('#sessions_pager',{
412-
caption:"<?php echo addslashes(Display::return_icon('save_pack.png', get_lang('Export courses reports'))); ?>",
412+
caption:"<?php echo addslashes(Display::return_icon('save_pack.png', get_lang('Courses reports'))); ?>",
413413
buttonicon:"ui-icon ui-icon-plus",
414414
onClickButton: function(a) {
415415
var list = $("#sessions").jqGrid('getGridParam', 'selarrrow');

0 commit comments

Comments
 (0)