On Tue, 2011-06-21 at 13:13 +0200, Andras Timar wrote: > > 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). > > As far I can tell from the OSL_TRACE messages, textdomain() is called > only once for each resource domain. I think resources are read when > needed and they are stored in memory until application closes.
textdomain sets some sort of global variable (last I looked) which subsequent gettext calls then work from. That shouldn't work well in LibreOffice's case where we need to multiplex lots of catalogs at speed; I strongly recommend dgettext :-) > Oh, yes, let's discuss this now because it affects design. I think > Bjoern was thinking about Linux only so they could release translation > updates for LibreOffice in Ubuntu without rebuilding the source. Which makes lots of sense for translators. > I thought it was a multi platform feature because all platforms could > benefit from separation of localization and building. Well - we still need to build the english resource files, and then load and lookup the strings (as english) and then do the gettext-iness on them, so this is going to be rather slow I suspect. The .po files are also rather bigger than the .res files I think - since they need both english and translated strings in them. So this is not clear to me; lets discuss it at the next TSC meeting. > > Clearly we want to special case it only for the case > > that there is no native translation. > > What do you mean by that? Fallback to gettext when no native resources > are installed? Yes, this way we can add a language to an existing > installation. Is that worth the effort? Right. > Everywhere means 2 libs only: tl and the other one which > processes .xcd files. But you forget how evil cut+paste coding is; it is the moral equivalent of eating your children ;-) ATB, Michael. -- michael.me...@novell.com <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice