summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-08-16 03:38:54 +0000
committerJeremy Katz <katzj@redhat.com>2002-08-16 03:38:54 +0000
commit1a0b07bdc0fcac950ef7f4817fe710dc8061b5e7 (patch)
tree39f771c7bde48e1aec69e8a2e88e777000204cda /comps.py
parent4a9fad5070dd8a4a51669fb14c0361fc5f1cc2c4 (diff)
downloadanaconda-1a0b07bdc0fcac950ef7f4817fe710dc8061b5e7.tar.gz
anaconda-1a0b07bdc0fcac950ef7f4817fe710dc8061b5e7.tar.xz
anaconda-1a0b07bdc0fcac950ef7f4817fe710dc8061b5e7.zip
handle the translated comps stuff
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/comps.py b/comps.py
index bede802ae..3fa730a01 100644
--- a/comps.py
+++ b/comps.py
@@ -1019,10 +1019,28 @@ def orderPackageGroups(curgroups):
ignorelst = []
retlist = []
retdict = {}
-
+
+ if os.environ.has_key("LANG"):
+ langs = language.expandLangs(os.environ["LANG"])
+ else:
+ langs = []
+
for key in compsParents:
- retlist.append(key)
- retdict[key] = []
+
+ # get the translated name
+ myname = None
+ if not compsHierarchy.translations.has_key(key):
+ myname = key
+ else:
+ for lang in langs:
+ if compsHierarchy.translations[key].has_key(lang):
+ myname = compsHierarchy.translations[key][lang]
+ break
+ if myname is None:
+ myname = key
+
+ retlist.append(myname)
+ retdict[myname] = []
compslist = compsHierarchy[key]
for grp in compslist:
@@ -1030,9 +1048,9 @@ def orderPackageGroups(curgroups):
if grp in grpids:
thecomp = curgroups.compsById[grp]
ignorelst.append(grp)
- retdict[key].append(thecomp)
+ retdict[myname].append(thecomp)
- miscgrp = "Miscellaneous"
+ miscgrp = _("Miscellaneous")
for grp in grpids:
if grp in ignorelst:
continue