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

Role names optionally translated from the language packs if available.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Download any other language than english (brazilian Portuguese, for example).
      Set the user default languange to the chosen one;
      Than navigate through Moodle where there are Roles listing, assignments and related stuff.

      Show
      Download any other language than english (brazilian Portuguese, for example). Set the user default languange to the chosen one; Than navigate through Moodle where there are Roles listing, assignments and related stuff.
    • Workaround:
      Hide

      Apply the patch 'accesslibv2.php.patch' included;
      Create the new language strings as informed;
      Clean language cache.
      Than navigate through Moodle where there are Roles listing, assignments and related stuff.

      Show
      Apply the patch 'accesslibv2.php.patch' included; Create the new language strings as informed; Clean language cache. Than navigate through Moodle where there are Roles listing, assignments and related stuff.
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      Role names are used constantly under Moodle, even out of the course contexts.

      For now, the options are:
      1- For a system wide update -> Translate the Role name accessing "/admin/roles/define.php?action=edit&roleid=<INT_ROLEID>";
      2- For the course context -> Set locallized values for each course accessing "/course/edit.php?id=<INT_COURSEID>".

      Moodle interface is ready for translations everywhere. It would be nice if we could have a simple option (not mandatory) to translate roles from the /lang/<LOCAL_LANGUAGE>/roles.php file, as any other word under Moodle.

      As an Administrator, many screens do not support the role name translations.
      When there was not made the translations to the roles system wide, most of these screens fails.
      For teachers, if they work on different languages, de only option should be redoing the work again and again for each course. There are some teachers that may not understand english, we should assume.
      Keeping the role names translateable like everything else is the best option here.

      The translation importance order will be:
      1- Localized course strings, if set (as default);
      2- Localized translated strings (new);
      3- Database persisted role name values (as default).

      This way, Moodle could still work as always, but will allow administrators updating their own translation packs, as required.

      The pattern used here is:

      rolename:<ROLE_SHORT_NAME>

      // For english translations we could use:
      $string['rolename:coursecreator'] = 'Course creator';
      $string['rolename:editingteacher'] = 'Teacher';
      $string['rolename:frontpage'] = $string['frontpageuser'];
      $string['rolename:guest'] = 'Guest';
      $string['rolename:manager'] = $string['manager'];
      $string['rolename:student'] = 'Student';
      $string['rolename:teacher'] = 'Non-editing teacher';
      $string['rolename:user'] = 'Authenticated user';

      // For brazilian portuguese translations we could use:
      $string['rolename:coursecreator'] = 'Criador de cursos';
      $string['rolename:editingteacher'] = 'Professor';
      $string['rolename:frontpage'] = $string['frontpageuser'];
      $string['rolename:guest'] = 'Usuário convidado';
      $string['rolename:manager'] = $string['manager'];
      $string['rolename:student'] = 'Estudante';
      $string['rolename:teacher'] = 'Monitor';
      $string['rolename:user'] = 'Usuário autenticado';

      And so on...

      Patch included.

        Attachments

        1. accesslib.php.patch
          2 kB
        2. accesslibv2.php.patch
          5 kB
        3. en_role.php.patch
          0.9 kB

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              luis.alcantara Luis Gustavo Mueller de Alcantara
              Participants:
              Component watchers:
              David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: