diff options
| author | Ales Kozumplik <akozumpl@redhat.com> | 2011-09-05 14:18:06 +0200 |
|---|---|---|
| committer | Ales Kozumplik <akozumpl@redhat.com> | 2011-09-07 08:15:29 +0200 |
| commit | 2dfbb942eef6c7c92ac95da671bb6fac7ad26a27 (patch) | |
| tree | 9c9375de99ad6314e5b8adee5e7407a784b50d6e /scripts | |
| parent | 14bfaba9f29b3347534b6dc401c7e9e1143a3414 (diff) | |
| download | anaconda-2dfbb942eef6c7c92ac95da671bb6fac7ad26a27.tar.gz anaconda-2dfbb942eef6c7c92ac95da671bb6fac7ad26a27.tar.xz anaconda-2dfbb942eef6c7c92ac95da671bb6fac7ad26a27.zip | |
isolate localeInfo and expandLangs() from langauges.py into a separate module.
After 0c662ebeaf4043ff2e2a1f7d09b527f4bf243047, we can not build due to
imports problem during build time (importing pyanaconda.constants tries to
import pyanaconda.__init__ which tries to import isys etc.). This change
separates the language.py bits and the bits needed during build time.
Includes new unit tests.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/getlangnames.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/getlangnames.py b/scripts/getlangnames.py index bc3cced98..2e579a41a 100644 --- a/scripts/getlangnames.py +++ b/scripts/getlangnames.py @@ -19,26 +19,26 @@ import sys sys.path.append("..") -import language as language +import localeinfo import gettext -langs = language.Language() +localeInfo = localeinfo.get("en_US.UTF-8") names = {} -for k in langs.localeInfo.keys(): +for k in localeInfo.keys(): found = False - for l in language.expandLangs(k): + for l in localeinfo.expandLangs(k): try: f = open("../po/%s.gmo" %(l,)) except (OSError, IOError): continue cat = gettext.GNUTranslations(f) cat.set_output_charset("utf-8") - names[langs.localeInfo[k][0]] = cat.lgettext(langs.localeInfo[k][0]) + names[localeInfo[k][0]] = cat.lgettext(localeInfo[k][0]) found = True break if not found: - names[langs.localeInfo[k][0]] = langs.localeInfo[k][0] + names[localeInfo[k][0]] = localeInfo[k][0] nameList = names.keys() nameList.sort() |
