comparison mercurial/hg.py @ 20868:5db105f216c3 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 the format string and "%" aren't placed in the same line. This patch replaces "\s" in that regexp pattern with "[ \t\n]" to detect "% inside _()" problems in such case. "[\s\n]" can't be used in this purpose, because "\s" is automatically replaced with "[ \t]" by "_preparepats()" and "\s" in "[]" causes nested "[]" unexpectedly.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 01 Apr 2014 02:46:03 +0900
parents bc56ec9e64df
children 6500a2eebee8
comparison
equal deleted inserted replaced
20867:539d9f839197 20868:5db105f216c3
431 update = '@' 431 update = '@'
432 bn = destrepo[uprev].branch() 432 bn = destrepo[uprev].branch()
433 if bn == 'default': 433 if bn == 'default':
434 status = _("updating to bookmark @\n") 434 status = _("updating to bookmark @\n")
435 else: 435 else:
436 status = _("updating to bookmark @ on branch %s\n" 436 status = (_("updating to bookmark @ on branch %s\n")
437 % bn) 437 % bn)
438 except KeyError: 438 except KeyError:
439 try: 439 try:
440 uprev = destrepo.branchtip('default') 440 uprev = destrepo.branchtip('default')
441 except error.RepoLookupError: 441 except error.RepoLookupError: