diff hgext/largefiles/lfcommands.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 8a021cd38719
children 20b0c49c032c
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Tue Apr 01 02:46:03 2014 +0900
+++ b/hgext/largefiles/lfcommands.py	Tue Apr 01 02:46:03 2014 +0900
@@ -303,14 +303,14 @@
         try:
             id, name = line.split(' ', 1)
         except ValueError:
-            ui.warn(_('skipping incorrectly formatted tag %s\n'
-                % line))
+            ui.warn(_('skipping incorrectly formatted tag %s\n')
+                % line)
             continue
         try:
             newid = node.bin(id)
         except TypeError:
-            ui.warn(_('skipping incorrectly formatted id %s\n'
-                % id))
+            ui.warn(_('skipping incorrectly formatted id %s\n')
+                % id)
             continue
         try:
             newdata.append('%s %s\n' % (node.hex(revmap[newid]),