Patchwork [6,of,7] grep: make a message translatable

login
register
mail settings
Submitter Katsunori FUJIWARA
Date May 25, 2016, 5:01 p.m.
Message ID <02018ce3e14c00d4699f.1464195705@feefifofum>
Download mbox | patch
Permalink /patch/15199/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - May 25, 2016, 5:01 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1464195454 -32400
#      Thu May 26 01:57:34 2016 +0900
# Node ID 02018ce3e14c00d4699f6a4c8987dc61dd365f23
# Parent  6a507bfef90e8b56e8a7b81dcefed5d953f37f50
grep: make a message translatable

This message has been overlooked by check-code, because it starts with
non-alphabet character (' ').

This is also a part of preparation for making "missing _() in ui
message" detection of check-code more exact.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4410,7 +4410,7 @@  def grep(ui, repo, pattern, *pats, **opt
             if not opts.get('files_with_matches'):
                 ui.write(sep, label='grep.sep')
                 if not opts.get('text') and binary():
-                    ui.write(" Binary file matches")
+                    ui.write(_(" Binary file matches"))
                 else:
                     for s, label in l:
                         ui.write(s, label=label)