Separate translation domain for log messages

Registered by Mark McLoughlin on 2013-01-07

If we want to i18n log messages, I think they should be in a separate translation domain from the messages we return to users of the REST API.

The problem with having them both in the same translation domain is that translators have no way of prioritizing the REST API messages nor do administrators have any way of disabling the translation of log messages without the translation of the REST API messages.

Blueprint information

Status:
Complete
Approver:
Mark McLoughlin
Priority:
High
Drafter:
Mark McLoughlin
Direction:
Approved
Assignee:
Doug Hellmann
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Doug Hellmann on 2013-12-21
Completed by
Doug Hellmann on 2014-02-25

Related branches

Sprints

Whiteboard

Related etherpad - https://etherpad.openstack.org/havana-oslo-i18n-strategy

Some initial examples of how we might do this: http://lists.openstack.org/pipermail/openstack-dev/2013-January/004272.html

Un-assigning myself from this for now -- markmc

Additional details discussed in https://etherpad.openstack.org/p/icehouse-oslo-i18n-policies -- dhellmann

Gerrit topic: https://review.openstack.org/#q,topic:bp/log-messages-translation-domain,n,z

Addressed by: https://review.openstack.org/65518
    Add support for translating log levels separately

Addressed by: https://review.openstack.org/65519
    Update oslo log messages with translation domains

this bp still has many items in TODO and patches waiting for review. Moving to i-3

During the team meeting 2014-01-31 we agreed to skip translating DEBUG messages entirely for now, and consider adding them back later if operators need them. http://eavesdrop.openstack.org/meetings/oslo/2014/oslo.2014-01-31-14.01.html - dhellmann

Addressed by: https://review.openstack.org/70455
    Update oslo log messages with translation domains

Gerrit topic: https://review.openstack.org/#q,topic:75499,n,z

Addressed by: https://review.openstack.org/75499
    Update log translation domains

----

The code for this is in place in oslo-incubator, but we need to update the build steps that manage the catalogs. I'm not sure that's a good idea, this close to the string freeze, so we may have to wait to roll out this work during the juno cycle. - dhellmann

Addressed by: https://review.openstack.org/76440
    Use _LI instead of _ for info message translation

(?)

Work Items

Work items:
create new translation functions in gettextutils: DONE
write tests for them, including lazy and non-lazy scenarios: DONE
update the incubator code to use the new functions for log message translation: DONE
document how to use the new functions in LoggingStandards (and announce on the ML): TODO
clean up the translation related jobs in infra: TODO
loop over the log levels to extra messages for all of them: TODO
loop over the log levels to register the new resources with transifex: TODO
loop over the log levels to update the catalogs: TODO

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.