This commit is contained in:
Andrew Nicols
2023-02-16 11:53:55 +08:00
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ if ($options['lang']) {
}
foreach ($langs as $lang) {
$filename = $options['target'] . get_string('exportzipfilename', 'tool_customlang', ['lang' => $lang]);
$filename = $options['target'] . "customlang_{$lang}.zip";
// If the file exists and we are not using the temp folder it requires an ovewrite.
if ($options['target'] != $dafaulttarget && file_exists($filename) && !$options['overwrite']) {
cli_problem(get_string('cliexportfileexists', 'tool_customlang', ['lang' => $lang]));
@@ -0,0 +1 @@
exportzipfilename,tool_customlang
@@ -50,7 +50,6 @@ $string['customlang:export'] = 'Export local translation';
$string['customlang:view'] = 'View local translation';
$string['export'] = 'Export custom strings';
$string['exportfilter'] = 'Select component(s) to export';
$string['exportzipfilename'] = 'customlang-export-{$a->lang}.zip';
$string['editlangpack'] = 'Edit language pack';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
@@ -92,3 +91,6 @@ $string['pluginname'] = 'Language customisation';
$string['savecheckin'] = 'Save changes to the language pack';
$string['savecontinue'] = 'Apply changes and continue editing';
$string['privacy:metadata'] = 'The Language customisation plugin does not store any personal data.';
// Deprecated since Moodle 4.2.
$string['exportzipfilename'] = 'customlang-export-{$a->lang}.zip';