Heat i18n support isn't complete, messages should be wrapped by "_" function

Bug #1199695 reported by David Jia
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Angus Salkeld

Bug Description

Heat has enabled i18n support, but there are a lot of messages in source code aren't wrapped by "_" function, for example:

https://github.com/openstack/heat/blob/master/heat/api/aws/exception.py#L74

https://github.com/openstack/heat/blob/master/heat/api/aws/ec2token.py#L101

those messages can't be captured into po file and translated.

we should keep consistency with Oslo codes, such as:

https://github.com/openstack/heat/blob/master/heat/openstack/common/service.py#L122

Revision history for this message
YangLei (yanglyy) wrote :

Hi Angus Salkeld,

Does heat have the same situation like ceilometer, when do code changes for heat i18n support?

--------------------https://bugs.launchpad.net/ceilometer/+bug/1199678
--------------------https://review.openstack.org/#/c/36774/

Doug Hellmann Jul 12

Patch Set 2: I would prefer that you didn't merge this

Nova has had issues with reaching a useful level of translation because the log messages introduced a large number of low priority messages into the translation system. Error messages are more important, so we should make sure we have significant coverage there before adding more messages. We may also want to wait for the "low priority" translation domain work to land in Oslo so we can use that for log messages.

How many of our existing messages have been translated? Are 100% translated into any language?
-----------------------

Revision history for this message
Angus Salkeld (asalkeld) wrote :

IMO I think we need to support translations for warnings and above if this is consistent with the other openstack projects.
Heat currently does a poor job at this, so it needs some work. But easy enough to do.

Revision history for this message
YangLei (yanglyy) wrote :

Angus Salkeld,

Any blueprint for it? Do we wait for :
"We may also want to wait for the "low priority" translation domain work to land in Oslo so we can use that for log messages."

Revision history for this message
Angus Salkeld (asalkeld) wrote :

I think the exception messages need to be wrapped in _()

Changed in heat:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/52552

Changed in heat:
assignee: nobody → Angus Salkeld (asalkeld)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/52553

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/52554

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/52552
Committed: http://github.com/openstack/heat/commit/6895615582c4d868c589736993c4cdbd03f05116
Submitter: Jenkins
Branch: master

commit 6895615582c4d868c589736993c4cdbd03f05116
Author: Angus Salkeld <email address hidden>
Date: Fri Oct 18 10:40:41 2013 +1100

    Wrap api exceptions in _()

    Change-Id: Ie9a60d919b3657ae23fe2f8c67d18d21f571af14
    Partial-bug: #1199695

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/52553
Committed: http://github.com/openstack/heat/commit/5e9ed5ed5fe413787c124da146ba52a2bcfdf4ea
Submitter: Jenkins
Branch: master

commit 5e9ed5ed5fe413787c124da146ba52a2bcfdf4ea
Author: Angus Salkeld <email address hidden>
Date: Fri Oct 18 10:43:43 2013 +1100

    Wrap common exceptions in _()

    Change-Id: Idb7aabc1dbabc0bbcb9b8b3892372059024c55c3
    Partial-bug: #1199695

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/52554
Committed: http://github.com/openstack/heat/commit/f876b6b175d7893c1b7001d26c225b6100c0930e
Submitter: Jenkins
Branch: master

commit f876b6b175d7893c1b7001d26c225b6100c0930e
Author: Angus Salkeld <email address hidden>
Date: Fri Oct 18 11:23:49 2013 +1100

    Wrap engine exceptions in _()

    Change-Id: Id68baa3542ec2804169a4411a9b6962a96487ec3
    Partial-bug: #1199695

Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in heat:
status: In Progress → Fix Committed
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.