Mark some messages for localization.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Wed, 8 Sep 2010 14:01:42 +0000 (16:01 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Wed, 8 Sep 2010 14:01:42 +0000 (16:01 +0200)
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py
pym/portage/news.py

index b9f3e8cc8b56b5252e16cef7766eea2025d83866..0065ed3b8d5bdf0def6ca69d79a219d8227eb17c 100644 (file)
@@ -661,13 +661,13 @@ class portdbapi(dbapi):
                # returns a filename:size dictionnary of remaining downloads
                myebuild = self.findname(mypkg)
                if myebuild is None:
-                       raise AssertionError("ebuild not found for '%s'" % mypkg)
+                       raise AssertionError(_("ebuild not found for '%s'") % mypkg)
                pkgdir = os.path.dirname(myebuild)
                mf = Manifest(pkgdir, self.settings["DISTDIR"])
                checksums = mf.getDigests()
                if not checksums:
                        if debug: 
-                               writemsg("[empty/missing/bad digest]: %s\n" % (mypkg,))
+                               writemsg(_("[empty/missing/bad digest]: %s\n") % (mypkg,))
                        return {}
                filesdict={}
                myfiles = self.getFetchMap(mypkg, useflags=useflags)
@@ -719,7 +719,7 @@ class portdbapi(dbapi):
                myfiles = self.getFetchMap(mypkg, useflags=useflags)
                myebuild = self.findname(mypkg)
                if myebuild is None:
-                       raise AssertionError("ebuild not found for '%s'" % mypkg)
+                       raise AssertionError(_("ebuild not found for '%s'") % mypkg)
                pkgdir = os.path.dirname(myebuild)
                mf = Manifest(pkgdir, self.settings["DISTDIR"])
                mysums = mf.getDigests()
index c5c77294968909b4678d6fb2c49db8a087bc7dfd..fddb4326cb99573da0dce8b8c5f422afc62c8c4c 100644 (file)
@@ -3600,9 +3600,9 @@ class dblink(object):
                                                backup_dest = self._new_backup_path(mydest)
                                                msg = []
                                                msg.append("")
-                                               msg.append("Installation of a directory is blocked by a file:")
+                                               msg.append(_("Installation of a directory is blocked by a file:"))
                                                msg.append("  '%s'" % mydest)
-                                               msg.append("This file will be renamed to a different name:")
+                                               msg.append(_("This file will be renamed to a different name:"))
                                                msg.append("  '%s'" % backup_dest)
                                                msg.append("")
                                                self._eerror("preinst", msg)
@@ -3678,9 +3678,9 @@ class dblink(object):
                                                newdest = self._new_backup_path(mydest)
                                                msg = []
                                                msg.append("")
-                                               msg.append("Installation of a regular file is blocked by a directory:")
+                                               msg.append(_("Installation of a regular file is blocked by a directory:"))
                                                msg.append("  '%s'" % mydest)
-                                               msg.append("This file will be merged with a different name:")
+                                               msg.append(_("This file will be merged with a different name:"))
                                                msg.append("  '%s'" % newdest)
                                                msg.append("")
                                                self._eerror("preinst", msg)
index c0e6ef3296508022107c3ae0195ecb812de4412c..f500aa3b8cc9275482ad4201e060f7b237189bbb 100644 (file)
@@ -1,5 +1,5 @@
 # portage: news management code
-# Copyright 2006 Gentoo Foundation
+# Copyright 2006-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ["NewsManager", "NewsItem", "DisplayRestriction",
@@ -123,7 +123,7 @@ class NewsManager(object):
                                        itemid = _unicode_decode(itemid,
                                                encoding=_encodings['fs'], errors='replace')
                                        writemsg_level(
-                                               "!!! Invalid encoding in news item name: '%s'\n" % \
+                                               _("!!! Invalid encoding in news item name: '%s'\n") % \
                                                itemid, level=logging.ERROR, noiselevel=-1)
                                        continue