Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshrepo.py @ 1402:9d2c2e6b32b5
i18n part2: use '_' for all strings who are part of the user interface
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 18 Oct 2005 18:38:39 -0700 |
parents | cf9a1233738a |
children | 50de0887bbcd |
line wrap: on
line diff
--- a/mercurial/sshrepo.py Tue Oct 18 18:38:04 2005 -0700 +++ b/mercurial/sshrepo.py Tue Oct 18 18:38:39 2005 -0700 @@ -18,7 +18,7 @@ m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) if not m: - raise hg.RepoError("couldn't parse destination %s" % path) + raise hg.RepoError(_("couldn't parse destination %s") % path) self.user = m.group(2) self.host = m.group(3) @@ -42,7 +42,7 @@ if size == 0: break l = self.pipee.readline() if not l: break - self.ui.status("remote: ", l) + self.ui.status(_("remote: "), l) def __del__(self): try: @@ -50,7 +50,7 @@ self.pipei.close() # read the error descriptor until EOF for l in self.pipee: - self.ui.status("remote: ", l) + self.ui.status(_("remote: "), l) self.pipee.close() except: pass @@ -59,7 +59,7 @@ return -1 def do_cmd(self, cmd, **args): - self.ui.debug("sending %s command\n" % cmd) + self.ui.debug(_("sending %s command\n") % cmd) self.pipeo.write("%s\n" % cmd) for k, v in args.items(): self.pipeo.write("%s %d\n" % (k, len(v))) @@ -75,7 +75,7 @@ try: l = int(l) except: - raise hg.RepoError("unexpected response '%s'" % l) + raise hg.RepoError(_("unexpected response '%s'") % l) return r.read(l) def lock(self): @@ -90,7 +90,7 @@ try: return map(bin, d[:-1].split(" ")) except: - raise hg.RepoError("unexpected response '%s'" % (d[:400] + "...")) + raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) def branches(self, nodes): n = " ".join(map(hex, nodes)) @@ -99,7 +99,7 @@ br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] return br except: - raise hg.RepoError("unexpected response '%s'" % (d[:400] + "...")) + raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) def between(self, pairs): n = "\n".join(["-".join(map(hex, p)) for p in pairs]) @@ -108,7 +108,7 @@ p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] return p except: - raise hg.RepoError("unexpected response '%s'" % (d[:400] + "...")) + raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) def changegroup(self, nodes): n = " ".join(map(hex, nodes)) @@ -118,7 +118,7 @@ def addchangegroup(self, cg): d = self.call("addchangegroup") if d: - raise hg.RepoError("push refused: %s", d) + raise hg.RepoError(_("push refused: %s"), d) while 1: d = cg.read(4096)