[PATCH 2 of 7] notify: make a message translatable
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Wed May 25 13:01:41 EDT 2016
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1464195454 -32400
# Thu May 26 01:57:34 2016 +0900
# Node ID b6c75aa89aa7c51fd324d3201e9e945baafa1250
# Parent 25a9f8af572b602dd44f1a2f59417589ac93f040
notify: make a message translatable
This message has been overlooked by check-code, because it starts with
non-alphabet character ('\').
Making this message translatable seems reasonable, because messages
below in same function are already translatable
- '\ndiffs (truncated from %d to %d lines):\n\n'
- '\ndiffs (%d lines):\n\n'
This is also a part of preparation for making "missing _() in ui
message" detection of check-code more exact.
diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -363,7 +363,7 @@ class notifier(object):
s = patch.diffstat(difflines)
# s may be nil, don't include the header if it is
if s:
- self.ui.write('\ndiffstat:\n\n%s' % s)
+ self.ui.write(_('\ndiffstat:\n\n%s') % s)
if maxdiff == 0:
return
More information about the Mercurial-devel
mailing list