[openstack-dev] [tripleo][ui] another i18n proposal for heat templates 'description' help strings
flfuchs at redhat.com
Tue May 9 15:01:58 UTC 2017
On Mon, May 8, 2017 at 10:20 AM, Peng Wu <peng.e.wu at gmail.com> wrote:
> Hi Julie,
> URL: https://pwu.fedorapeople.org/openstack-i18n/tripleo/tripleo-heat
> And the code to generate the above file is in:
> The generated file need to be copied to tripleo-ui project, and
> Please review it, thanks!
Thanks for the update Peng! A few comments:
1. A minor thing: The file is missing the import for the
defineMessages function, so that would have to be added here.
2. The UI looks up messages by their object key, not the message id
(random examples: ). The current naming would make that quite hard
(description1, description2, descriptionN, ...). Ideally the key would
be created using some reproducible conventions. For instance, the UI
stores EnvironmentGroups by their title, Environments by their file
path and Parameters by their name. If the message keys would reflect
this structure, the UI could look up the objects dynamically, based on
the naming conventions.
Two more things I noticed:
I count roughly 3400 occurrences of the word "description" in current
tripleo-heat-templates. I'm not sure we need them all (your current
example file only lists about 600, which would still be an acceptable
number I guess), but if we do, we should probably think about some
dynamic way to load messages in the UI and not put them all into one
We need to handle cases where translatable t-h-t strings don't have a
corresponding message object in the generated js file. That's probably
not a big thing, but something we have to take care of.
More information about the OpenStack-dev