Hi Manuel, thanks for these. I’ve fixed the issue in Add Role, which you can see here. The javascript translation is trickier. We are ideally looking to move to a different validation library in the coming versions, so this may be best addressed in a future version, rather than editing the livevalidation_standalone.compressed.js file.
// English value and shown in the Edit form in English
Line #69:
$row->addTextField(‘category’)->required()->readonly()->setValue($role[‘category’]);
Line #76
$row->addTextField(‘name’)->required()->maxLength(20)->readonly($isReadOnly)->setValue($role[‘name’]);
Line #110
$row->addTextField(‘restriction’)->required()->readonly()->setValue(‘Admin Only’);
Right now, these values are coming from the DB and showing as hard-coded values. If in the role_manage_editProcess.php file these fields that are NOT important, then this can be fixed easily because add __() to these readOnly Textfields. But if the values must stay in English, they this cannot be done this way.
Hi Manuel, well spotted! These aren’t as easy to catch for English users of the system, so we appreciate you finding and sharing them. I’ve made a fix in v24, which can be found here: https://github.com/GibbonEdu/core/commit/85a8d9752d9003895e6f2a5549852197ef8242b7 The workaround is to pass the database value as a hidden value, and display the translated string. Thanks!
I apologize for using this method (I really am working toward learning how to GitHub for a better collaboration)… Very soon!! But until then… I’ll keep sharing via ask.gibbon these suggestions…
For GitHub, you may not need to go as far as setting up everything locally, the web interface can be useful for small changes. You could navigate to the file from the core https://github.com/GibbonEdu/core and then use the edit button, which has an interface at the bottom for making a commit and a PR : )