load gettext in __init__ to fix '_ is not defined'

gettext.install needs to be run on every potential entrypoint; this
resolves bug #885529 (the python standard library includes a noop
gettext library for this purpose). This is also how nova does it.

Change-Id: I4ceaa4782461ebf6d27836336f288d79ba15cf2d
This commit is contained in:
Mike Lundy 2011-11-08 10:57:27 -08:00
parent 5e6fb33b22
commit 8f122d954b
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Ken Pepple <ken.pepple@gmail.com>
Kevin L. Mitchell <kevin.mitchell@rackspace.com>
Mark McLoughlin <markmc@redhat.com>
Matt Dietz <matt.dietz@rackspace.com>
Mike Lundy <mike@pistoncloud.com>
Monty Taylor <mordred@inaugust.com>
Rick Clark <rick@openstack.org>
Rick Harris <rconradharris@gmail.com>

View File

@ -14,3 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import gettext
gettext.install('glance', unicode=1)