Shawn Walker wrote:

> >>src/modules/client/history.py:
> >>  lines 107-109: I don't think we should have this here.  Only the
> >>main program module should be setting locale information.
> >
> >When pkg command is run pkg.client.api is imported as api. The api in
> >turn imports pkg.client.history as history. During import the _()
> >function should be available. If not available then gets the error :
> >
> >    NameError: name '_' is not defined
> >
> >So I think the lines 107 to 109 which install _() function cannot be
> >removed from history.py file.
> 
> Then we need to consider installing the gettext handler early before our
> imports are done.

That might be trickier than the alternative, which is to redo the way
result_l10n is set in history.py.  We should probably call _() in the one
place it's actually used, and use N_(), possibly in the class definition,
or maybe in _HistoryOperation.__new__(), so that it gets put into pkg.pot.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to