[PATCH 0 of 2] i18n: add checkers to check Mercurial specific translation problems in *.po

Simon Heimberg Simohe at besonet.ch
Mon Jan 20 15:14:19 CST 2014


On 20.01.2014 15:20, Wagner Bruna wrote:
> Em 19-01-2014 12:35, FUJIWARA Katsunori escreveu:
>> This patch series adds new checkers to "i18n/check-translation.py" to
>> check Mercurial specific translation problems in *.po files.
>>
>> On 4988e4246537, "taildoublecolons" checker (patch #1) shows
>> warnings below:
> (...)
>
> Nice catch! Pushed catalog fixes to i18n stable. This could even be included
> as a hard error, IMHO.

The test could additionally check for double colons at line ends:
     def dcle(msgXX):
         return pe.msgXX.endswith("::") or "::\n" in pe.msgXX
This will uncover some more errors. (I was working on a similar patch, 
therefore already I know this. It is not the first time that this author 
and me have similar ideas (-:   )

>
>> "indentation" checker (patch #2) shows warnings below. Many of these
>> seem not to be serious. But I could find "missing the first (= term)
>> line of entries in definition list" in "ja.po" by proto-type version
>> of this checker, in fact. So, this should be useful.
>
> Yeah, these are trickier: many seem trivial to fix (spaces missing before '('
> on one-line messages), but I caught at least one that looks like a false
> positive (ro.po:9130). So it probably should stay as a warning for now.

Do not care about that match. ro.po:9130 is outdated, the table in msgid 
looks totally different now. The outdated writing is kind of ascii art, 
unsuitable for rst. It has been replaced therefore. It will disappear 
from ro.po on the next run of "make i18n/ro.po".

This test looks good as well, it should become strict, but using it as a 
warning first could be wise. (Yes, I was working on a similar patch. An 
other one tests for surrounding quotation marks, does it also have a twin?)

>
> Thanks!
> Wagner
>

Great patches!



More information about the Mercurial-devel mailing list