summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-10 10:13:12 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-18 17:25:07 +0200
commitd0b86adcfc038708330f74d4a4d1079f86123e37 (patch)
treecb4d83376fd70fe8373c80381e18a42555db6023
parent1e9b38a969b8008b6719627c7c2dd61240eccd91 (diff)
More languages. feature/gsoc2011_wizards
-rwxr-xr-xhelpcontent2/help-to-wiki.py16
-rwxr-xr-xhelpcontent2/to-wiki/wikiconv2.py5
2 files changed, 10 insertions, 11 deletions
diff --git a/helpcontent2/help-to-wiki.py b/helpcontent2/help-to-wiki.py
index ca3b774d93..36281ed08a 100755
--- a/helpcontent2/help-to-wiki.py
+++ b/helpcontent2/help-to-wiki.py
@@ -10,7 +10,9 @@ import wikiconv2
def usage():
print '''
-help-to-wiki.py - converts .xhp files into a wiki
+help-to-wiki.py [params] [path to l10n]
+
+Converts .xhp files into a wiki
-h, --help - this help
-n, --no-translations - generate only English pages
@@ -52,15 +54,9 @@ def create_wiki_dirs():
pass
# Langs to handle
-# [16:26:45] <kendy> sophi, timar: Obviously, I am testing with Czech ;-)
-# [16:27:05] <timar> kendy: HUngarian :)
-# [16:27:25] <kendy> timar: :-)
-# [16:27:26] <timar> kendy: Slovenian for Martin
-# [16:28:00] <timar> kendy: and German, Italian, French, Spanish (with large user base)
-# [16:28:13] <sophi> kendy: catalan
-# [16:28:38] <sophi> kendy: also japanese and russian
-# [16:29:48] <sophi> kendy: ans I would say vi too, so you have all kind of script/language and good communities behind ;)
-langs = ['', 'ca', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'pt', 'pt-BR', 'ru', 'sl', 'vi']
+langs = ['', 'ca', 'cs', 'da', 'de', 'es', 'fr', 'hu', \
+ 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'pt-BR', 'ru', \
+ 'sl', 'sv', 'vi', 'zh-CN', 'zh-TW' ]
# Argument handling
try:
diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py
index 6a3d766488..d4b3a5e235 100755
--- a/helpcontent2/to-wiki/wikiconv2.py
+++ b/helpcontent2/to-wiki/wikiconv2.py
@@ -194,7 +194,10 @@ def load_localization_data(sdf_file):
# source/text/shared/explorer/database/02010100.xhp#hd_id3149233
# otherwise we are getting duplicates
key = '%s#%s'% (spl[1].replace('\\', '/'), spl[4])
- localization_data[key] = spl[10]
+ try:
+ localization_data[key] = spl[10]
+ except:
+ sys.stderr.write('Warning: Ignored line "%s"\n'% line.encode('utf-8'))
file.close()
return True