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

Moodle Standard string_manager: Missing en_local translation intersect

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.3
    • Language
    • MOODLE_402_STABLE

      You can see the variable `$enstring` is assigned before including `/en_local/$file.php`:

      // line 143
      // lib/classes/string_manager_standard.php
       
      include("$CFG->dirroot/lang/en/$file.php");
      $enstring = $string;
       
      // And then corresponding local if present and allowed.
      if (!$disablelocal and file_exists("$this->localroot/en_local/$file.php")) {
          include("$this->localroot/en_local/$file.php");
      }

      And also:

      // line 177
      // lib/classes/string_manager_standard.php
       
      include("$location/lang/en/$file.php");
      $enstring = $string;
      // And then corresponding local english if present.
      if (!$disablelocal and file_exists("$this->localroot/en_local/$file.php")) {
          include("$this->localroot/en_local/$file.php");
      }

      That cause some local translations have been ignored in `array_intersect_key`.

      // line 203
      // lib/classes/string_manager_standard.php
       
      // We do not want any extra strings from other languages - everything must be in en lang pack.
      $string = array_intersect_key($string, $enstring);
      

            Unassigned Unassigned
            moh.azadi Mohammad Azadi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.