-
Notifications
You must be signed in to change notification settings - Fork 191
Translating Uyuni to your language
Uyuni is developed in English first and for a long time it has been available only in English. Since Uyuni is a fork of Spacewalk, it inherited partial translations but as they were not maintained, they were disabled.
In mid-2020, SUSE started to reintroduce localization capabilities into Uyuni, per request of SUSE Manager customers.
A full translation of Uyuni comprises several "blocks":
- WebUI
- Command-line tools
- Documentation
- YaST module
Each of those blocks, in turn, comprises several pieces.
It is important to note translating Uyuni is not an "all or nothing" effort: you may translate progressively.
First of all, you should identify who your target user is:
- Does he use mostly the command-line tools?
- The WebUI?
- Or maybe he would feel comfortable with using the WebUI and command-line tools in English, and he only wants the documentation to be translation?
Now that you know where to start, one piece of advice: prefer to translate full "blocks", i. e. do not translate a few pages of the WebUI, then some half the installation guide, then 30% of the core command-line tools "block". That kind of translation cannot be made available by default (and maybe not even shipped) because it's everything is incomplete. On the other hand, if you only translate the Installation Guide, that's a perfectly shippable translation.
The source code of Uyuni is all hosted in git repositories, check this page for details:
https://www.uyuni-project.org/pages/source-code.html
To make things easy for translators, we are using the openSUSE WebLate instance to translate Uyuni:
https://l10n.opensuse.org/translate/uyuni/
Strings are pulled from git to WebLate, and pushed the other way around, every few hours in an automated process.
To avoid breaking WebLate because of merge conflicts, translating directly in the git repositories (i. e. a pull request to a GitHub repository which modifies target-language translation files) is NOT allowed. The only exception is translating screenshots, details in the documentation section below.
What I called "blocks" earlier is called "components" in WebLate terminology. Let's dig deeper into them.
As a consequence of the evolution of the Uyuni WebUI and the different technologies used, the strings in the WebUI are split into several WebLate components:
The Java component in WebLate contains the translations for the keys used in java classes, mainly struts actions and related helpers. These keys then will be reflected on the UI pages based on the result of the current action.
XLIFF files are used in Uyuni java codebase. Classes where most of these keys will be used are here
https://github.com/uyuni-project/uyuni/tree/master/java/code/src/com/redhat/rhn/manager
and the XLIFF source file contains a reference to where each string comes from:
The Java-JSP component in WebLate contains the translations for the keys used in JSPs. These keys then will be reflected on the UI pages based on the result of the current action.
JSPs, where these keys are being used:
https://github.com/uyuni-project/uyuni/tree/master/java/code/webapp/WEB-INF/pages
and the XLIFF source file contains a reference to where each string comes from is
The Java Nav component in WebLate contains the translations for the keys used in java classes that build the Navigation menus.
Classes where these keys are being used:
https://github.com/uyuni-project/uyuni/tree/master/java/code/src/com/redhat/rhn/frontend/events
and the XLIFF source file contains a reference to where each string comes from is
The Java Template component in WebLate contains the translations for the keys used in java classes that are used for backend events and actions.
Classes where these keys are being used:
https://github.com/uyuni-project/uyuni/tree/master/java/code/src/com/redhat/rhn/frontend/events
and the XLIFF source file contains a reference to where each string comes from is
The backend component in WebLate contains the translations for the backend tools required by any Uyuni Server: spacewalk-repo-sync, mgr-inter-sync, Oracle ULN authenticator, diskchecker, taskomatic, etc.
Those tools implement i18n using gettext. The source code is here:
https://github.com/uyuni-project/uyuni/blob/master/backend/
and the gettext catalog file contains a reference to where each string comes from:
https://github.com/uyuni-project/uyuni/blob/master/backend/po/spacewalk-backend-server.pot
The mgr-daemon component contains the translations for the Server-side of of the traditional client tools.
The source code is here:
https://github.com/uyuni-project/uyuni/tree/master/client/rhel/mgr-daemon
and the gettext catalog file contains a reference to where each string comes from:
https://github.com/uyuni-project/uyuni/blob/master/client/rhel/mgr-daemon/po/rhnsd.pot
The spacewalk-client-tools component contains the translation for the client-side of the of the traditional client tools.
The source code is here:
https://github.com/uyuni-project/uyuni/tree/master/client/rhel/spacewalk-client-tools
and the gettext catalog file contains a reference to where each string comes from:
The yum-rhn-plugin component contains the translations of another piece of the traditional client tools, specific to yum-based distributions (RHEL, CentOS, Oracle Linux 6 and 7), to connect to the RH CDN.
The source code is here:
https://github.com/uyuni-project/uyuni/tree/master/client/rhel/yum-rhn-plugin
and the gettext catalog file contains a reference to where each string comes from:
https://github.com/uyuni-project/uyuni/blob/master/client/rhel/yum-rhn-plugin/po/yum-rhn-plugin.pot
The spacewalk-abrt component contains the translatios of the ABRT crash reporter.
Advice: do not translate this unless you are really bored, it will probably be removed soon.
The source code is here:
https://github.com/uyuni-project/uyuni/tree/master/client/tools/spacewalk-abrt
and the gettext catalog file contains a reference to where each string comes from:
https://github.com/uyuni-project/uyuni/blob/master/client/tools/spacewalk-abrt/po/spacewalk-abrt.pot
The susemanager component contains the translatios for the YaST module to configure Uyuni after installation.
If you want to check where some string is used, you can find the code where these strings where extracted in the Ruby (.rb) files here:
https://github.com/uyuni-project/uyuni/tree/master/susemanager/yast
and the gettext catalog file contains a reference to where each string comes from:
https://github.com/uyuni-project/uyuni/blob/master/susemanager/po/susemanager.pot
Look for strings enclosed in the usual "_" (underscore) gettext prefix, e. g. susemanager/yast/susemanager_db.rb
Popup.Error(
Builtins.sformat(
_("The password should have at least %1 characters."),
7
)
)
- docs ROOT: common elements to all documentation guides
- docs installation: Installation Guide. You should start here.
- docs upgrade: Upgrade Guide. Another must-have.
- docs client-configuration: Client Configuration Guide. Another must-have.
- docs retail: Uyuni for Retail specific bits
- docs salt: Salt Guide.
- docs administration: Administration Guide. Huge.
- docs reference: Reference Guide. Huge.
- docs quickstart-public-cloud: QuickStart Guide for Public Cloud. Short and provides useful information. You should translate it after the Client Configuration Guide.
- docs quickstart-sap: QuickStart Guide for SAP users. Short and provides useful information.
- docs large-deployments: Large Deployments Guide
- docs architecture: Architecture Guide. Do not translate, as it is still incomplete in English.
You can read the documentation in English in the Uyuni website: https://www.uyuni-project.org/uyuni-docs/uyuni/index.html
The Uyuni documentation is written in AsciiDoc format (source files here).
Since neither WebLate nor any other translation tool supports AsciiDoc natively, we convert it to gettext (.pot/.po), submit it to WebLate and then do the opposite. Translated AsciiDoc is generated at build time, it is not stored in the git repository.
It is important to note all guides contain some screenshots.
At this moment, WebLate cannot manage "translation" of screenshots (i. e. taking a screenshot of the screen in the target language and replacing the screenshot in English), so the only way to provide "translated" screenshots is to create a pull request to the uyuni-docs git repository in GitHub.
This is the only case where translations are allowed outside WebLate.
As of this writing, the following parts of Uyuni are not enabled for translation:
- spacecmd
- dnf-plugin-spacewalk
- None of the tools in the utils directory, even though we ship them in the
spacewalk-utils
andspacewalk-utils-extra
packages
Enabling them for translation is rather easy (a matter of adding wrapping the strings for gettext, adding a few lines of boilerplate code and a Makefile target to extract them). Contributions are welcome!