Moodle
  1. Moodle
  2. MDL-8089

help.php should prefer _local language pack

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Language
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE
    • Rank:
      37166

      Description

      Reported by Terry Wade at http://moodle.org/mod/forum/discuss.php?d=61445

      Current help.php does not search _local packs for help files. IMHO there should be the same behaviour as with normal strings. The help folder in _local packs should have precedence.

        Issue Links

          Activity

          Hide
          David Mudrak added a comment -

          See MDL-8090 as well

          Show
          David Mudrak added a comment - See MDL-8090 as well
          Hide
          David Mudrak added a comment -

          The following patch works for me:

          RCS file: /cvsroot/moodle/moodle/help.php,v
          retrieving revision 1.34
          diff -c -r1.34 help.php

              • help.php 22 Aug 2006 22:12:17 -0000 1.34
              • help.php 6 Jan 2007 00:11:36 -0000
                ***************
              • 34,39 ****
              • 34,47 ----
                // Get the list of parent languages.
                if (empty($forcelang))
                Unknown macro: { $langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback+ // _local language packs take precedence+ $xlangs = array();+ foreach ($langs as $lang) { + $xlangs[] = $lang . '_local'; + $xlangs[] = $lang; + }+ $langs = $xlangs;+ unset($xlangs); }

                else

                { $langs = array($forcelang); }
          Show
          David Mudrak added a comment - The following patch works for me: RCS file: /cvsroot/moodle/moodle/help.php,v retrieving revision 1.34 diff -c -r1.34 help.php help.php 22 Aug 2006 22:12:17 -0000 1.34 help.php 6 Jan 2007 00:11:36 -0000 *************** 34,39 **** 34,47 ---- // Get the list of parent languages. if (empty($forcelang)) Unknown macro: { $langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback+ // _local language packs take precedence+ $xlangs = array();+ foreach ($langs as $lang) { + $xlangs[] = $lang . '_local'; + $xlangs[] = $lang; + }+ $langs = $xlangs;+ unset($xlangs); } else { $langs = array($forcelang); }
          Hide
          David Mudrak added a comment -

          The patch commited in revision 1.36

          Show
          David Mudrak added a comment - The patch commited in revision 1.36
          Hide
          David Mudrak added a comment -

          Reopening - see Gisela Hillenbrand's post at http://moodle.org/mod/forum/discuss.php?d=61445#290133

          Show
          David Mudrak added a comment - Reopening - see Gisela Hillenbrand's post at http://moodle.org/mod/forum/discuss.php?d=61445#290133
          Hide
          David Mudrak added a comment -

          Fixed in 1.38

          Show
          David Mudrak added a comment - Fixed in 1.38
          Hide
          David Mudrak added a comment -

          See MDL-7442 as well

          Show
          David Mudrak added a comment - See MDL-7442 as well

            People

            • Assignee:
              David Mudrak
              Reporter:
              David Mudrak
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: