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

help.php should prefer _local language pack

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              mudrd8mz David Mudrák added a comment -

              See MDL-8090 as well

              Show
              mudrd8mz David Mudrák added a comment - See MDL-8090 as well
              Hide
              mudrd8mz David Mudrák 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
              mudrd8mz David Mudrák 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
              mudrd8mz David Mudrák added a comment -

              The patch commited in revision 1.36

              Show
              mudrd8mz David Mudrák added a comment - The patch commited in revision 1.36
              Hide
              mudrd8mz David Mudrák added a comment -

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

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

              Fixed in 1.38

              Show
              mudrd8mz David Mudrák added a comment - Fixed in 1.38
              Hide
              mudrd8mz David Mudrák added a comment -

              See MDL-7442 as well

              Show
              mudrd8mz David Mudrák added a comment - See MDL-7442 as well

                People

                • Assignee:
                  mudrd8mz David Mudrák
                  Reporter:
                  mudrd8mz David Mudrák
                  Participants:
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    31/Mar/07