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 302454 - init i18n before using it
init i18n before using it
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.10.x
Other Linux
: High normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-29 17:04 UTC by Frederic Crozat
Modified: 2005-05-11 16:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
fix i18n issues (2.63 KB, patch)
2005-04-29 17:05 UTC, Frederic Crozat
needs-work Details | Review
better patch (3.07 KB, patch)
2005-05-11 16:00 UTC, Frederic Crozat
committed Details | Review

Description Frederic Crozat 2005-04-29 17:04:27 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) ?
Comment 1 Frederic Crozat 2005-04-29 17:05:09 UTC
Created attachment 45833 [details] [review]
fix i18n issues
Comment 2 sangu 2005-05-06 07:08:58 UTC
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. :)
Comment 3 Mark McLoughlin 2005-05-09 09:01:21 UTC
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
Comment 4 Frederic Crozat 2005-05-11 16:00:33 UTC
Created attachment 46340 [details] [review]
better patch
Comment 5 Mark McLoughlin 2005-05-11 16:08:22 UTC
+	/* initialize i18n if needed */

Comment isn't neccessary, its pretty obvious what's going on

Apart from that, its fine to commit

Comment 6 Frederic Crozat 2005-05-11 16:21:01 UTC
committed on HEAD without the comment.