Hi, On Friday, 17 Mar 2006, 00:42 CET, Neil Williams wrote: <snip> > pilot-qof loads libqof1 and doesn't load the backend until a session > operation > is required. It then calls a libqof function that executes the load. It is > only at this point that the strings in qsf-backend.c can be translated. > > 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. > > gettext can only put those strings into the location determined by the > textual > domain if it can find the marked up strings in the source tree identifying > itself as that domain - otherwise they get skipped. So pilot-qof contains 79 > translated messages. QOF contains 6. > > The 6 strings in QOF are all in the QSF backend - more would be added with > other backends - and are not present anywhere in the pilot-qof source tree. > gnucash is a special case. > > gettext cannot locate these strings, it cannot put them into the > pilot-qof.pot > file, it cannot use them if they are put into a po file within pilot-qof. > gettext can only load them from a pot file created from the qof source tree - > i.e. qof.pot, creating a textual domain called 'qof', creating installation > directories of LC_MESSAGES/qof/ and requiring that when the backend loads, it > calls gettext with this domain to locate the translations. > > The only way to load these strings is to give them a textual domain > (basically > a location in the filesystem) of their own. That is the QOF textual domain.
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. """ 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. Or you use dgettext, which I would recommend then :) -- andi5 _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel