Translating phosphor-webui [GUI accessibility]
jrey at linux.vnet.ibm.com
Wed Dec 19 06:19:41 AEDT 2018
The GUI design team talked about an attempt to translate the web GUI
during the OpenBMC Community Call held on 12/17/2018. Here are my notes
of that conversation together with my comments.
An attempt was made to translate the phosphor-webui web application
from English into German, Chinese, and other languages. This
code also likely contains English phrases which would need to be
The approach was to copy and modify the English HTML files, one set for
each target language. For example, bmc-reboot-controller.html (but I
didn't record which files were shown during the call). To use the
translated version, simply replace the English version with the
translated version in your OpenBMC image, and your browser will show the
Performing the translation was difficult because the English sentences
were built from phrases with replacement text in the middle of the
sentence. For example, in the sentence, "The processor temperature of
60 degrees is over the limit of 58", can built from HTML like:
<p>The processor temperature of</p><script>...get the
temp...</script><p>degrees is over the limit.</p>.
This presents a problem for translation centers who typically receive
each phrase separately and may not have visibility to the entire
One might think you could simply re-arrange the HTML elements, including
the replacement fields, into the sequence you need, but translation
centers are not typically set up for that. Besides that, we don't want
to trust them messing with our HTML files: that is not their expertise.
The problem becomes impossible to translate correctly when the word
order must be changed (which happens regularly for German) such that the
replacement text (e.g., 58 and 60 in the example above) must be
rearranged. A translation center would reject this and create an issue
for the web developer to fix this problem. Hence the recommendation
(requirement?) is to always keep entire sentences together and never
build them up from phrases.
We discussed using the AngularJS translation framework.
There were some problems with the way the translated text appeared in
the web browser window. Some of the translated text was much longer
than the English versions; and some of these were clipped instead of
flowed. These problems are being addressed by fixing the HTML and CSS
We talked about other things that may require translation.
- Translated Redfish schemas for example described by DSP8011.
Redfish schemas are JSON files served by the BMCWeb HTTP server which
contain English descriptions of the Redfish APIs. In BMCWeb, they are
stored here .
- Are the sensor names supposed to be translated or not?
- Do we need to translate any phrases in interfaces like the REST APIs
(Redfish and phosphor-rest), ipmitool, openbmc-tool, and ssh? The
thinking was that these are not good candidates for translation.
The decision to translate is driven by balancing the cost of translation
and preparing for translation (which can be high in terms of developer
effort and $$) compared to the benefit of the project being usable by a
wider international audience.
More information about the openbmc