Bug 36428

Summary: Internationalization doesn't depend on the ENABLE_NLS macro
Product: dbus Reporter: Derek Foreman <derek.foreman>
Component: GLibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: trivial    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: All   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/dbus-glib/log/?h=no-i18n-36428
Whiteboard: review?
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 37812    
Attachments: patch to make internationalization conditional
Remove i18n macros from files where they're not used
Remove support for i18n completely
remove include <glib/gi18n.h>

Description Derek Foreman 2011-04-20 09:29:52 UTC
Created attachment 45867 [details] [review]
patch to make internationalization conditional

Build fails without internationalization support.

Attached patch makes gettext usage conditional on the ENABLE_NLS macro.
Comment 1 Simon McVittie 2011-04-20 09:56:39 UTC
For dbus-glib.c and dbus-gmain.c I'd prefer to take this commit from Bug #10890 (assuming someone will review it), since literally nothing in those files is marked for translation:

http://cgit.collabora.co.uk/git/user/smcv/dbus-glib-smcv.git/commit/?id=09109a115935a8f9ac9e161e5dc02a136adfc8fd

For dbus-gvalue.c and dbus-gproxy.c, your changes make sense. I'd prefer the #ifdef to be a separate "paragraph" below the rest of the #includes, like it is in dbus-glib.c and dbus-gmain.c.

I doubt anyone has ever translated dbus-glib, and none of the translatable strings (which are all GError messages) are really comprehensible to the average user (or to programmers who aren't D-Bus specialists, in most cases), so I'm tempted to just rip out all the i18n support.
Comment 2 Simon McVittie 2011-05-31 06:51:42 UTC
Created attachment 47360 [details] [review]
Remove i18n macros from files where they're not used
Comment 3 Simon McVittie 2011-05-31 06:52:21 UTC
Created attachment 47361 [details] [review]
Remove support for i18n completely

As far as I can tell, dbus-glib has never actually been translated into
another language, or even had the necessary infrastructure so people could
do that. The translated strings are all low-level errors in "programmer
English" anyway, and most of them only make sense to D-Bus experts.
Comment 4 Simon McVittie 2011-05-31 06:54:46 UTC
I think the best way to fix this is to bin i18n entirely; review would be appreciated.
Comment 5 Will Thompson 2011-06-01 08:49:03 UTC
Review of attachment 47360 [details] [review]:

Looks fine.
Comment 6 Will Thompson 2011-06-01 08:54:32 UTC
Review of attachment 47361 [details] [review]:

I hope you automated writing this patch! Looks fine.
Comment 7 Simon McVittie 2011-06-01 09:19:43 UTC
Thanks, fixed in git for 0.94.
Comment 8 Derek Foreman 2011-06-02 09:12:23 UTC
Created attachment 47458 [details] [review]
remove include <glib/gi18n.h>

Two files still included gi18n.h
Comment 9 Simon McVittie 2011-06-02 09:19:11 UTC
Thanks, patch applied for 0.96.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.