---
 yum/comps.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/yum/comps.py b/yum/comps.py
index 8d3e171..f53b4f4 100755
--- a/yum/comps.py
+++ b/yum/comps.py
@@ -434,9 +434,20 @@ class Comps(object):
             else:
                 match = re.compile(fnmatch.translate(item), flags=re.I).match
 
+            done = False
             for group in self.groups:
                 for name in group.name, group.groupid, group.ui_name:
                     if match(name):
+                        done = True
+                        returns[group.groupid] = group
+                        break
+            if done:
+                continue
+
+            # If we didn't match to anything in the current locale, try others
+            for group in self.groups:
+                for name in group.translated_name.values():
+                    if match(name):
                         returns[group.groupid] = group
                         break
 
@@ -460,9 +471,19 @@ class Comps(object):
             else:
                 match = re.compile(fnmatch.translate(item), flags=re.I).match
 
+            done = False
             for cat in self.categories:
                 for name in cat.name, cat.categoryid, cat.ui_name:
                     if match(name):
+                        done = True
+                        returns[cat.categoryid] = cat
+                        break
+            if done:
+                continue
+
+            for cat in self.categories:
+                for name in cat.translated_name.values():
+                    if match(name):
                         returns[cat.categoryid] = cat
                         break
 
-- 
1.6.2.5

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to