[Gnucash-changes] r13639 - gnucash/trunk -
* lib/libqof/backend/file/qsf-backend.c: add <locale.h>
Christian Stimming
stimming at tuhh.de
Fri Mar 17 04:43:52 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Köhler schrieb:
> On Friday, 17 Mar 2006, 00:42 CET, Neil Williams wrote:
>> gettext places all translated strings in locations on the filesystem dictated
>> by the textual domain - usually the name of the
>> package. /usr/share/locale/LC_MESSAGES/gnucash or .../qof/ or ../pilot-qof.
>
> I try to understand that, but I still have one problem.
>
> Quoting the Glibc reference manual:
> """
> As the functions described in the last sections already mention
> separate sets of messages can be selected by a domain name. This is
> a simple string which should be unique for each program part with
> uses a separate domain. It is possible to use in one program
> arbitrary many domains at the same time. E.g., the GNU C Library
> itself uses a domain named libc while the program using the C
> Library could use a domain named foo. The important point is that at
> any time exactly one domain is active. This is controlled with the
> following function.
> """
That was textdomain(3), wasn't it?
> So I guess there is no way to "add" translations from one text
> domain to some sort of translation pool, but rather a way to specify
> which text domain should be used on subsequent gettext calls,
> no matter whether from within the app or some shared library.
The documentation doesn't explicitly state whether this default text
domain is a per-process setting, but I'd guess so. Yes.
> Or you use dgettext, which I would recommend then :)
Absolutely. If the library ships with its own translation, it must use
dgettext. Check e. g. the glib sources -- they do this all the time,
simply by defining _( ) in gi18n-lib.h as using dgettext. The definition
of _( ) in lib/libqof/backend/file/qsf-xml.h should be replaced by
including gi18n-lib.h.
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBRBqE2GXAi+BfhivFAQIcYAQAprVP0x77hGoLQLRcX70KmflwW3EqOJ0S
f3XaX9lxMvNVO/odcfxHsz1nE/4c+ib+bhDtz1XZkELYv5SG+xuWWThEXiGfb5Zd
JxwaizXGFXENTzkByajDzI0elZD1JDNeBnzrlRqSIh99XP0mOyKx21uuJ5qmOwlr
bD+6e+4YSzU=
=ptr4
-----END PGP SIGNATURE-----
More information about the gnucash-devel
mailing list