summaryrefslogtreecommitdiffstats
path: root/scripts/getlangnames.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-10-10 13:56:12 -0400
committerJeremy Katz <katzj@redhat.com>2008-10-10 13:58:35 -0400
commitc79faccc50470bd9fac81930f91d3b4fd9651165 (patch)
tree5f6bf36a6c97e9825911a6b8ec9d93953aa430ea /scripts/getlangnames.py
parent1619a5836c2299601af59e830ca9faa5a3395519 (diff)
downloadanaconda-c79faccc50470bd9fac81930f91d3b4fd9651165.tar.gz
anaconda-c79faccc50470bd9fac81930f91d3b4fd9651165.tar.xz
anaconda-c79faccc50470bd9fac81930f91d3b4fd9651165.zip
If we don't have a translation for a lang name, just use the English (#466515)
Diffstat (limited to 'scripts/getlangnames.py')
-rw-r--r--scripts/getlangnames.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/getlangnames.py b/scripts/getlangnames.py
index c63555097..b81d26d28 100644
--- a/scripts/getlangnames.py
+++ b/scripts/getlangnames.py
@@ -26,6 +26,7 @@ import gettext
langs = language.Language()
names = {}
for k in langs.localeInfo.keys():
+ found = False
for l in language.expandLangs(k):
try:
f = open("po/%s.mo" %(l,))
@@ -34,7 +35,10 @@ for k in langs.localeInfo.keys():
cat = gettext.GNUTranslations(f)
cat.set_output_charset("utf-8")
names[langs.localeInfo[k][0]] = cat.lgettext(langs.localeInfo[k][0])
+ found = True
break
+ if not found:
+ names[langs.localeInfo[k][0]] = langs.localeInfo[k][0]
nameList = names.keys()
nameList.sort()