Obscure texts and invalid translations

Francois Gouget fgouget at free.fr
Wed Feb 22 18:21:26 CST 2012


On Thu, 23 Feb 2012, Frédéric Delanoy wrote:
[...]
> > In theory message contexts are not the right tool to pass commentary
> > about the string to translate either.
> 
> I think they are (depending on your definition of commentary)
> (from http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Contexts.html#Contexts)

Which is from a section about solving collisions where the same string 
is used in two contexts that should receive different translations.

> [speaking of short strings]
> "The problem is that many of the strings which have to be translated
> are very short. They have to appear in pull-down menus which restricts
> the length. But strings which are not containing entire sentences or
> at least large fragments of a sentence may appear in more than one
> situation in the program but might have different translations. This
> is especially true for the one-word strings which are frequently used
> in GUI programs."

That's just an explanation of why one tends to run into this collision 
issue.


[...]
> TBH "#." extracted comments and message contexts seem redundant, since
> both would need to be examined by the translator.

They are not redundant as they are used for different things. For 
instance:

    /* This refers to the France Telecom mobile offering */
    offer = dpgettext("wine", "mobile offer", "Open");

->  #. This refers to the France Telecom mobile offering
    msgctxt "mobile offer"
    msgid "Open"
    msgstr "Open"

Putting the comment in the message context would be a serious abuse. 
Also, if you where to then replace 'France Telecom' with 'Orange' in the 
context you'd invalidate all the translations whereas if it be fine in 
the comment.

The comments can also be aggregated so you get information about exactly 
how the string is used in each instance. This can be helpful to detect 
that indeed there are conflicts.

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
In theory, theory and practice are the same, but in practice they're different.


More information about the wine-devel mailing list