[PATCH 09 of 17] mark strings for translation in hgk extension

Martin Geisler mg at daimi.au.dk
Sat Aug 23 15:55:25 CDT 2008


# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1219523218 -7200
# Node ID b2e380c37acae5f43e25554ec19d42cd872620ac
# Parent  a7a6a0a25c8a79034a5138ea0f03c8bbbd1d1d53
mark strings for translation in hgk extension

diff -r a7a6a0a25c8a -r b2e380c37aca hgext/hgk.py
--- a/hgext/hgk.py	Sat Aug 23 22:26:58 2008 +0200
+++ b/hgext/hgk.py	Sat Aug 23 22:26:58 2008 +0200
@@ -47,6 +47,7 @@
 import os
 from mercurial import commands, util, patch, revlog, cmdutil
 from mercurial.node import nullid, nullrev, short
+from mercurial.i18n import _
 
 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
     """diff trees from two commits"""
@@ -149,12 +150,12 @@
 
     else:
         if not type or not r:
-            ui.warn("cat-file: type or revision not supplied\n")
+            ui.warn(_("cat-file: type or revision not supplied\n"))
             commands.help_(ui, 'cat-file')
 
     while r:
         if type != "commit":
-            ui.warn("aborting hg cat-file only understands commits\n")
+            ui.warn(_("aborting hg cat-file only understands commits\n"))
             return 1;
         n = repo.lookup(r)
         catcommit(ui, repo, n, prefix)
@@ -316,7 +317,7 @@
     os.chdir(repo.root)
     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
     cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
-    ui.debug("running %s\n" % cmd)
+    ui.debug(_("running %s\n") % cmd)
     util.system(cmd)
 
 cmdtable = {


More information about the Mercurial-devel mailing list