summaryrefslogtreecommitdiffstats
path: root/pym/portage/output.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-15 18:13:18 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-15 18:13:18 +0000
commit74ecc5568944b42e38cd99a4c07a6249bc9a56ed (patch)
tree4afdd58d9462b0d2efe71edfa43810e42766b5d2 /pym/portage/output.py
parent6a454b2769795983b0f91d341632782b2596ef0b (diff)
downloadportage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.tar.gz
portage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.tar.bz2
portage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.zip
Prepare 308 messages to localization.
svn path=/main/trunk/; revision=14067
Diffstat (limited to 'pym/portage/output.py')
-rw-r--r--pym/portage/output.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index 8c6eb2ce0..fbf6c01e4 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -21,6 +21,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
from portage.const import COLOR_MAP_FILE
from portage.exception import CommandNotFound, FileNotFound, \
ParseError, PermissionDenied, PortageException
+from portage.localization import _
havecolor=1
dotitles=1
@@ -177,9 +178,8 @@ def _parse_color_map(onerror=None):
split_line = line.split("=")
if len(split_line) != 2:
- e = ParseError("'%s', line %s: %s" % (
- myfile, lineno,
- "expected exactly one occurence of '=' operator"))
+ e = ParseError(_("'%s', line %s: expected exactly one occurence of '=' operator") % \
+ (myfile, lineno))
raise e
if onerror:
onerror(e)
@@ -190,9 +190,8 @@ def _parse_color_map(onerror=None):
k = strip_quotes(split_line[0].strip())
v = strip_quotes(split_line[1].strip())
if not k in _styles and not k in codes:
- e = ParseError("'%s', line %s: %s'%s'" % (
- myfile, lineno,
- "Unknown variable: ", k))
+ e = ParseError(_("'%s', line %s: Unknown variable: '%s'") % \
+ (myfile, lineno, k))
if onerror:
onerror(e)
else:
@@ -212,9 +211,8 @@ def _parse_color_map(onerror=None):
elif k in codes:
code_list.append(codes[x])
else:
- e = ParseError("'%s', line %s: %s'%s'" % (
- myfile, lineno,
- "Undefined: ", x))
+ e = ParseError(_("'%s', line %s: Undefined: '%s'") % \
+ (myfile, lineno, x))
if onerror:
onerror(e)
else:
@@ -427,7 +425,7 @@ def set_term_size(lines, columns, fd):
try:
spawn(cmd, env=os.environ, fd_pipes={0:fd})
except CommandNotFound:
- writemsg("portage: stty: command not found\n", noiselevel=-1)
+ writemsg(_("portage: stty: command not found\n"), noiselevel=-1)
class EOutput(object):
"""
@@ -730,7 +728,7 @@ try:
except FileNotFound:
pass
except PermissionDenied, e:
- writemsg("Permission denied: '%s'\n" % str(e), noiselevel=-1)
+ writemsg(_("Permission denied: '%s'\n") % str(e), noiselevel=-1)
del e
except PortageException, e:
writemsg("%s\n" % str(e), noiselevel=-1)