[Zip] Re: [Zip]+[Zope3-dev] Translation question

Nicola Larosa n.larosa@araknos.it
Tue, 21 May 2002 16:25:58 +0200


 > There's also the issue of a default translation.  One of the
 > advantages of using an implicit source language as your message ids is
 > that if no translation is available, you will still end up with
 > /something/ that maybe makes sense instead of an error, a cryptic
 > warning, or some incomprehensible message identifier.  Then again, an
 > English phrase may well be just as incomprehensible to any particular
 > viewer.

This is definitely an advantage that should not be lost. It is easier on the
translators, too.


 > OTOH, using a source language as your message has its own drawbacks.
 > I've found that there tends to be a higher inertia against changing
 > the strings in a source file because changing even one character (say
 > whitespace or punctuation) causes the catalog lookup to fail.

On the other hand, this is a real problem. How do you effect small changes
to an id expressed in the source language without invalidating all the
translations?


 > Planning for translatability means arranging your source messages as
 > whole sentences.  Some languages, such as Japanese may find it
 > impossible to translate certain sentence fragments.

Also, it feels awkward to have whole sentences as keys in a message catalog.


 > So I think neither system is perfect (pure message-ids or source
 > language used as message ids), but it seems that there is consensus
 > around the approach of using English as your source language, that
 > your source messages are your message ids, and that untranslated
 > source strings get returned in the source language.

The combination of the three factors above suggests that some middle ground
could be the best compromise.

I envision an id written as a CamelCase compendium of a sentence. I.e.,
"File not found" in English would have an id of "FileNotFound" and would be
translated to Italian as "Impossibile trovare il file".

CamelCase allows to discard spaces and punctuation while preserving
readability, and one may still change the English rendering to "File not
found." (added dot at end).


 > If I'm using English as my source language and you're using Russian, I
 > don't see how we can share the same translation domain.

It is probably easier to share ids if they are made of condensed English
keywords instead of whole English sentences.


P.S: the fortune in the signature could have "2Witches2Watches" as id, and
"[Intraducibile allitterazione a base di streghe e orologi]" as Italian
translation. ;^)


-- 
Two witches watch two watches. Which witch watched which watch?

Nicola Larosa - nico@tekNico.net