[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

PATCH: language_text.py



Hi,

I encountered the following problem with anaconda-11.1.2.36-1
(with modified lang-table)
--------------------------------------------
Exception Occurred ├─────────────┐
│ Traceback (most recent call first):
│ File
│ "/usr/lib/python2.4/site-packages/snack.py",
│ line 187, in setCurrent
print self.item2key[item]
│ File
│ "/usr/lib/python2.4/site-packages/snack.py",
│ line 749, in ListboxChoiceWindow
l.setCurrent (default)
│ File
│ "/usr/lib/anaconda/textw/language_text.py",
│ line 45, in __call__
│ height = height, help = "lang")
│ File "/usr/lib/anaconda/text.py", line
│ 566, in run
rc = win(self.screen, instance)

------------------------------------------------
This problem happened when I remove entries from
lang-table except Chinese/English/Japanese/Korea

anaconda.id.instLanguage.getNickByName('English')'s
return value depends on anaconda.id.instLanguage.
localeInfo situation.
it returns "C" on some situation.
and it returns "en_US.UTF-8" on the other situation.

so I made temporary patch to avoid this problem.

I'll really appreciate if you would review it and
give me some advice.

thank you.

--- language_text.py	2006-10-18 05:39:05.000000000 +0900
+++ language_text.py.new	2007-04-04 04:03:37.000000000 +0900
@@ -36,7 +36,11 @@
 
         translated = []
         for lang in languages:
-            translated.append ((_(lang), anaconda.id.instLanguage.getNickByName(lang)))
+            # Hard code this to prevent errors in the build environment.
+            if lang == 'English' and current in ('C', 'en_US.UTF-8'):
+                translated.append ((_(lang), current))
+            else:
+                translated.append ((_(lang), anaconda.id.instLanguage.getNickByName(lang)))
         (button, choice) = \
             ListboxChoiceWindow(screen, _("Language Selection"),
 			_("What language would you like to use during the "

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]