Hi,

  For TripleO UI project, some users requested to translate the web UI.
But some web UI string are from heat template files in tripleo-heat-
templates project.

  In order to get translated templates displayed in tripleo-ui, we
propose a blueprint as follows, which needs to change code in heat,
tripleo-heat-tempates and tripleo-ui projects.

  I18n proposal for heat templates 'description' help strings

  1. Update heat project to accept "translation-domain" header in
RESTful request, like "translation-domain: tripleo-heat-templates"

     a. With "translation-domain" header, heat will try to translate
"title" and "description" field using "tripleo-heat-templates.po"

     b. Without "translation-domain" header, heat will return the
fields like before

     c. Add some field in config file for security to have a list of
        allowed "translation-domain",
        like "allowed-translation-domains: ['tripleo-heat-templates',
...]"

  2. Update tripleo-heat-templates to generate the translation files,
     like "tripleo-heat-templates.pot"

     a. May need to write python script to extract "title" and
"description" field from yaml files

     b. May need to integrate into python babel config or use separate
po files


  3. Update tripleo-ui to use locale API with "translation-domain"
header to ask the RESTful response with translated "title" and
"description" fields from heat services

     a. tripleo-ui will send request with two additional headers:
        "Accept-Language" and "translation-domain: tripleo-heat-
templates"

  Please evaluate it, thanks!

Regards,
  Peng

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to