Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for translatable Dashboard items #18810

Closed
1 task done
eduardomozart opened this issue Jan 24, 2025 · 1 comment
Closed
1 task done

Add support for translatable Dashboard items #18810

eduardomozart opened this issue Jan 24, 2025 · 1 comment

Comments

@eduardomozart
Copy link
Contributor

Code of Conduct

  • I agree to follow this project's 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:

Image

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.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants