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 760417 - [PATCH] ephy-profile-migrator --help shows translated characters as question marks on some locales
[PATCH] ephy-profile-migrator --help shows translated characters as question ...
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: I18N
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-11 04:17 UTC by Ting-Wei Lan
Modified: 2016-01-13 18:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-profile-migrator: Call setlocale in main function (976 bytes, patch)
2016-01-11 04:18 UTC, Ting-Wei Lan
none Details | Review
ephy-profile-migrator: Call setlocale and gettext functions in main function (1.49 KB, patch)
2016-01-13 10:38 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-11 04:17:31 UTC
Please see the attached patch. ephy-profile-migrator should call setlocale in main function in order to correctly show translated messages.

Running 'ephy-profile-migrator --help' with zh_TW.UTF-8 locale shows:
???
  ephy-profile-migrator [???] 

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

???????
  -d, --do-step         ???? n ?????
  -v, --version         ??????????
  -p, --profile-dir     ?????????????
Comment 1 Ting-Wei Lan 2016-01-11 04:18:16 UTC
Created attachment 318685 [details] [review]
ephy-profile-migrator: Call setlocale in main function

It is required to correctly show translated messages on some locales.
Comment 2 Michael Catanzaro 2016-01-11 16:08:07 UTC
Review of attachment 318685 [details] [review]:

You don't also need the usual:

  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);

?
Comment 3 Ting-Wei Lan 2016-01-13 10:38:24 UTC
Created attachment 318943 [details] [review]
ephy-profile-migrator: Call setlocale and gettext functions in main function

It is required to correctly show translated messages on some locales.

Yes, I should add them to make it find the correct .mo file.
Comment 4 Michael Catanzaro 2016-01-13 16:47:50 UTC
Review of attachment 318943 [details] [review]:

Thanks!
Comment 5 Ting-Wei Lan 2016-01-13 18:47:24 UTC
Attachment 318943 [details] pushed as 16cc92e - ephy-profile-migrator: Call setlocale and gettext functions in main function