In this discussion, I will be sharing the lines of code I have found that Gibbon is missing its translation feature…
Filename: \modules\User Admin\role_manage_add.php
$row->addLabel(‘restriction’, __(‘Restriction’))->description(‘Determines who can grant or remove this role in Manage Users.’);
It should be:
$row->addLabel(‘restriction’, (‘Restriction’))->description((‘Determines who can grant or remove this role in Manage Users.’));
I found another in the file livevalidation_standalone.compressed.js
alert(“This form has not been correctly filled. Please scroll up and fix any errors indicated in red.”);
I found another page with a missing translation feature.
Filename: /modules/User Admin/role_manage_edit.php
// English value and shown in the Edit form in English
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.
there is no entry for a translation string for “Admin only” in Poeditor.
There is in fact an entry or: “Administrators only”
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!
We have two similar phrases in the Gibbon core files:
Year Group at Entry — Year Group of Entry
One does have a translation entry in POEditor, the other does not.
the phrase Year Group of Entry, only appears in studentApplicationForm.yml
We need to either add this phrase to the translation strings, or change it to the phrase that does appear in POEditor.
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…
Another file that needs a translation feature:
// Filename: modules\Students\student_view_details.php
$col->addColumn(‘languageFirst’, __(‘First Language’));
$col->addColumn(‘languageSecond’, __(‘Second Language’));
$col->addColumn(‘languageThird’, __(‘Third Language’));
$col->addColumn(‘languageFirst’, __(‘First Language’))->translatable();
$col->addColumn(‘languageSecond’, __(‘Second Language’))->translatable();
$col->addColumn(‘languageThird’, __(‘Third Language’))->translatable();
Thanks Manuel, much appreciated. It’s fixed here: https://github.com/GibbonEdu/core/commit/31ba26f1616d0490c927c403b5f138989f9486c5
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 : )