[PATCH 0 of 9 ] prevent translation for some rst syntax
martin at geisler.net
Sat Feb 8 05:17:31 CST 2014
Simon Heimberg <simohe at besonet.ch> writes:
> In the past, rst syntax has been translated several times. Improve the
> situation by two concepts. Translation files do not contain entries
> containing noting but directives (rst syntax: ..XXX::) and
> untranslatable arguments. And remind the translator by writing a note
> before paragraphs with directives.
Great stuff! If we try to move to the long
This is the note.
syntax, then the translators will be almost completely shielded from the
This made me think of something else: would it make sense to strip
leading whitespace when generating hg.pot? I'm thinking of turning
source like this (from 'hg help add'):
If no names are given, add all files to the repository.
.. container:: verbose
An example showing how new (unknown) files are added
automatically by :hg:`add`::
into msgids like
msgid "If no names are given, add all files to the repository."
"An example showing how new (unknown) files are added\n"
"automatically by :hg:`add`::"
I think we could still lookup the right text at translation time by
stripping leading whitespace, do the lookup, and then adding it
afterwards -- this is actually just like how we split paragraphs.
The advantage would be that translators seen even less rst syntax and
wont have to deal with keeping the indentation consistent.
http://google.com/+MartinGeisler | http://careers.stackoverflow.com/mg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 818 bytes
Desc: not available
More information about the Mercurial-devel