[Gnucash-changes] r13639 - gnucash/trunk - * lib/libqof/backend/file/qsf-backend.c: add <locale.h>

Derek Atkins warlord at MIT.EDU
Thu Mar 16 09:21:38 EST 2006


Neil Williams <linux at codehelp.co.uk> writes:

>> 	* lib/libqof/backend/file/qsf-backend.c:  add <locale.h>
>> 	  Note:  it think it's probably wrong to set the locale here.
>
> It's a GModule - it needs to load the locale itself according to whether the 
> backend is loaded from internal gnucash (use the gnucash text domain) or 
> libqof1 (use the qof text domain).

Eh?  A GModule is just a shared library, nothing more.  There's
nothing special about a GModule; the g_module API is just a wrapper
around dlopen(), and dlsym(), pretty much.

>> +	/* XXX: Do we REALLY want to do this??? 
>
> Yes.

Why?  What's the failure mode here?

>> Shouldn't the APP 
>> +	 * have already done this?
>> +	 */
>
> There is no "app", it's a GModule, loaded independently by libqof1. 

There most certainly is an application!  What the heck do you think is
running?  There's some executable that loaded the module.  That
executable (gnucash, cashutil, pilot-qof) most likely already ran
setlocale().  Doing it again is..... wrong.

>     The module
> knows nothing of the app using the library, therefore it cannot locate the 
> text domain, so it needs it's own - which it has. libqof1 is translated by 
> the GNU TP.
> http://www.iro.umontreal.ca/translation/registry.cgi?domain=qof

I don't underdstand this statement.  Could you please go into more
detail about how it "cannot locate the text domain"?

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list