Dieter Maurer wrote:
Jean-Marc Orliaguet wrote at 2006-5-30 22:13 +0200:
Dieter Maurer wrote:
In my view the translation domain is vital for translators --
as the domain guides the correct translations.
But it is the application that eventually sets the domain name to use,
based on the context. Translators have no control over it, since they
have no control over page templates or over python code.
You are right, of course: translators do not chose the domain
but are informed about it. However, this does not contradict
that the translation domain is specified in the ".po" file -- as
the translations in this file are only valid in the
translation domain for which they have been made...
It's a practical issue, I think. The way I'm organizing translations
right now is that I'm creating a folder (named 'locales' for instance)
with different languages 'en', 'fr' in it. So far no difference.
then inside the LC_MESSAGES folders I will place categories of translations:
- portlets.po ...
see for example:
this is instead of having one big .po file that contains everything.
I've noticed that it's difficult to create and maintain sections inside
a .po file. The categorization is done here on the filename. So not
having a hardcoded filename <-> domain is an advantage.
also notice that few packages register translations in several domains.
Hence, the translators are only concerned with putting translations into
folders ('business_terms', 'furniture', ...), no matter what the domain
name will be called.
But why would you want a different domain name than that communicated
to the translators? Do you prefer meaningless over strong names?
put it the other way around: if you communicate a domain name to
translators you have to inform them whenever the domain name changes.
I've just written a mergeTranslations directive, it's rather simple to use:
the ZCML is:
<cpsskins:mergeTranslations domain="cpsskins" directory="locales" />
I guess that 01_..., 02_... or some other filename scheme could be used
to control the merge order in case some translations should override
Zope3-dev mailing list