r12208 - gnucash/trunk - Mark budget strings for i18n

Chris Shoemaker c.shoemaker at cox.net
Fri Dec 30 14:41:33 EST 2005


On Fri, Dec 30, 2005 at 08:20:17PM +0100, Christian Stimming wrote:
> Am Freitag, 30. Dezember 2005 17:00 schrieb Chris Shoemaker:
> > Author: chris
> > Date: 2005-12-30 11:00:05 -0500 (Fri, 30 Dec 2005)
> > New Revision: 12208
> > Trac: http://svn.gnucash.org/trac/changeset/12208
> >
> > Log:
> > Mark budget strings for i18n
> 
> I think in some places you should've used _("...") instead of N_("..."). 
> 
> * The N_("...") is a no-op for the C side -- it only marks the strings for 
> translation, but doesn't actually call gettext(). This is useful in array 
> definitions where you can't use a function call, and also in other places 
> where the strings will be passed through gettext() at a later point in time 
> (e.g. most of the scheme option dialogs).
> 
> * The _("...") OTOH directly calls gettext() and will return a const char* 
> with the translated string. Use this if you pass a const char* to some 
> gtk/glib function that will directly use the passed const char*.

Thanks for explaining that.  I suspected there was an important
difference I didn't understand.  I even read the glib documentation of
the macros several times without understanding when to use which one.

Your brief explanation is better than the glib docs, but I still don't
understand what would cause a string marked N_("...") to eventually be
translated.

I'll fix up my mistakes.

-chris


More information about the gnucash-devel mailing list