Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76222

tool_customlang CLI export unneeded language string

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.11.10, 4.0.4
    • 4.2
    • Language
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_402_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Language > Language customisation in site administration
      3. Choose English (en)
      4. Press Open language pack for editing
      5. Under Show strings of these components select access.php and press Show strings
      6. Set Local customisation for the core_access/accesshelp string
      7. Press Save changes to the language pack
      8. From CLI run the following command:

        $ php admin/tool/customlang/cli/export.php --lang=en
        

      9. Confirm you see the following message (note: <TEMPDIR> is whatever value you have for CFG->tempdir):

        Starting to export lang files.
        == Exporting language en ==
        Zip created: <TEMPDIR>/customlang/customlang_en.zip
        

      Show
      Log in as admin Navigate to Language > Language customisation in site administration Choose English (en) Press Open language pack for editing Under Show strings of these components select access.php and press Show strings Set Local customisation for the core_access/accesshelp string Press Save changes to the language pack From CLI run the following command: $ php admin/tool/customlang/cli/export.php --lang=en Confirm you see the following message (note: <TEMPDIR> is whatever value you have for CFG->tempdir ): Starting to export lang files. == Exporting language en == Zip created: <TEMPDIR>/customlang/customlang_en.zip
    • 1
    • Team Hedgehog Sprint 2.1

    Description

      From MDL-75970, when using the tool_customlang CLI export the zip file is named using a language string exportzipfilename.

      $string['exportzipfilename'] = 'customlang-export-{$a->lang}.zip'

      I don't know of any reason for making the name of the zip file translatable. The zip file can easily be renamed, and giving it a hard-coded generic name makes it consistent with other exported content such as download course content, assignment submissions etc.

      Thus, how about removing the language string exportzipfilename and naming the zip file something like

      customlang-{$a->lang}.zip

      (no need to include the word 'export').

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              tsala Helen Foster
              Huong Nguyen Huong Nguyen
              Andrew Lyons Andrew Lyons
              Kim Jared Lucas Kim Jared Lucas
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Apr/23

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m