Skip to content

Commit

Permalink
MDL-69050 lang: Rename the filetypesnotwhitelisted string
Browse files Browse the repository at this point in the history
Rename the string identifier to filetypesnotallowed, copy all the
existing translations in AMOS and deprecate the original string to be
eventually removed.

AMOS BEGIN
 CPY [filetypesnotwhitelisted,core_form],[filetypesnotallowed,core_form]
AMOS END
  • Loading branch information
mudrd8mz committed Sep 24, 2020
1 parent e04e0c8 commit f278c69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions lang/en/deprecated.txt
Expand Up @@ -122,3 +122,4 @@ availablelicenses,core_admin
managelicenses,core_admin
userfilterplaceholder,core
sitebackpackverify,core_badges
filetypesnotwhitelisted,core_form
5 changes: 4 additions & 1 deletion lang/en/form.php
Expand Up @@ -46,7 +46,7 @@
$string['filesofthesetypes'] = 'Accepted file types:';
$string['filetypesany'] = 'All file types';
$string['filetypesnotall'] = 'It is not allowed to select \'All file types\' here';
$string['filetypesnotwhitelisted'] = 'These file types are not allowed here: {$a}';
$string['filetypesnotallowed'] = 'These file types are not allowed here: {$a}';
$string['filetypesothers'] = 'Other files';
$string['filetypesunknown'] = 'Unknown file types: {$a}';
$string['general'] = 'General';
Expand Down Expand Up @@ -85,3 +85,6 @@
$string['timing'] = 'Timing';
$string['unmaskpassword'] = 'Unmask';
$string['year'] = 'Year';

// Deprecated since Moodle 3.10.
$string['filetypesnotwhitelisted'] = 'These file types are not allowed here: {$a}';
2 changes: 1 addition & 1 deletion lib/adminlib.php
Expand Up @@ -11276,7 +11276,7 @@ public function validate($data) {

} else {
$troublemakers = $this->util->get_not_whitelisted($data, $this->onlytypes);
return get_string('filetypesnotwhitelisted', 'core_form', implode(' ', $troublemakers));
return get_string('filetypesnotallowed', 'core_form', implode(' ', $troublemakers));
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/form/filetypes.php
Expand Up @@ -245,7 +245,7 @@ public function validateSubmitValue($value) {
$notwhitelisted = $this->util->get_not_whitelisted($value['filetypes'], $this->onlytypes);

if ($notwhitelisted) {
return get_string('filetypesnotwhitelisted', 'core_form', implode(', ', $notwhitelisted));
return get_string('filetypesnotallowed', 'core_form', implode(', ', $notwhitelisted));
}
}

Expand Down

0 comments on commit f278c69

Please sign in to comment.