[Libreoffice] Gettext patch
Michael Meeks
michael.meeks at novell.com
Tue Jun 21 03:41:30 PDT 2011
Hi Andras,
On Tue, 2011-06-21 at 11:43 +0200, Andras Timar wrote:
> + OSL_TRACE( "bindtextdomain(): %s -> %s\n", pPrefixName, p );
> + textdomain( pPrefixName );
Instead of calling textdomain - since (I suspect) we can probably call
lots of these resource mgrs in quick succession - eg. initializing an
sw/ widget derived from sfx2/ from vcl/ - I suggest we drop the
textdomain() call - and store a const char *pDomain; that is a UTF8 copy
of aPrefix (on InternalResMgr if I see right).
Then we should prolly use:
> + char *p = gettext(rtl::OUStringToOString(aRet,
> RTL_TEXTENCODING_UTF8).getStr());
char *p = dgettext (pImpRes->pDomain, ...)
which hopefully does what we want :-) Otherwise - this looks rather
sexy. I wonder if we want to introduce gettext as an internal /
self-built & packaged dependency on Windows - or whether this is a
linux-only / translators-only feature ?
Clearly we want to special case it only for the case that there is no
native translation.
As for .xcd file processing, I guess that happens in filter/ somewhere,
and the config files in configmgr/
Quite possibly we want some sal/ abstraction for the gettext stuff,
such that we can do the linking changes in one place, once rather than
linking gettext with its hooks into everywhere :-) (?)
Anyhow - nice work !
Michael.
--
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list