Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.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 | 5db105f216c3 |
children | 6500a2eebee8 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Tue Apr 01 02:46:03 2014 +0900 +++ b/mercurial/subrepo.py Tue Apr 01 02:46:03 2014 +0900 @@ -1021,7 +1021,7 @@ def remove(self): if self.dirty(): self._ui.warn(_('not removing repo %s because ' - 'it has changes.\n' % self._path)) + 'it has changes.\n') % self._path) return self._ui.note(_('removing subrepo %s\n') % self._path)