You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function to add a new dashboard (as seem in GLPI-Inventory plug-in and on GLPI-core itself) seems to assign the "name" in English, but on GLPI Core, it seems to assign the Dashboard name based on the current GLPI user language during install, as can be seen below:
It would be great if GLPI could provide a way for plug-in and core classes to create translatable Dashboard names. I was able to translate a name if it's in English by adding $dashboard['name'] = __($dashboard['name']); into the foreach loop of getAll() function of Dashboard class, but it would require that the name of the Dashboard is saved in English on DB and to provide a way to ensure that the translation would be gathered by Transiflex since the translation happens on the fly instead of hardcoded, and as since the Transiflex bot doesn't extract those kind of strings, it would not detect the current Dashboard names as translatable as it is.
The text was updated successfully, but these errors were encountered:
This issue has been closed as we only track bugs here.
You can open a topic to discuss with community about this enhancement on suggestion website.
You can also contact GLPI editor team directly if you are willing to sponsor this feature.
Code of Conduct
Contribution description
Hello,
The function to add a new dashboard (as seem in GLPI-Inventory plug-in and on GLPI-core itself) seems to assign the "name" in English, but on GLPI Core, it seems to assign the Dashboard name based on the current GLPI user language during install, as can be seen below:
It would be great if GLPI could provide a way for plug-in and core classes to create translatable Dashboard names. I was able to translate a name if it's in English by adding
$dashboard['name'] = __($dashboard['name']);
into the foreach loop ofgetAll()
function ofDashboard
class, but it would require that the name of the Dashboard is saved in English on DB and to provide a way to ensure that the translation would be gathered by Transiflex since the translation happens on the fly instead of hardcoded, and as since the Transiflex bot doesn't extract those kind of strings, it would not detect the current Dashboard names as translatable as it is.The text was updated successfully, but these errors were encountered: