comparison mercurial/patch.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 9f1d4323c749
children 4e2fb0ad00a9
comparison
equal deleted inserted replaced
20868:5db105f216c3 20869:9658a79968c6
709 return -1 709 return -1
710 710
711 if self.exists and self.create: 711 if self.exists and self.create:
712 if self.copysource: 712 if self.copysource:
713 self.ui.warn(_("cannot create %s: destination already " 713 self.ui.warn(_("cannot create %s: destination already "
714 "exists\n" % self.fname)) 714 "exists\n") % self.fname)
715 else: 715 else:
716 self.ui.warn(_("file %s already exists\n") % self.fname) 716 self.ui.warn(_("file %s already exists\n") % self.fname)
717 self.rej.append(h) 717 self.rej.append(h)
718 return -1 718 return -1
719 719