public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13733 - in main/trunk/pym/portage: elog env sets
@ 2009-06-29 11:23 Arfrever Frehtes Taifersar Arahesis (arfrever)
  0 siblings, 0 replies; only message in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-06-29 11:23 UTC (permalink / raw
  To: gentoo-commits

Author: arfrever
Date: 2009-06-29 11:23:09 +0000 (Mon, 29 Jun 2009)
New Revision: 13733

Modified:
   main/trunk/pym/portage/elog/__init__.py
   main/trunk/pym/portage/elog/messages.py
   main/trunk/pym/portage/elog/mod_echo.py
   main/trunk/pym/portage/elog/mod_mail.py
   main/trunk/pym/portage/elog/mod_mail_summary.py
   main/trunk/pym/portage/elog/mod_save_summary.py
   main/trunk/pym/portage/env/loaders.py
   main/trunk/pym/portage/sets/__init__.py
   main/trunk/pym/portage/sets/dbapi.py
   main/trunk/pym/portage/sets/files.py
   main/trunk/pym/portage/sets/libs.py
Log:
Prepare 41 messages to localization.


Modified: main/trunk/pym/portage/elog/__init__.py
===================================================================
--- main/trunk/pym/portage/elog/__init__.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/__init__.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -13,6 +13,7 @@
 from portage.process import atexit_register
 from portage.elog.messages import collect_ebuild_messages, collect_messages
 from portage.elog.filtering import filter_loglevels
+from portage.localization import _
 
 import os
 
@@ -157,8 +158,8 @@
 					_elog_atexit_handlers.append(m.finalize)
 					atexit_register(m.finalize)
 			except (ImportError, AttributeError), e:
-				writemsg("!!! Error while importing logging modules " + \
-					"while loading \"mod_%s\":\n" % str(s))
+				writemsg(_("!!! Error while importing logging modules "
+					"while loading \"mod_%s\":\n") % str(s))
 				writemsg("%s\n" % str(e), noiselevel=-1)
 			except PortageException, e:
 				writemsg("%s\n" % str(e), noiselevel=-1)

Modified: main/trunk/pym/portage/elog/messages.py
===================================================================
--- main/trunk/pym/portage/elog/messages.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/messages.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -10,6 +10,7 @@
 )
 
 from portage.const import EBUILD_PHASES
+from portage.localization import _
 
 import os
 import sys
@@ -32,7 +33,7 @@
 	for msgfunction in mylogfiles:
 		filename = os.path.join(path, msgfunction)
 		if msgfunction not in EBUILD_PHASES:
