-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.10, 4.0.4
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
Prerequisites:
- In a running Moodle instance, customize the "core_admin/sitemaintenancetitle" language string of the english language pack within the language customization GUI.
- Open your terminal and run this command:
php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/en_local
- Afterwards, there is a zip file at /tmp/en_local[[exportzipfilename]] (which is a bug reported at
MDL-75970, just to be precise here). Rename this file to /tmp/en_local.zip for further procedure.
Steps to reproduce:
- Get a fresh Moodle installation where you are sure that nobody has made any language customizations yet.
- In your terminal, run this command in this fresh Moodle installation:
php admin/tool/customlang/cli/import.php --lang=en --source=/tmp/en_local.zip --checkin --mode=all
Expected result:
- In your terminal, you should see this output:
== Files to import into en ==
/tmp/en_local.zip
== Import files string (mode all) ==
String core_admin/sitemaintenancetitle updated successfully.
Save changes to the language pack
- The modified string takes effect in the Moodle GUI.
Actual result:
- In your terminal, you see this output:
== Files to import into en ==
/tmp/en_local.zip
== Import files string (mode all) ==
Missing component core_admin.
Save changes to the language pack
- The modified string does not take effect in the Moodle GUI.
Analysis:
- The CLI import tool seems not to do the initial language pack checkout which is necessary before the first language string customization.
- In the GUI, if you go to Site administration -> Language -> Language customization -> Pick "English", this initial checkout happens automatically before you can use the customization GUI for the first time. As a workaround for this issue, you can do the initial checkout in the GUI and run the CLI importer afterwards.
- has a non-specific relationship to
-
MDL-69583 Add import to tool_customlang
- Closed