[PATCH 3 of 3 STABLE] i18n: fix "% inside _()" problems

David Soria Parra davidsp at fb.com
Mon Mar 31 13:40:40 CDT 2014


FUJIWARA Katsunori <foozy at lares.dti.ne.jp> writes:

> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1396287963 -32400
> #      Tue Apr 01 02:46:03 2014 +0900
> # Branch stable
> # Node ID 710e0f772a95cc7129788fa836cc2d7389f91e1e
> # Parent  1a28c327d40f2793356f04c0c54ef34fbcfa4b03
> i18n: fix "% inside _()" problems
>
> Before this patch, "contrib/check-code.py" can't detect these
> problems, because the regexp pattern to detect "% inside _()" doesn't
> suppose the case that format string consists of multiple string
> components concatenated implicitly or explicitly,
>
> This patch does below for that regexp pattern to detect "% inside _()"
> problems in such case.
>
>   - put "+" into separator part ("[ \t\n]") for explicit concatenation
>     ("...." + "...." style)
>
>   - enclose "component and separator" part by "(?:....)+" for
>     concatenation itself ("...." "...." or "...." + "....")
>

Very nice catch. all 3 queued for stable at
http://hg.netv6.net/hg-fb-reviewers . Thank you.


More information about the Mercurial-devel mailing list