diff options
Diffstat (limited to 'genFAQ.py')
-rwxr-xr-x | genFAQ.py | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -16,10 +16,18 @@ This page is autogenerated. Do not edit """ def getString(strid,lang): + ostr="" if strid in strres[lang]: - return strres[lang][strid] + ostr=strres[lang][strid] else: - return strres["default"][strid] + ostr=strres["default"][strid] + + ostr = ostr.replace("<","<") + ostr = ostr.replace(">",">") + ostr = ostr.replace("\\\"","\"") + ostr = ostr.replace("\\'","'") + ostr = ostr.replace("\\n","<p>") + return ostr def genPage(faqdom,lang): out ="" @@ -75,6 +83,7 @@ def main(): for directory in os.listdir("res"): if directory.startswith("values-"): lang = directory.split("-",1)[1] + print lang loadstrres("res/values-%s/strings.xml" % lang,lang) langdir= "%s/%s" %(faqpath,lang) @@ -87,7 +96,6 @@ def main(): if not os.path.exists(langdir): os.mkdir(langdir) - print lang faq= genPage(faqdom,lang) open("%s/FAQ.wiki" % langdir,"w").write(faq.encode("utf-8")) |