convert: mark strings for translation stable
authorMartin Geisler <mg@lazybytes.net>
Sun, 18 Apr 2010 15:47:49 +0200
branchstable
changeset 10939 9f6731b03906
parent 10938 02d6149a480b
child 10940 898d68468df2
convert: mark strings for translation
hgext/convert/bzr.py
hgext/convert/cvs.py
hgext/convert/cvsps.py
hgext/convert/darcs.py
hgext/convert/git.py
hgext/convert/hg.py
hgext/convert/p4.py
hgext/convert/subversion.py
--- a/hgext/convert/bzr.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/bzr.py	Sun Apr 18 15:47:49 2010 +0200
@@ -37,13 +37,14 @@
         super(bzr_source, self).__init__(ui, path, rev=rev)
 
         if not os.path.exists(os.path.join(path, '.bzr')):
-            raise NoRepo('%s does not look like a Bazaar repository' % path)
+            raise NoRepo(_('%s does not look like a Bazaar repository')
+                         % path)
 
         try:
             # access bzrlib stuff
             branch
         except NameError:
-            raise NoRepo('Bazaar modules could not be loaded')
+            raise NoRepo(_('Bazaar modules could not be loaded'))
 
         path = os.path.abspath(path)
         self._checkrepotype(path)
--- a/hgext/convert/cvs.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/cvs.py	Sun Apr 18 15:47:49 2010 +0200
@@ -19,7 +19,7 @@
 
         cvs = os.path.join(path, "CVS")
         if not os.path.exists(cvs):
-            raise NoRepo("%s does not look like a CVS checkout" % path)
+            raise NoRepo(_("%s does not look like a CVS checkout") % path)
 
         checktool('cvs')
 
--- a/hgext/convert/cvsps.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/cvsps.py	Sun Apr 18 15:47:49 2010 +0200
@@ -129,7 +129,7 @@
             if prefix == ".":
                 prefix = ""
         except IOError:
-            raise logerror('Not a CVS sandbox')
+            raise logerror(_('not a CVS sandbox'))
 
         if prefix and not prefix.endswith(os.sep):
             prefix += os.sep
@@ -435,8 +435,8 @@
             log.sort(key=lambda x: x.date)
 
             if oldlog and oldlog[-1].date >= log[0].date:
-                raise logerror('Log cache overlaps with new log entries,'
-                               ' re-run without cache.')
+                raise logerror(_('log cache overlaps with new log entries,'
+                                 ' re-run without cache.'))
 
             log = oldlog + log
 
--- a/hgext/convert/darcs.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/darcs.py	Sun Apr 18 15:47:49 2010 +0200
@@ -34,10 +34,10 @@
         # check for _darcs, ElementTree, _darcs/inventory so that we can
         # easily skip test-convert-darcs if ElementTree is not around
         if not os.path.exists(os.path.join(path, '_darcs', 'inventories')):
-            raise NoRepo("%s does not look like a darcs repository" % path)
+            raise NoRepo(_("%s does not look like a darcs repository") % path)
 
         if not os.path.exists(os.path.join(path, '_darcs')):
-            raise NoRepo("%s does not look like a darcs repository" % path)
+            raise NoRepo(_("%s does not look like a darcs repository") % path)
 
         checktool('darcs')
         version = self.run0('--version').splitlines()[0].strip()
--- a/hgext/convert/git.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/git.py	Sun Apr 18 15:47:49 2010 +0200
@@ -7,6 +7,7 @@
 
 import os
 from mercurial import util
+from mercurial.i18n import _
 
 from common import NoRepo, commit, converter_source, checktool
 
@@ -35,7 +36,7 @@
         if os.path.isdir(path + "/.git"):
             path += "/.git"
         if not os.path.exists(path + "/objects"):
-            raise NoRepo("%s does not look like a Git repository" % path)
+            raise NoRepo(_("%s does not look like a Git repository") % path)
 
         checktool('git', 'git')
 
--- a/hgext/convert/hg.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/hg.py	Sun Apr 18 15:47:49 2010 +0200
@@ -51,7 +51,7 @@
                 self.created.append(path)
             except error.RepoError:
                 ui.traceback()
-                raise NoRepo("could not create hg repository %s as sink"
+                raise NoRepo(_("could not create hg repository %s as sink")
                              % path)
         self.lock = None
         self.wlock = None
@@ -227,7 +227,7 @@
                 raise error.RepoError()
         except error.RepoError:
             ui.traceback()
-            raise NoRepo("%s is not a local Mercurial repository" % path)
+            raise NoRepo(_("%s is not a local Mercurial repository") % path)
         self.lastrev = None
         self.lastctx = None
         self._changescache = None
--- a/hgext/convert/p4.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/p4.py	Sun Apr 18 15:47:49 2010 +0200
@@ -28,7 +28,7 @@
         super(p4_source, self).__init__(ui, path, rev=rev)
 
         if "/" in path and not path.startswith('//'):
-            raise NoRepo('%s does not look like a P4 repository' % path)
+            raise NoRepo(_('%s does not look like a P4 repository') % path)
 
         checktool('p4', abort=False)
 
--- a/hgext/convert/subversion.py	Sun Apr 18 15:47:49 2010 +0200
+++ b/hgext/convert/subversion.py	Sun Apr 18 15:47:49 2010 +0200
@@ -207,7 +207,8 @@
                 (os.path.exists(url) and
                  os.path.exists(os.path.join(url, '.svn'))) or
                 issvnurl(ui, url)):
-            raise NoRepo("%s does not look like a Subversion repository" % url)
+            raise NoRepo(_("%s does not look like a Subversion repository")
+                         % url)
 
         try:
             SubversionException
@@ -252,7 +253,7 @@
             self.uuid = svn.ra.get_uuid(self.ra)
         except SubversionException:
             ui.traceback()
-            raise NoRepo("%s does not look like a Subversion repository"
+            raise NoRepo(_("%s does not look like a Subversion repository")
                          % self.url)
 
         if rev: