diff options
author | Matt Wilson <msw@redhat.com> | 2001-01-10 19:30:44 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-01-10 19:30:44 +0000 |
commit | 55975cfa0a237547275694f9e8319a7a62abdcdd (patch) | |
tree | 2d8e7497618dad7100a59ab45f3ae7172e835459 /text.py | |
parent | 75679f911ae08c74278c1b887d82701d539f79e7 (diff) | |
download | anaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.tar.gz anaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.tar.xz anaconda-55975cfa0a237547275694f9e8319a7a62abdcdd.zip |
search langpaths for text helpscreens
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -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: |