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 760434 - [PATCH] totem-audio-preview --help shows translated characters as question marks on some locales
[PATCH] totem-audio-preview --help shows translated characters as question ma...
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
3.19.x
Other FreeBSD
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-11 06:39 UTC by Ting-Wei Lan
Modified: 2016-01-12 00:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
audio-preview: Call setlocale in main function (834 bytes, patch)
2016-01-11 06:40 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-11 06:39:29 UTC
Please see the attached patch. totem-audio-preview should call setlocale in main function in order to correctly show translated messages.

Running 'totem-audio-preview --help' with zh_TW.UTF-8 locale shows:
???
  totem-audio-preview [???] Plays audio passed on the standard input or the filename passed on the command-line

?????
  -h, --help                        ???????
  --help-all                        ?????????
  --help-gst                        ?? GStreamer ??

???????
  -m, --mimetype                    List the supported mime-types
  --g-fatal-warnings                Make all warnings fatal
Comment 1 Ting-Wei Lan 2016-01-11 06:40:22 UTC
Created attachment 318702 [details] [review]
audio-preview: Call setlocale in main function

It is required to correctly show translated messages on some locales.
Comment 2 Daniel Stone 2016-01-11 19:59:44 UTC
This breaks the build on 3.18 / jhbuild / Fedora 23:
totem-audio-preview.c: In function ‘main’:
totem-audio-preview.c:168:2: error: implicit declaration of function ‘setlocale’ [-Werror=implicit-function-declaration]
  setlocale (LC_ALL, "");
  ^
totem-audio-preview.c:168:2: warning: nested extern declaration of ‘setlocale’ [-Wnested-externs]
totem-audio-preview.c:168:13: error: ‘LC_ALL’ undeclared (first use in this function)
  setlocale (LC_ALL, "");
             ^
totem-audio-preview.c:168:13: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
Makefile:1346: recipe for target 'totem_audio_preview-totem-audio-preview.o' failed
make[4]: *** [totem_audio_preview-totem-audio-preview.o] Error 1
Comment 3 Bastien Nocera 2016-01-12 00:51:40 UTC
Fixed up in follow-up commits, thanks for noticing.