diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-09-20 16:53:35 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-09-20 16:53:35 -1000 |
commit | 2c910becb2174fde83f9fd733e87b94128c0653d (patch) | |
tree | ac6228e221e8e40c5d56632556a8bc9401ee4581 /scripts | |
parent | f8cfa36e0764782767d5a02dfda9b605440cb83e (diff) | |
download | anaconda-2c910becb2174fde83f9fd733e87b94128c0653d.tar.gz anaconda-2c910becb2174fde83f9fd733e87b94128c0653d.tar.xz anaconda-2c910becb2174fde83f9fd733e87b94128c0653d.zip |
Revert "Fix lang-name generation"
This reverts commit a6ba02f4099c40f3dd2c2783cf0bac2c1900ade4.
This currently breaks lang-names generation. We see this in the
build.log in koji:
PYTHONPATH="." python2.5 scripts/getlangnames.py > lang-names
Traceback (most recent call last):
File "scripts/getlangnames.py", line 37, in <module>
names[langs.localeInfo[k][0]] = cat.lgettext(langs.localeInfo[k][0])
File "/usr/lib/python2.5/gettext.py", line 368, in lgettext
return tmsg.encode(locale.getpreferredencoding())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
I'm just a simple back country hyperchicken, not a Unicode expert.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/getlangnames.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/getlangnames.py b/scripts/getlangnames.py index edf8e1f60..3189ca835 100644 --- a/scripts/getlangnames.py +++ b/scripts/getlangnames.py @@ -21,19 +21,15 @@ import sys sys.path.append("..") import language +from constants import * import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) langs = language.Language() names = {} for k in langs.localeInfo.keys(): - for l in language.expandLangs(k): - try: - f = open("po/%s.mo" %(l,)) - except (OSError, IOError): - continue - cat = gettext.GNUTranslations(f) - names[langs.localeInfo[k][0]] = cat.lgettext(langs.localeInfo[k][0]) - break + langs.setRuntimeLanguage(k) + names[langs.localeInfo[k][0]] = _(langs.localeInfo[k][0]) nameList = names.keys() nameList.sort() |