List of suggestions

Laurens Holst laurens.nospam at grauw.nl
Sat Dec 10 06:56:34 CST 2011


Op 10-12-2011 10:28, Andrei Polushin schreef:
> 10.12.2011 8:13, Laurens Holst wrote:
>> Op 9-12-2011 23:26, Fabian Kreutz schreef:
>>> then there is for so many keywords (that take no argument):
>>> msgid "mq takes no arguments"
>>> msgid "modified takes no arguments"
>>> msgid "added takes no arguments"
>>> msgid "removed takes no arguments"
>>> msgid "deleted takes no arguments"
>>> [...]
>>>
>>> Why not _("%s takes no arguments") % 'Zoidberg'?
>>> It's even defined in two files only:
>>> mercurial/fileset.py
>>> mercurial/revset.py
>> That is probably not a good idea, as in various language the conjugation of
>> the verb can change based on the name. Afaik this includes several slavic
>> languages like Russian, Ukrainian and Polish.
> In particular, there is no such problem in Russian and (I guess) Ukrainian.
>
> That's because the keyword should remain untranslated, and the whole phrase
> is translated using in the following grammatical pattern:
>
>    "<predicate>  takes no arguments"
>
> where the form of "takes" is controlled by an implied translation of the
> word "predicate".
>
>> To give an example of a similar problem in English, consider if all these
>> strings were prefixed with ‘a’, whether you should write ‘a’ or ‘an’ depends
>> on the pronunciation of the noun.
>>
>> Therefore even though there is some amount of duplication here, it is still
>> best to retain as much context in translation strings as possible.
> This could be true in general, while I can't imagine an actual language for
> that particular case.
>
> The other side of coin is that the translators tend to blindly translate
> keywords when they are leaked into a message catalog.
>

I was thinking about cases like described here:

http://blog.mozilla.com/seth/2009/01/29/dtd-limitations-with-the-gender-of-translated-words/
http://blog.mozilla.com/seth/2009/01/28/mozilla-dtd-files-caveat-emptor/

Not sure if that applies to this sentence in particular, but my general 
point was, avoid composition of strings as much as possible because 
there are lots of edge cases where this can be problematic, even if the 
words that you are inserting themselves should not be translated. 
Already inserting something simple like a number causes a world of hurt 
in many languages [1].

That it is fine in western language like Dutch or German, or even 
Russian, does not mean there is no problem in other languages. Hardly 
anybody is enough of a language specialist to be able to identify all 
these cases, much less your average programmer ;p. So it is best to set 
a clear and simple rule: retain as much context in strings as possible. 
Some amount of repetition is an unfortunate but unavoidable side-effect.

Re. translation of keywords, imo that is just up to the translator’s 
discipline to recognise and avoid translating these.

~Laurens

[1] Here is Firefox’s system to deal with plurality: 
https://developer.mozilla.org/en/Localization_and_Plurals

-- 
~~ Ushiko-san! Kimi wa doushite, Ushiko-san nan da!! ~~
Laurens Holst, developer, Utrecht, the Netherlands
Website: www.grauw.nl. Working @ www.roughcookie.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4332 bytes
Desc: S/MIME cryptografische ondertekening
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111210/f74f63ac/attachment.bin>


More information about the Mercurial-devel mailing list