GNOME Bugzilla – Bug 765455
goa-daemon --help shows translated characters as question marks on some locales
Last modified: 2016-04-28 18:19:55 UTC
I know goa-daemon is not a command intended to be run by users, but it is still better to keep the message readable. Running 'goa-daemon --help' with zh_TW.UTF-8 locale shows: ??? goa-daemon [???] GNOME Online Accounts daemon ????? -h, --help ??????? ??????? --replace Replace existing daemon --no-sigint Do not handle SIGINT for controlled shutdown Please see the attached patch. goa-daemon and other GOA programs should call setlocale and gettext functions in their main function.
Created attachment 326589 [details] [review] daemon, examples, identity: Call setlocale and gettext functions Calling these functions is required to make message translation work.
Review of attachment 326589 [details] [review]: Thanks for the patch. ::: src/daemon/main.c @@ +22,3 @@ #include <glib-unix.h> +#include <locale.h> Strictly speaking we should include libintl.h, not gi18n.h. ::: src/goaidentity/main.c @@ +22,3 @@ #include <glib-unix.h> +#include <locale.h> Strictly speaking we should include libintl.h, not gi18n.h.
Created attachment 326784 [details] [review] identity: Update POTFILES.in and remove redundant includes
Created attachment 326785 [details] [review] identity: Include the correct internationalization header
Created attachment 326786 [details] [review] daemon, examples, identity: Call setlocale and gettext functions I took the liberty to fix up the previous patch.
Pushed all three to master.