diff mercurial/obsolete.py @ 29389:98e8313dcd9e

i18n: translate abort messages I found a few places where message given to abort is not translated, I don't find any reason to not translate them.
author liscju <piotr.listkiewicz@gmail.com>
date Tue, 14 Jun 2016 11:53:55 +0200
parents 9ac309946df9
children 02c150850e16
line wrap: on
line diff
--- a/mercurial/obsolete.py	Tue Jun 07 12:10:01 2016 +0200
+++ b/mercurial/obsolete.py	Tue Jun 14 11:53:55 2016 +0200
@@ -600,8 +600,8 @@
         Take care of filtering duplicate.
         Return the number of new marker."""
         if self._readonly:
-            raise error.Abort('creating obsolete markers is not enabled on '
-                              'this repo')
+            raise error.Abort(_('creating obsolete markers is not enabled on '
+                              'this repo'))
         known = set(self._all)
         new = []
         for m in markers:
@@ -1234,7 +1234,7 @@
                 localmetadata.update(rel[2])
 
             if not prec.mutable():
-                raise error.Abort("cannot obsolete public changeset: %s"
+                raise error.Abort(_("cannot obsolete public changeset: %s")
                                  % prec,
                                  hint='see "hg help phases" for details')
             nprec = prec.node()
@@ -1243,7 +1243,8 @@
             if not nsucs:
                 npare = tuple(p.node() for p in prec.parents())
             if nprec in nsucs:
-                raise error.Abort("changeset %s cannot obsolete itself" % prec)
+                raise error.Abort(_("changeset %s cannot obsolete itself")
+                                  % prec)
 
             # Creating the marker causes the hidden cache to become invalid,
             # which causes recomputation when we ask for prec.parents() above.