GNOME Bugzilla – Bug 302454
init i18n before using it
Last modified: 2005-05-11 16:21:01 UTC
Distribution/Version: Mandriva Linux cooker I've found some i18n problem in gnome-desktop, attached patch fixes them : -gnome-desktop-item.c never initialize gettext correctly, causing problem when system locale is not UTF-8. -gi18n.h is used instead of gi18n-lib.h, causing translation to use the wrong domain -textdomain is called in gnome-ditem-edit.c, which is wrong for a library. -compilation will fail if bind_textdomain_codeset isn't available on the system. in the attached patch, I didn't factorise bind* calls between gnome-desktop-item.c and gnome-ditem-edit.c since the worst case scenario would be two calls and it would add a static boolean in the library. Permission to commit to CVS (HEAD and 2.10 branch) ?
Created attachment 45833 [details] [review] fix i18n issues
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155659#c5 After patching attachment 45833 [details] [review] , FedoraBug 155659#c5 doesn't happen. Thank you! fcrozat. :)
fcrozat: I'd move all that code into a separate function - init_i18n() or something. Also, you don't need a big huge namespaced variable name "_gnome_desktop_i18n_initialized" because its a local variabled - "initialized" would be fine. Once you've fixed those up, feel free to commit to gnome-2-10 and HEAD
Created attachment 46340 [details] [review] better patch
+ /* initialize i18n if needed */ Comment isn't neccessary, its pretty obvious what's going on Apart from that, its fine to commit
committed on HEAD without the comment.