Bug 892602

Summary: Ensure translations are installed correctly and picked up at runtime
Product: Red Hat OpenStack Reporter: Mark McLoughlin <markmc>
Component: openstack-novaAssignee: Sven Anderson <svanders>
Status: CLOSED CURRENTRELEASE QA Contact: Shai Revivo <srevivo>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: apevec, eglynn, sgordon, svanders
Target Milestone: ---Keywords: Reopened, Triaged, ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1086247 (view as bug list) Environment:
Last Closed: 2017-05-16 15:52:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1086247    
Bug Blocks: 978541, 1295785    

Description Mark McLoughlin 2013-01-07 11:30:08 UTC
This probably applies to all services, but let's start with Nova ...

Firstly, we don't include compiled message catalogs in our packages (i.e. .mo files) - we should be able to do e.g. 'python setup.py compile_catalog' to help with this. To understand what's going on here, read docs about babel and look at setup.cfg.

Secondly, at runtime, we do:

  gettext.install('nova', unicode=1)

which means that gettext looks for message catalogs in e.g.

  /usr/share/locale/$LANG/LC_MESSAGES/nova.mo

so, we either need to install them there or use the 'localedir' argument to gettext.install() to tell gettext where they are

Comment 10 Sven Anderson 2016-02-02 12:02:59 UTC
Babel has merged a necessary patch upstream: https://github.com/python-babel/babel/pull/335
Waiting for next babel release.