Moodle
  1. Moodle
  2. MDL-14743

Allow user to change language of help article to english and back directly in help window

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.5
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      36566

      Description

      This improvement add at bottom of help page link to english version and back to current language version. This is very good for translators and other users for compare english original and translated version. Because translated version not always up to date this feature allows to read actual english version.

      1. help.php.patch
        1 kB
        Dmitry Pupinin
      2. MDL-14743.patch.txt
        2 kB
        David Mudrak
      3. v194_help.php.patch
        1 kB
        Dmitry Pupinin

        Issue Links

          Activity

          Hide
          Dmitry Pupinin added a comment -

          Patch for Moodle 1.9.4+ added

          Show
          Dmitry Pupinin added a comment - Patch for Moodle 1.9.4+ added
          Hide
          Dmitry Pupinin added a comment -

          Assigned to Eloy because by default this was assign to Nobody.

          Show
          Dmitry Pupinin added a comment - Assigned to Eloy because by default this was assign to Nobody.
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          Adding some people here...

          I think it's a good idea to offer that "switch to/from English" feature in help files.

          Just thinking if that should be showed only to admins or, at least, be enable/disable it by some $CFG setting... any comment will be welcome.

          Thanks for the idea and patch, Dmitry!

          Show
          Eloy Lafuente (stronk7) added a comment - - edited Adding some people here... I think it's a good idea to offer that "switch to/from English" feature in help files. Just thinking if that should be showed only to admins or, at least, be enable/disable it by some $CFG setting... any comment will be welcome. Thanks for the idea and patch, Dmitry!
          Hide
          David Mudrak added a comment -

          My +0x00000001 to have this in both the STABLE and HEAD.

          IMO there is no additional setting needed to allow this because:

          1) remember the Basic Rule of Help Files - they don't read it
          2) all users should be able to easily get actual and full help - not just admins, teachers or some privileged roles
          3) this does not influence UI too much so I do not expect objections

          I am going to test and patch tomorrow so it can be reviewed and QA'ed during the tuesday

          Thanks for the patch, Dmitry!

          Show
          David Mudrak added a comment - My +0x00000001 to have this in both the STABLE and HEAD. IMO there is no additional setting needed to allow this because: 1) remember the Basic Rule of Help Files - they don't read it 2) all users should be able to easily get actual and full help - not just admins, teachers or some privileged roles 3) this does not influence UI too much so I do not expect objections I am going to test and patch tomorrow so it can be reviewed and QA'ed during the tuesday Thanks for the patch, Dmitry!
          Hide
          Artem Andreev added a comment -

          +1 for visibility of link to all

          Show
          Artem Andreev added a comment - +1 for visibility of link to all
          Hide
          David Mudrak added a comment -

          I have slightly modified the Dmitry's patch:

          • now it displays "Show this help in language: English" text link instead of the plain shortcut "en" (replaces English with the corresponding current language name if offering a backward link) - this needs new string in moodle.php
          • it does not offer a link to the English help file if such one is already displayed due to "fallback to English" feature
          Show
          David Mudrak added a comment - I have slightly modified the Dmitry's patch: now it displays "Show this help in language: English" text link instead of the plain shortcut "en" (replaces English with the corresponding current language name if offering a backward link) - this needs new string in moodle.php it does not offer a link to the English help file if such one is already displayed due to "fallback to English" feature
          Hide
          David Mudrak added a comment -

          This is the patch I am going to use against the MOODLE_19_STABLE

          Show
          David Mudrak added a comment - This is the patch I am going to use against the MOODLE_19_STABLE
          Hide
          David Mudrak added a comment -

          Fixed in MOODLE_19_STABLE and merged into HEAD

          Show
          David Mudrak added a comment - Fixed in MOODLE_19_STABLE and merged into HEAD
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi David,

          just looking your patch... what happens if the currentlang help file doesn't exist and moodle defaults to the en_utf8 one? Will the link to the (un-existing) currentlang file be showed? Reading help.php it seems that it always set $helpfound to true, no matter if it's the currentlang or the fallback (en_utf8). Just one case for testing...ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi David, just looking your patch... what happens if the currentlang help file doesn't exist and moodle defaults to the en_utf8 one? Will the link to the (un-existing) currentlang file be showed? Reading help.php it seems that it always set $helpfound to true, no matter if it's the currentlang or the fallback (en_utf8). Just one case for testing...ciao
          Hide
          David Mudrak added a comment -

          > Will the link to the (un-existing) currentlang file be showed?
          no

          $helpfound is checked just for cases when the help file does not exists even in the English pack

          Show
          David Mudrak added a comment - > Will the link to the (un-existing) currentlang file be showed? no $helpfound is checked just for cases when the help file does not exists even in the English pack
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Tested and working ok. Closing. Thanks David! B-)

          Show
          Eloy Lafuente (stronk7) added a comment - Tested and working ok. Closing. Thanks David! B-)

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: