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 760416 - [PATCH] broadwayd --help shows translated characters as question marks on some locales
[PATCH] broadwayd --help shows translated characters as question marks on som...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Broadway
3.19.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-01-11 04:10 UTC by Ting-Wei Lan
Modified: 2016-01-13 04:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
broadway: Call setlocale in main function of broadwayd (1.01 KB, patch)
2016-01-11 04:13 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-11 04:10:25 UTC
Please see the attached patch. broadwayd should call setlocale in main function in order to correctly show translated messages.

Running 'broadwayd --help' with zh_TW.UTF-8 locale shows:
???
  broadwayd [???] [:DISPLAY] - broadway display daemon

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

???????
  -p, --port=PORT              Httpd port
  -a, --address=ADDRESS        Ip address to bind to 
  -u, --unixsocket=ADDRESS     Unix domain socket address
  -c, --cert=PATH              SSL certificate path
  -k, --key=PATH               SSL key path
Comment 1 Ting-Wei Lan 2016-01-11 04:13:35 UTC
Created attachment 318684 [details] [review]
broadway: Call setlocale in main function of broadwayd

It is required to correctly show translated messages on some locales.
Comment 2 Matthias Clasen 2016-01-11 12:43:52 UTC
Review of attachment 318684 [details] [review]:

I think you need to call bindtextdomain and bind_textdomain_codeset too ?
Comment 3 Ting-Wei Lan 2016-01-11 13:33:31 UTC
(In reply to Matthias Clasen from comment #2)
> Review of attachment 318684 [details] [review] [review]:
> 
> I think you need to call bindtextdomain and bind_textdomain_codeset too ?

broadwayd itself doesn't use gettext. The translated messages in 'broadwayd --help' come from GLib.
Comment 4 Matthias Clasen 2016-01-11 17:02:27 UTC
Review of attachment 318684 [details] [review]:

ah, alright then.
Comment 5 Matthias Clasen 2016-01-13 04:04:36 UTC
Attachment 318684 [details] pushed as f4d2d66 - broadway: Call setlocale in main function of broadwayd