From 6f4675e0434408eb462cae5965da3441c326170e Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 7 Nov 2022 23:00:50 +0000 Subject: [PATCH] MDL-76222 tool_customlang: non-translatable export CLI filename. This matches the name used for manual (via UI) language export. --- admin/tool/customlang/cli/export.php | 2 +- admin/tool/customlang/lang/en/deprecated.txt | 1 + admin/tool/customlang/lang/en/tool_customlang.php | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 admin/tool/customlang/lang/en/deprecated.txt diff --git a/admin/tool/customlang/cli/export.php b/admin/tool/customlang/cli/export.php index 016ca89a4b0..54178207bb4 100644 --- a/admin/tool/customlang/cli/export.php +++ b/admin/tool/customlang/cli/export.php @@ -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])); diff --git a/admin/tool/customlang/lang/en/deprecated.txt b/admin/tool/customlang/lang/en/deprecated.txt new file mode 100644 index 00000000000..c678b3812bd --- /dev/null +++ b/admin/tool/customlang/lang/en/deprecated.txt @@ -0,0 +1 @@ +exportzipfilename,tool_customlang diff --git a/admin/tool/customlang/lang/en/tool_customlang.php b/admin/tool/customlang/lang/en/tool_customlang.php index acb63c43e1a..31cda9d923a 100644 --- a/admin/tool/customlang/lang/en/tool_customlang.php +++ b/admin/tool/customlang/lang/en/tool_customlang.php @@ -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';