Updated openstack/openstack
Project: openstack/oslo-incubator  3d90045d2d1ce1df89f75937f415e3982e111063

Backport code for i18n to check lazy at runtime

Currently in the oslo-incubator version of i18n support
the TranslationFactory generates a direct translation
method based on the passed lazy parameter.   This means that
when the default is assigned to _ during its intial import,
lazy isn't specified, which defaults to False, so the
TranslationFactory returns a method that does not support
lazy translation.

The _ method is not changed until enable_lazy is called, thus
any import of _ prior to that will cache the initial method
that does not support lazy translation even when it has been
enabled.

This problem was exposed by the cinder test case:
  cinder/tests/test_wsgi.py
test
  test_cinder_exception_with_localized_explanation

when the file:
  cinder/api/middleware/fault.py
had the line:
  from cinder.openstack.common.gettextutils import _
added to it.

This behavior is corrected in the i18n library such that the
generated method checks the global _lazy.USE_LAZY to determine
if lazy translation should be used in commit:

   Iae22668 Check the lazy flag at runtime

Note that this removes the lazy parameter from the signature of
install and the TranslationFactory to match the library.

Change-Id: If1832b012d4b72708d0850367a1ec55cb0cd63e8