debugignore: make messages translatable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 26 May 2016 01:57:34 +0900
changeset 29245 9d0d1242cd48
parent 29244 a38c1808fbc6
child 29246 8dbfd3befbd7
debugignore: make messages translatable These messages have been overlooked by check-code, because they start with non-alphabet character ('%' or '('). Making these messages translatable seems reasonable, because messages for ui.note(), ui.status(), ui.progress() and descriptive messages for ui.write() in "debug" commands are already translatable in many cases. This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
mercurial/commands.py
--- a/mercurial/commands.py	Thu May 26 01:57:34 2016 +0900
+++ b/mercurial/commands.py	Thu May 26 01:57:34 2016 +0900
@@ -2521,15 +2521,16 @@
                             break
             if ignored:
                 if ignored == nf:
-                    ui.write("%s is ignored\n" % f)
+                    ui.write(_("%s is ignored\n") % f)
                 else:
-                    ui.write("%s is ignored because of containing folder %s\n"
+                    ui.write(_("%s is ignored because of "
+                               "containing folder %s\n")
                              % (f, ignored))
                 ignorefile, lineno, line = ignoredata
-                ui.write("(ignore rule in %s, line %d: '%s')\n"
+                ui.write(_("(ignore rule in %s, line %d: '%s')\n")
                          % (ignorefile, lineno, line))
             else:
-                ui.write("%s is not ignored\n" % f)
+                ui.write(_("%s is not ignored\n") % f)
 
 @command('debugindex', debugrevlogopts +
     [('f', 'format', 0, _('revlog format'), _('FORMAT'))],