-
Improvement
-
Resolution: Duplicate
-
Major
-
None
-
2.3.1
-
MOODLE_23_STABLE
-
-
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.