i18n: translation of prompts and man pages

Martin Geisler martin at geisler.net
Sun Oct 13 11:43:27 CDT 2013


"Alexander Sauta" <demosito at gmail.com> writes:

Hi Alexander,

> I have a couple of questions regarding translation.
>
> 1.      I recall we had a discussion about how to translate messages with
> prompts when required symbols are not Latin (the case with Russian). I can
> also see some changes in printing of those messages. For example
>     "use (l)argefile or keep as (n)ormal file?$$ &Largefile $$ &Normal file"
> How should that be translated? Should we keep English input symbols? I
> suggest this would be better, i.e. give the translation and then original
> English word with highlighted active letter, e.g.
> Could you give me an example of the translation of above string assuming
> target language doesn't have latin letters?

The Japanese translation has translated prompts:

  msgid ""
  "%s has been turned into a largefile\n"
  "use (l)argefile or keep as (n)ormal file?$$ &Largefile $$ &Normal file"
  msgstr ""
  "ファイル %s が大容量ファイル化されています。\n"
  "大容量:(l)argefile と通常:(n)ormal file のどちらの形式を採用しますか?$$ "
  "&Largefile $$ &Normal file"

They seem to have used the English names and L/N as the acceptable
answers.

I think you should try to follow the way other Russian programs behave.
If it is typical that Russian programs prompt the user with y/n prompts
for yes/no questions, then use those accelerator keys. Personally, I
would expect a Danish program to use the Danish words (ja/nej) and
prompt me for j/n instead of y/n.

For largefiles there probably wont be a proper native word, so I think
most translations simply use "largefile" as a loan-word the same way
many languages have imported words like "computer" and "internet".

> 2. How do we translate manpages? I mean, there is some markup and
> keywords, some of them probably should be left as is, e.g. in
> docs/common.txt:
>
> .. _common:
>
>  
>
> .. Common link and substitution definitions.

This is a reStructuredText comment: ".." starts a command and this is
treated as a comment if the command ("Common" in this case) isn't
recognized.


> .. |hg(1)| replace:: **hg**\ (1)
>
> .. _hg(1): hg.1.html
>
> .. |hgrc(5)| replace:: **hgrc**\ (5)
>
> .. _hgrc(5): hgrc.5.html
>
> .. |hgignore(5)| replace:: **hgignore**\ (5)
>
> .. _hgignore(5): hgignore.5.html
>
> what should be translated and what should be left?

Those should just be left alone. The above is just the silly syntax one
has to use when one want to have inline markup in links.

> And in mercurial/help/hg.1.txt
>
>  
>
> :Author:         Matt Mackall <mpm at selenic.com>
>
> :Organization:   Mercurial
>
> :Manual section: 1
>
> :Manual group:   Mercurial Manual
>
>  
>
> Should those words between columns be left as is?

Yes, I'm pretty sure they should remain untranslated. They are keywords
used by the Docutils programs when generating the man pages and I think
it only looks for them in English.

-- 
Martin Geisler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20131013/fa53b701/attachment.pgp>


More information about the Mercurial-devel mailing list