diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-23 23:28:12 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-23 23:28:12 +0100 |
commit | f5c4ba0242a02322722f2aa892299afe3d62a0b2 (patch) | |
tree | 4f8682c88aa19797c4eea6f915dcaa206128c066 /helpcontent2/to-wiki | |
parent | f7fb11a8100d2d5f571984fad0b68dfe609a7ad1 (diff) |
wikihelp: Fix {{OnlyInAPP|...}} generation.
Diffstat (limited to 'helpcontent2/to-wiki')
-rwxr-xr-x | helpcontent2/to-wiki/wikiconv2.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py index a1f3548860..fa98c20788 100755 --- a/helpcontent2/to-wiki/wikiconv2.py +++ b/helpcontent2/to-wiki/wikiconv2.py @@ -725,14 +725,17 @@ class SwitchInline(ElementBase): text = '' for i in self.objects: appls = {'CALC':'Calc', 'CHART':'Chart', 'DRAW':'Draw', \ - 'IMPRESS': 'Impress', 'MATH':'Math', 'WRITER':'Writer'} - obj = self.objects[0] + 'IMPRESS': 'Impress', 'MATH':'Math', \ + 'WRITER':'Writer', 'default':''} try: - app = appls[obj.case] - text = text + '{{OnlyIn%s|%s}}'% (app, obj.get_all()) + app = appls[i.case] + if app == '': + text = text + i.get_all() + else: + text = text + '{{OnlyIn%s|%s}}'% (app, i.get_all()) except: - sys.stderr.write('Unhandled "%s" (%s) case in "appl" switchinline.\n'% \ - (obj.case, obj.get_all())) + sys.stderr.write('Unhandled "%s" case in "appl" switchinline.\n'% \ + i.case) return text else: for i in self.objects: |