Mercurial > hg
comparison hgext/eol.py @ 20869:9658a79968c6 stable
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 "...." + "....")
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 01 Apr 2014 02:46:03 +0900 |
parents | de16c673455b |
children | 6500a2eebee8 |
comparison
equal
deleted
inserted
replaced
20868:5db105f216c3 | 20869:9658a79968c6 |
---|---|
342 # be able to say "** = native" to automatically | 342 # be able to say "** = native" to automatically |
343 # have all non-binary files taken care of. | 343 # have all non-binary files taken care of. |
344 continue | 344 continue |
345 if inconsistenteol(data): | 345 if inconsistenteol(data): |
346 raise util.Abort(_("inconsistent newline style " | 346 raise util.Abort(_("inconsistent newline style " |
347 "in %s\n" % f)) | 347 "in %s\n") % f) |
348 return super(eolrepo, self).commitctx(ctx, error) | 348 return super(eolrepo, self).commitctx(ctx, error) |
349 repo.__class__ = eolrepo | 349 repo.__class__ = eolrepo |
350 repo._hgcleardirstate() | 350 repo._hgcleardirstate() |