summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgenFAQ.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/genFAQ.py b/genFAQ.py
index 1815f7a2..0556c1bc 100755
--- a/genFAQ.py
+++ b/genFAQ.py
@@ -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("&lt;","<")
+ ostr = ostr.replace("&gt;",">")
+ 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"))