-			writemsg("!!! can't process invalid log file: %s\n" % filename,
+			writemsg(_("!!! can't process invalid log file: %s\n") % filename,
 				noiselevel=-1)
 			continue
 		if not msgfunction in logentries:
@@ -45,8 +46,8 @@
 			try:
 				msgtype, msg = l.split(" ", 1)
 			except ValueError:
-				writemsg("!!! malformed entry in " + \
-					"log file: '%s'\n" % filename, noiselevel=-1)
+				writemsg(_("!!! malformed entry in "
+					"log file: '%s'\n") % filename, noiselevel=-1)
 				continue
 
 			if lastmsgtype is None:

Modified: main/trunk/pym/portage/elog/mod_echo.py
===================================================================
--- main/trunk/pym/portage/elog/mod_echo.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/mod_echo.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -5,6 +5,7 @@
 
 from portage.output import EOutput, colorize
 from portage.const import EBUILD_PHASES
+from portage.localization import _
 
 _items = []
 def process(mysettings, key, logentries, fulltext):
@@ -18,12 +19,13 @@
 	global _items
 	printer = EOutput()
 	for mysettings, key, logentries in _items:
-		root_msg = ""
-		if mysettings["ROOT"] != "/":
-			root_msg = " merged to %s" % mysettings["ROOT"]
 		print
-		printer.einfo("Messages for package %s%s:" % \
-			(colorize("INFORM", key), root_msg))
+		if mysettings["ROOT"] == "/":
+			printer.einfo(_("Messages for package %s:") %
+				colorize("INFORM", key))
+		else:
+			printer.einfo(_("Messages for package %(pkg)s merged to %(root)s:") %
+				{"pkg": colorize("INFORM", key), "root": mysettings["ROOT"]})
 		print
 		for phase in EBUILD_PHASES:
 			if phase not in logentries:

Modified: main/trunk/pym/portage/elog/mod_mail.py
===================================================================
--- main/trunk/pym/portage/elog/mod_mail.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/mod_mail.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -5,6 +5,7 @@
 
 import portage.mail, socket
 from portage.exception import PortageException
+from portage.localization import _
 from portage.util import writemsg
 
 def process(mysettings, key, logentries, fulltext):
@@ -20,17 +21,17 @@
 	mysubject = mysubject.replace("${HOST}", socket.getfqdn())
 
 	# look at the phases listed in our logentries to figure out what action was performed
-	action = "merged"
+	action = _("merged")
 	for phase in logentries.keys():
 		# if we found a *rm phase assume that the package was unmerged
 		if phase in ["postrm", "prerm"]:
-			action = "unmerged"
+			action = _("unmerged")
 	# if we think that the package was unmerged, make sure there was no unexpected
 	# phase recorded to avoid misinformation
-	if action == "unmerged":
+	if action == _("unmerged"):
 		for phase in logentries.keys():
 			if phase not in ["postrm", "prerm", "other"]:
-				action = "unknown"
+				action = _("unknown")
 
 	mysubject = mysubject.replace("${ACTION}", action)
 

Modified: main/trunk/pym/portage/elog/mod_mail_summary.py
===================================================================
--- main/trunk/pym/portage/elog/mod_mail_summary.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/mod_mail_summary.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -5,14 +5,15 @@
 
 import portage.mail, socket, os, time
 from portage.exception import PortageException
+from portage.localization import _
 from portage.util import writemsg
 from email.MIMEText import MIMEText as TextMessage
 
 _items = {}
 def process(mysettings, key, logentries, fulltext):
 	global _items
-	header = ">>> Messages generated for package %s by process %d on %s:\n\n" % \
-		(key, os.getpid(), time.strftime("%Y%m%d-%H%M%S %Z", time.localtime(time.time())))
+	header = _(">>> Messages generated for package %(pkg)s by process %(pid)d on %(time)s:\n\n") % \
+		{"pkg": key, "pid": os.getpid(), "time": time.strftime("%Y%m%d-%H%M%S %Z", time.localtime(time.time()))}
 	config_root = mysettings["PORTAGE_CONFIGROOT"]
 	mysettings, items = _items.setdefault(config_root, (mysettings, {}))
 	items[key] = header + fulltext
@@ -30,9 +31,9 @@
 	if len(items) == 0:
 		return
 	elif len(items) == 1:
-		count = "one package"
+		count = _("one package")
 	else:
-		count = "multiple packages"
+		count = _("multiple packages")
 	if "PORTAGE_ELOG_MAILURI" in mysettings:
 		myrecipient = mysettings["PORTAGE_ELOG_MAILURI"].split()[0]
 	else:
@@ -44,8 +45,8 @@
 	mysubject = mysubject.replace("${PACKAGE}", count)
 	mysubject = mysubject.replace("${HOST}", socket.getfqdn())
 
-	mybody = "elog messages for the following packages generated by " + \
-		"process %d on host %s:\n" % (os.getpid(), socket.getfqdn())
+	mybody = _("elog messages for the following packages generated by "
+		"process %(pid)d on host %(host)s:\n") % {"pid": os.getpid(), "host": socket.getfqdn()}
 	for key in items:
 		 mybody += "- %s\n" % key
 

Modified: main/trunk/pym/portage/elog/mod_save_summary.py
===================================================================
--- main/trunk/pym/portage/elog/mod_save_summary.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/elog/mod_save_summary.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -5,6 +5,7 @@
 
 import os, time
 from portage.data import portage_uid, portage_gid
+from portage.localization import _
 from portage.util import ensure_dirs, apply_permissions
 
 def process(mysettings, key, logentries, fulltext):
@@ -18,8 +19,8 @@
 	elogfilename = elogdir+"/summary.log"
 	elogfile = open(elogfilename, "a")
 	apply_permissions(elogfilename, mode=060, mask=0)
-	elogfile.write(">>> Messages generated by process %d on %s for package %s:\n\n" % \
-			(os.getpid(), time.strftime("%Y-%m-%d %H:%M:%S %Z", time.localtime(time.time())), key))
+	elogfile.write(_(">>> Messages generated by process %(pid)d on %(time)s for package %(pkg)s:\n\n") %
+			{"pid": os.getpid(), "time": time.strftime("%Y-%m-%d %H:%M:%S %Z", time.localtime(time.time())), "pkg": key})
 	elogfile.write(fulltext)
 	elogfile.write("\n")
 	elogfile.close()

Modified: main/trunk/pym/portage/env/loaders.py
===================================================================
--- main/trunk/pym/portage/env/loaders.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/env/loaders.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -5,6 +5,7 @@
 
 import os
 import stat
+from portage.localization import _
 
 class LoaderError(Exception):
 	
@@ -181,13 +182,13 @@
 		split = line.split()
 		if not len(split):
 			errors.setdefault(self.fname, []).append(
-				"Malformed data at line: %s, data: %s"
+				_("Malformed data at line: %s, data: %s")
 				% (line_num + 1, line))
 			return
 		key = split[0]
 		if not self._validate(key):
 			errors.setdefault(self.fname, []).append(
-				"Validation failed at line: %s, data %s"
+				_("Validation failed at line: %s, data %s")
 				% (line_num + 1, key))
 			return
 		data[key] = None
@@ -222,19 +223,19 @@
 		split = line.split()
 		if len(split) < 1:
 			errors.setdefault(self.fname, []).append(
-				"Malformed data at line: %s, data: %s"
+				_("Malformed data at line: %s, data: %s")
 				% (line_num + 1, line))
 			return
 		key = split[0]
 		value = split[1:]
 		if not self._validate(key):
 			errors.setdefault(self.fname, []).append(
-				"Key validation failed at line: %s, data %s"
+				_("Key validation failed at line: %s, data %s")
 				% (line_num + 1, key))
 			return
 		if not self._valueValidate(value):
 			errors.setdefault(self.fname, []).append(
-				"Value validation failed at line: %s, data %s"
+				_("Value validation failed at line: %s, data %s")
 				% (line_num + 1, value))
 			return
 		if key in data:
@@ -276,24 +277,24 @@
 		split = line.split('=', 1)
 		if len(split) < 2:
 			errors.setdefault(self.fname, []).append(
-				"Malformed data at line: %s, data %s"
+				_("Malformed data at line: %s, data %s")
 				% (line_num + 1, line))
 			return
 		key = split[0].strip()
 		value = split[1].strip()
 		if not key:
 			errors.setdefault(self.fname, []).append(
-				"Malformed key at line: %s, key %s"
+				_("Malformed key at line: %s, key %s")
 				% (line_num + 1, key))
 			return
 		if not self._validate(key):
 			errors.setdefault(self.fname, []).append(
-				"Key validation failed at line: %s, data %s"
+				_("Key validation failed at line: %s, data %s")
 				% (line_num + 1, key))
 			return
 		if not self._valueValidate(value):
 			errors.setdefault(self.fname, []).append(
-				"Value validation failed at line: %s, data %s"
+				_("Value validation failed at line: %s, data %s")
 				% (line_num + 1, value))
 			return
 		if key in data:

Modified: main/trunk/pym/portage/sets/__init__.py
===================================================================
--- main/trunk/pym/portage/sets/__init__.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/sets/__init__.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -10,6 +10,7 @@
 from portage import load_mod
 from portage.const import USER_CONFIG_PATH, GLOBAL_CONFIG_PATH
 from portage.exception import PackageSetNotFound
+from portage.localization import _
 
 SETPREFIX = "@"
 
@@ -21,7 +22,7 @@
 	elif options[name].lower() in ("0", "no", "off", "false"):
 		return False
 	else:
-		raise SetConfigError("invalid value '%s' for option '%s'" % (options[name], name))
+		raise SetConfigError(_("invalid value '%(value)s' for option '%(option)s'") % {"value": options[name], "option": name})
 
 class SetConfigError(Exception):
 	pass
@@ -56,7 +57,8 @@
 			section = self.psets[setname].creator
 			if parser.has_option(section, "multiset") and \
 				parser.getboolean(section, "multiset"):
-				self.errors.append("Invalid request to reconfigure set '%s' generated by multiset section '%s'" % (setname, section))
+				self.errors.append(_("Invalid request to reconfigure set '%(set)s' generated "
+					"by multiset section '%(section)s'") % {"set": setname, "section": section})
 				return
 			for k, v in options.items():
 				parser.set(section, k, v)
@@ -80,7 +82,8 @@
 				try:
 					setclass = load_mod("portage.sets."+classname)
 				except (ImportError, AttributeError):
-					self.errors.append("Could not import '%s' for section '%s'" % (classname, sname))
+					self.errors.append(_("Could not import '%(class)s' for section "
+						"'%(section)s'") % {"class": classname, "section": sname})
 					continue
 			# prepare option dict for the current section
 			optdict = {}
@@ -95,18 +98,19 @@
 					try:
 						newsets = setclass.multiBuilder(optdict, self.settings, self.trees)
 					except SetConfigError, e:
-						self.errors.append("Configuration error in section '%s': %s" % (sname, str(e)))
+						self.errors.append(_("Configuration error in section '%s': %s") % (sname, str(e)))
 						continue
 					for x in newsets:
 						if x in self.psets and not update:
-							self.errors.append("Redefinition of set '%s' (sections: '%s', '%s')" % (x, self.psets[x].creator, sname))
+							self.errors.append(_("Redefinition of set '%s' (sections: '%s', '%s')") % (x, self.psets[x].creator, sname))
 						newsets[x].creator = sname
 						if parser.has_option(sname, "world-candidate") and \
 							not parser.getboolean(sname, "world-candidate"):
 							newsets[x].world_candidate = False
 					self.psets.update(newsets)
 				else:
-					self.errors.append("Section '%s' is configured as multiset, but '%s' doesn't support that configuration" % (sname, classname))
+					self.errors.append(_("Section '%(section)s' is configured as multiset, but '%(class)s' "
+						"doesn't support that configuration") % {"section": sname, "class": classname})
 					continue
 			else:
 				try:
@@ -114,7 +118,7 @@
 				except NoOptionError:
 					setname = sname
 				if setname in self.psets and not update:
-					self.errors.append("Redefinition of set '%s' (sections: '%s', '%s')" % (setname, self.psets[setname].creator, sname))
+					self.errors.append(_("Redefinition of set '%s' (sections: '%s', '%s')") % (setname, self.psets[setname].creator, sname))
 				if hasattr(setclass, "singleBuilder"):
 					try:
 						self.psets[setname] = setclass.singleBuilder(optdict, self.settings, self.trees)
@@ -123,10 +127,11 @@
 							not parser.getboolean(sname, "world-candidate"):
 							self.psets[setname].world_candidate = False
 					except SetConfigError, e:
-						self.errors.append("Configuration error in section '%s': %s" % (sname, str(e)))
+						self.errors.append(_("Configuration error in section '%s': %s") % (sname, str(e)))
 						continue
 				else:
-					self.errors.append("'%s' does not support individual set creation, section '%s' must be configured as multiset" % (classname, sname))
+					self.errors.append(_("'%(class)s' does not support individual set creation, section '%(section)s' "
+						"must be configured as multiset") % {"class": classname, "section": sname})
 					continue
 		self._parsed = True
 	

Modified: main/trunk/pym/portage/sets/dbapi.py
===================================================================
--- main/trunk/pym/portage/sets/dbapi.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/sets/dbapi.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -4,6 +4,7 @@
 
 from portage.versions import catpkgsplit, catsplit, pkgcmp, best
 from portage.dep import Atom
+from portage.localization import _
 from portage.sets.base import PackageSet
 from portage.sets import SetConfigError, get_boolean
 
@@ -81,7 +82,7 @@
 
 	def singleBuilder(cls, options, settings, trees):
 		if not "files" in options:
-			raise SetConfigError("no files given")
+			raise SetConfigError(_("no files given"))
 
 		import shlex
 		return cls(vardb=trees["vartree"].dbapi,
@@ -119,17 +120,17 @@
 
 		variable = options.get("variable")
 		if variable is None:
-			raise SetConfigError("missing required attribute: 'variable'")
+			raise SetConfigError(_("missing required attribute: 'variable'"))
 
 		includes = options.get("includes", "")
 		excludes = options.get("excludes", "")
 
 		if not (includes or excludes):
-			raise SetConfigError("no includes or excludes given")
+			raise SetConfigError(_("no includes or excludes given"))
 		
 		metadatadb = options.get("metadata-source", "vartree")
 		if not metadatadb in trees.keys():
-			raise SetConfigError("invalid value '%s' for option metadata-source" % metadatadb)
+			raise SetConfigError(_("invalid value '%s' for option metadata-source") % metadatadb)
 
 		return cls(trees["vartree"].dbapi,
 			metadatadb=trees[metadatadb].dbapi,
@@ -198,7 +199,7 @@
 
 		metadatadb = options.get("metadata-source", "porttree")
 		if not metadatadb in trees:
-			raise SetConfigError(("invalid value '%s' for option " + \
+			raise SetConfigError(_("invalid value '%s' for option "
 				"metadata-source") % (metadatadb,))
 
 		return cls(trees["vartree"].dbapi,
@@ -234,11 +235,11 @@
 		
 	def singleBuilder(cls, options, settings, trees):
 		if not "category" in options:
-			raise SetConfigError("no category given")
+			raise SetConfigError(_("no category given"))
 
 		category = options["category"]
 		if not category in settings.categories:
-			raise SetConfigError("invalid category name '%s'" % category)
+			raise SetConfigError(_("invalid category name '%s'") % category)
 
 		visible = cls._builderGetVisible(options)
 		
@@ -252,7 +253,7 @@
 			categories = options["categories"].split()
 			invalid = set(categories).difference(settings.categories)
 			if invalid:
-				raise SetConfigError("invalid categories: %s" % ", ".join(list(invalid)))
+				raise SetConfigError(_("invalid categories: %s") % ", ".join(list(invalid)))
 		else:
 			categories = settings.categories
 	
@@ -260,7 +261,7 @@
 		name_pattern = options.get("name_pattern", "$category/*")
 	
 		if not "$category" in name_pattern and not "${category}" in name_pattern:
-			raise SetConfigError("name_pattern doesn't include $category placeholder")
+			raise SetConfigError(_("name_pattern doesn't include $category placeholder"))
 	
 		for cat in categories:
 			myset = CategorySet(cat, trees["porttree"].dbapi, only_visible=visible)
@@ -293,11 +294,11 @@
 	def singleBuilder(cls, options, settings, trees):
 		mode = options.get("mode", "older")
 		if str(mode).lower() not in ["newer", "older"]:
-			raise SetConfigError("invalid 'mode' value %s (use either 'newer' or 'older')" % mode)
+			raise SetConfigError(_("invalid 'mode' value %s (use either 'newer' or 'older')") % mode)
 		try:
 			age = int(options.get("age", "7"))
 		except ValueError, e:
-			raise SetConfigError("value of option 'age' is not an integer")
+			raise SetConfigError(_("value of option 'age' is not an integer"))
 		return AgeSet(vardb=trees["vartree"].dbapi, mode=mode, age=age)
 
 	singleBuilder = classmethod(singleBuilder)

Modified: main/trunk/pym/portage/sets/files.py
===================================================================
--- main/trunk/pym/portage/sets/files.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/sets/files.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -9,6 +9,7 @@
 
 from portage.util import grabfile, write_atomic, ensure_dirs, normalize_path
 from portage.const import PRIVATE_PATH, USER_CONFIG_PATH
+from portage.localization import _
 from portage.locks import lockfile, unlockfile
 from portage import portage_gid
 from portage.sets.base import PackageSet, EditablePackageSet
@@ -31,7 +32,7 @@
 		self.description = "Package set loaded from file %s" % self._filename
 		self.loader = ItemFileLoader(self._filename, self._validate)
 		if greedy and not dbapi:
-			self.errors.append("%s configured as greedy set, but no dbapi instance passed in constructor" % self._filename)
+			self.errors.append(_("%s configured as greedy set, but no dbapi instance passed in constructor") % self._filename)
 			greedy = False
 		self.greedy = greedy
 		self.dbapi = dbapi
@@ -95,7 +96,7 @@
 		
 	def singleBuilder(self, options, settings, trees):
 		if not "filename" in options:
-			raise SetConfigError("no filename specified")
+			raise SetConfigError(_("no filename specified"))
 		greedy = get_boolean(options, "greedy", False)
 		filename = options["filename"]
 		# look for repository path variables
@@ -104,7 +105,7 @@
 			try:
 				filename = self._repopath_sub.sub(trees["porttree"].dbapi.treemap[match.groupdict()["reponame"]], filename)
 			except KeyError:
-				raise SetConfigError("Could not find repository '%s'" % match.groupdict()["reponame"])
+				raise SetConfigError(_("Could not find repository '%s'") % match.groupdict()["reponame"])
 		return StaticFileSet(filename, greedy=greedy, dbapi=trees["vartree"].dbapi)
 	singleBuilder = classmethod(singleBuilder)
 	
@@ -113,7 +114,7 @@
 		directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(os.sep), "sets"))
 		name_pattern = options.get("name_pattern", "${name}")
 		if not "$name" in name_pattern and not "${name}" in name_pattern:
-			raise SetConfigError("name_pattern doesn't include ${name} placeholder")
+			raise SetConfigError(_("name_pattern doesn't include ${name} placeholder"))
 		greedy = get_boolean(options, "greedy", False)
 		# look for repository path variables
 		match = self._repopath_match.match(directory)
@@ -121,7 +122,7 @@
 			try:
 				directory = self._repopath_sub.sub(trees["porttree"].dbapi.treemap[match.groupdict()["reponame"]], directory)
 			except KeyError:
-				raise SetConfigError("Could not find repository '%s'" % match.groupdict()["reponame"])
+				raise SetConfigError(_("Could not find repository '%s'") % match.groupdict()["reponame"])
 		if os.path.isdir(directory):
 			directory = normalize_path(directory)
 			for parent, dirs, files in os.walk(directory):
@@ -156,7 +157,7 @@
 	
 	def singleBuilder(self, options, settings, trees):
 		if not "filename" in options:
-			raise SetConfigError("no filename specified")
+			raise SetConfigError(_("no filename specified"))
 		return ConfigFileSet(options["filename"])
 	singleBuilder = classmethod(singleBuilder)
 	
@@ -165,7 +166,7 @@
 		directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(os.sep)))
 		name_pattern = options.get("name_pattern", "sets/package_$suffix")
 		if not "$suffix" in name_pattern and not "${suffix}" in name_pattern:
-			raise SetConfigError("name_pattern doesn't include $suffix placeholder")
+			raise SetConfigError(_("name_pattern doesn't include $suffix placeholder"))
 		for suffix in ["keywords", "use", "mask", "unmask"]:
 			myname = name_pattern.replace("$suffix", suffix)
 			myname = myname.replace("${suffix}", suffix)

Modified: main/trunk/pym/portage/sets/libs.py
===================================================================
--- main/trunk/pym/portage/sets/libs.py	2009-06-28 22:59:49 UTC (rev 13732)
+++ main/trunk/pym/portage/sets/libs.py	2009-06-29 11:23:09 UTC (rev 13733)
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
+from portage.localization import _
 from portage.sets.base import PackageSet
 from portage.sets import get_boolean
 from portage.versions import catpkgsplit
@@ -49,7 +50,7 @@
 		import shlex
 		files = tuple(shlex.split(options.get("files", "")))
 		if not files:
-			raise SetConfigError("no files given")
+			raise SetConfigError(_("no files given"))
 		debug = get_boolean(options, "debug", False)
 		return LibraryFileConsumerSet(trees["vartree"].dbapi,
 			files, debug=debug)




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-29 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-29 11:23 [gentoo-commits] portage r13733 - in main/trunk/pym/portage: elog env sets Arfrever Frehtes Taifersar Arahesis (arfrever)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox