Hi Pete,

My understandings are:

On 2012年06月20日 22:55, Peter Dennis wrote:
Hi Abhi,

One question (and maybe someone else can comment here),
both of which are trivial things.

pkglint.py:

line 35/36 should this setting of gettext.install()
be on line 63 so it is within the main_func()
as per all the other commands which have a
main_func ?

As far as both of these are met, the call can be moved to main_func()
without causing "'_' not defined" error:
- No _() call outside of method def's
- No _() call in some method(s) which may be called before or
  instead of main_func()

Additionally should it have a
misc.setlocale(locale.LC_ALL, "", error)

From python gettext documentation,
http://docs.python.org/release/2.6.8/library/gettext.html#class-based-api
gettext.install (-> translation -> find) looks not be affected by
locale.setlocale(), but reads locale environments (and $LANGUAGE) directly.

So as far as the command does not use API which are affected by
setlocale() (e.g. time format, numeric format, ...) I think the
setlocale() call is not needed.

Thanks,
Takeshi


Pete


On 06/15/12 12:40, Abhinandan Ekande wrote:
Folks,

Please review fix for CR :
7166082 pkg command does not handle Japanese character encoding on
Solaris 11

webrev :
https://cr.opensolaris.org/action/browse/pkg/ae112802/7166082-rev1/webrev/

Unit testing done.

Ran the IPS test suite. All tests passed.

The following files are related to GUI hence no modifications required.
Basically the GUI works without the codeset changes for gettext().

src/updatemanager.py
src/modules/gui/misc.py
src/checkforupdates.py

The following files used during build, hence did not do codeset changes
for gettext() :

src/util/publish/update_file_layout.py
src/util/qual-simulator/scenario.py

Thanks,
Abhi.

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

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

Reply via email to