Comment 17 for bug 995287

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

Reviewed: https://review.openstack.org/25820
Committed: http://github.com/openstack/oslo-incubator/commit/d8b66c7c1bb28672402f2bf1e410a1ee8fc4bfb6
Submitter: Jenkins
Branch: master

commit d8b66c7c1bb28672402f2bf1e410a1ee8fc4bfb6
Author: Mark McLoughlin <email address hidden>
Date: Mon Apr 1 02:01:00 2013 +0100

    Add a gettextutils.install() helper function

    Part of fixing bug #995287

    Every top-level script in every project needs to call gettext.install()
    so that a _() builtin function is installed and strings are translated
    using the correct translation domain.

    However, translations are always installed in the default localedir
    (which is commonly '/usr/share/locale') and, in cases like devstack, may
    be found in a project-specific localedir. To support such a use case we
    should have project-specific environment variables for overriding the
    default value of localedir - e.g. NOVA_LOCALEDIR.

    Add a new gettextutils.install() helper method to make this as easy as
    possible for projects to get right.

    Change-Id: I6c8549c8ff00797c96f2dd4b0b5266d18d77aa19