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 301118 - no way to specify the translation domain explicitly with bonobo_ui_util_translate_ui()
no way to specify the translation domain explicitly with bonobo_ui_util_trans...
Status: RESOLVED NOTABUG
Product: bonobo
Classification: Deprecated
Component: libbonoboui
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2005-04-18 22:17 UTC by Changwoo Ryu
Modified: 2005-05-02 20:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
A try to add some expanded functions (3.64 KB, patch)
2005-04-19 12:22 UTC, Changwoo Ryu
none Details | Review

Description Changwoo Ryu 2005-04-18 22:17:57 UTC
We can't use bonobo_ui_util_translate_ui() (or any other bonobo_ui_util_*
functions which use it) in a library.  Because this function does translation
just with gettext(), which assumes the translation domain is implicit.

One example is gtkhtml:
1. run evolution in any non-english locale
2. new mail
3. From menu: Format -> Paragraph...
4. some strings still remains untranslated.

The UI file should use "gtkhtml-3.6" (assuming evolution 2.2.x and gtkhtml
3.6.x) as its translation domain.  But the bonobo_ui_util_translate_ui()
function uses "evolution-2.2" implicitly.

We need a way to specify the translation domain explicitly, IMHO with a new API.
Comment 1 Michael Meeks 2005-04-19 10:01:38 UTC
I guess not; please do feel free to knock up an API expansion to do that, I
guess it's a right pain having to do that translation yourself.

Thanks.
Comment 2 Changwoo Ryu 2005-04-19 10:46:35 UTC
IThe current bonobo_ui_util_translate_ui() is not very general. In any way it
doesn't have to assume the translation domain is implicit. It may be possible to
fix gtkhtml without modifying libbonobou, but by just copying & modifying the
whole functions.
Comment 3 Michael Meeks 2005-04-19 11:26:16 UTC
cut & paste is evil; it may be necessary for a few versions to avoid dependency
problems - but lets make sure we fix the underlying problem too.
Comment 4 Changwoo Ryu 2005-04-19 12:22:59 UTC
Created attachment 45441 [details] [review]
A try to add some expanded functions

A try to add the translation domain parameter to the functions.  Not sure
whether this approach is prefered though.
Comment 5 Michael Meeks 2005-04-19 13:13:02 UTC
The patch looks great to me, please do commit it to HEAD.
Comment 6 Changwoo Ryu 2005-04-19 16:31:37 UTC
Thanks for the review.  Commited with changelog:

	* bonobo/bonobo-ui-util.c (bonobo_ui_util_new_ui_with_domain,
	bonobo_ui_util_translate_ui_with_domain): New functions which do
	the same things as bonobo_ui_util_new_ui() and
	bonobo_ui_util_translate() respectively but translate with the
	specified translation domain.  Fixes #301118.
	* bonobo/bonobo-ui-util.h: bonobo_ui_util_new_ui_with_domain() and
	bonobo_ui_util_translate_ui_with_domain() prototypes.
Comment 7 Changwoo Ryu 2005-04-28 07:23:48 UTC
I found a simple fix for bug 301120, without any need of bonoboui change.  So I
doubt whether this bug is really a problem.

I'm about to revert my changes in HEAD and set this bug as NOTABUG.  Furtunately
no apps in the cvs use these new functions yet.  I don't want to add library
functions without any real need.
Comment 8 Changwoo Ryu 2005-05-02 20:19:31 UTC
I reverted it.  Sorry for the noise.