After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760419 - [PATCH] g-ir-compiler --help and g-ir-generate --help shows translated characters as question marks on some locales
[PATCH] g-ir-compiler --help and g-ir-generate --help shows translated charac...
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.43.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-11 05:36 UTC by Ting-Wei Lan
Modified: 2017-05-05 03:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g-ir-compiler, g-ir-generate: Call setlocale in main function (1.48 KB, patch)
2016-01-11 05:38 UTC, Ting-Wei Lan
none Details | Review
g-ir-{compiler,generate,inspect}: Call setlocale in main function (2.11 KB, patch)
2017-05-03 09:29 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-11 05:36:27 UTC
Please see the attached patch. g-ir-compiler and g-ir-scanner should call setlocale in main function in order to correctly show translated messages.

Running 'g-ir-compiler --help' with zh_TW.UTF-8 locale shows:
???
  g-ir-compiler [???] 

?????
  -h, --help                    ???????

???????
  --includedir                  include directories in GIR search path
  -o, --output=FILE             output file
  -m, --module=NAME             module to compile
  -l, --shared-library=FILE     shared library
  --debug                       show debug messages
  --verbose                     show verbose messages


Running 'g-ir-generate --help' with zh_TW.UTF-8 locale shows:
???
  g-ir-generate [???] 

?????
  -h, --help            ???????

???????
  --shlib               handle typelib embedded in shlib
  -o, --output=FILE     output file
  --includedir          include directories in GIR search path
  --all                 show all available information
Comment 1 Ting-Wei Lan 2016-01-11 05:38:09 UTC
Created attachment 318687 [details] [review]
g-ir-compiler, g-ir-generate: Call setlocale in main function

It is required to correctly show translated messages on some locales.
Comment 2 Ting-Wei Lan 2016-07-16 16:03:56 UTC
Does anyone have time to review the patch? It has stayed here for more than 6 months.
Comment 3 Ting-Wei Lan 2016-08-16 07:27:58 UTC
Ping again ... It has stayed for 7 months now ...
Comment 4 Ting-Wei Lan 2017-05-03 09:29:11 UTC
Created attachment 350959 [details] [review]
g-ir-{compiler,generate,inspect}: Call setlocale in main function

It is required to correctly show translated messages on some locales.
Comment 5 Emmanuele Bassi (:ebassi) 2017-05-04 21:11:28 UTC
Review of attachment 350959 [details] [review]:

ACK-by: me.
Comment 6 Ting-Wei Lan 2017-05-05 03:55:52 UTC
Attachment 350959 [details] pushed as 74e4542 - g-ir-{compiler,generate,inspect}: Call setlocale in main function