From 91beceb628c99c8c351d844a164b11e40a50d0f9 Mon Sep 17 00:00:00 2001
From: Arne Schwabe <arne@rfc2549.org>
Date: Tue, 20 Aug 2013 13:54:46 +0200
Subject: More debug for broken format string in translations

---
 misc/genFAQ.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'misc')

diff --git a/misc/genFAQ.py b/misc/genFAQ.py
index ccd3e589..713d71f1 100755
--- a/misc/genFAQ.py
+++ b/misc/genFAQ.py
@@ -99,6 +99,20 @@ def main():
             faq= genPage(faqdom,lang)
             open("%s/FAQ.wiki" % langdir,"w").write(faq.encode("utf-8"))
 
+            checkFormatString(lang)
 
+def checkFormatString(lang):
+    for strid in strres["default"]:
+        ostr = getString(strid,"default")
+        tstr = getString(strid,lang)
+
+
+        for f in ["%s", "%d", "%f"] + ["%%%d$s" % d for d in range(0,10)] + ["%%%d$d" % d for d in range(0,10)]:
+            ino = ostr.find(f)==-1
+            int = tstr.find(f)==-1
+
+            if ino != int:
+                print "Mismatch",strid,f,ostr,tstr
+                
 if __name__=="__main__":
     main()
-- 
cgit v1.2.3