GNOME Bugzilla – Bug 760434
[PATCH] totem-audio-preview --help shows translated characters as question marks on some locales
Last modified: 2016-01-12 00:51:40 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
Created attachment 318702 [details] [review] audio-preview: Call setlocale in main function It is required to correctly show translated messages on some locales.
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
Fixed up in follow-up commits, thanks for noticing.