[et-mgmt-tools] [PATCH 1/2] Build and install locale files if present.

Daniel P. Berrange berrange at redhat.com
Tue Jul 10 01:54:45 UTC 2007


On Mon, Jul 09, 2007 at 03:49:12PM -0400, Cole Robinson wrote:
> > Its a bit of a problem because it will clash with the translation catalog
> > installed by virt-manager. So the combo of 
> > 
> >      gettext.install(gettext_app, gettext_dir)
> > 
> > Along with the use of '_' will end up trying to pull translations from
> > virt-manager's catalog.  What you need to do is not call gettext.intsall
> > or locale.setlocal at all - simple have the bindtextdomain call in the
> > __init__  file.  Then you need to define a convenience wrapper using
> > dgettext
> > 
> >     def _virtinst(msg):
> >        return gettext.dgettext(getext_app, msg)
> > 
> > And finally, in each of the virtinst .py files I think you need:
> > 
> >    from virtinst import _virtinst as _
> > 
> > Finally, the virt-install, and virt-clone commands also need to have the 
> > locale.setlocale, and gettext.install commands in them.
> > 
> 
> Updated patch is attached.

Ok I tested with both virt-install, and virt-manager and confirmed it is
doing the right thing. So I've committed this & the other patch. The only
change I made was to build the .mo files in build/po, instead of building
then in po, and then moving to build/po-rename. This avoids generated
files in the main source dir.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the et-mgmt-tools mailing list