summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-01-10 19:30:44 +0000
committerMatt Wilson <msw@redhat.com>2001-01-10 19:30:44 +0000
commit55975cfa0a237547275694f9e8319a7a62abdcdd (patch)
tree2d8e7497618dad7100a59ab45f3ae7172e835459 /text.py
parent75679f911ae08c74278c1b887d82701d539f79e7 (diff)
downloadanaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.tar.gz
anaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.tar.xz
anaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.zip
search langpaths for text helpscreens
Diffstat (limited to 'text.py')
-rw-r--r--text.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/text.py b/text.py
index cd6211bbf..7596cdb5f 100644
--- a/text.py
+++ b/text.py
@@ -865,16 +865,30 @@ class InstallInterface:
else:
lang = lang[0]
- fn = "/usr/share/anaconda/help/%s/s1-help-screens-%s.txt" \
- % (lang, key)
-
+ # stolen from gettext.py
+ langs = [lang]
+ # remove charset ...
+ if '.' in lang:
+ langs.append(string.split(lang, '.')[0])
+ # also add 2 character language code ...
+ if len(lang) > 2:
+ langs.append(lang[:2])
+
+ f = None
+ for lang in langs:
+ fn = "/usr/share/anaconda/help/%s/s1-help-screens-%s.txt" \
+ % (lang, key)
+ try:
+ f = open (fn)
+ except IOError, msg:
+ continue
+ break
+
# uncomment to test help text installed in local directory instead
# fn = "./text-help/%s/s1-help-screens-%s.txt" \
# % (lang, key)
- try:
- f = open(fn)
- except IOError, msg:
+ if not f:
if firstTime:
return self.helpWindow(screen, "helponhelp", firstTime = 0)
else: