[rkward-cvs] [rkward/releases/0.6.3] rkward/misc: Fix some message lookup failures, due to insufficient normalization of markup.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Feb 5 20:18:57 UTC 2015


Git commit adf61faa15d70b445e70d08e7e5f6f6fcafd118f by Thomas Friedrichsmeier.
Committed on 05/02/2015 at 20:16.
Pushed by tfry into branch 'releases/0.6.3'.

Fix some message lookup failures, due to insufficient normalization of markup.

M  +5    -0    rkward/misc/xmlhelper.cpp

http://commits.kde.org/rkward/adf61faa15d70b445e70d08e7e5f6f6fcafd118f

diff --git a/rkward/misc/xmlhelper.cpp b/rkward/misc/xmlhelper.cpp
index bb60f80..d6fd815 100644
--- a/rkward/misc/xmlhelper.cpp
+++ b/rkward/misc/xmlhelper.cpp
@@ -344,6 +344,11 @@ QString XMLHelper::i18nElementText (const QDomElement &element, bool with_paragr
 		QString para = paras[i].simplified ();
 		if (!para.isEmpty ()) {
 			if (!ret.isEmpty ()) ret.append ("\n");
+			// Oh, crap. Fix up after some differences between python message extraction and qt's.
+			para.replace ("<li> <", "<li><");
+			para.replace ("br> <", "br><");
+			para.replace ("> </li>", "></li>");
+			para.replace ("&", "&");
 			QString text = context.isNull () ? catalog->translate (para) : catalog->translate (context, para);
 			if (with_paragraphs) ret += "<p>" + text + "</p>";
 			else ret += text;


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rkward-cvs mailing list
rkward-cvs at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-cvs


More information about the rkward-tracker mailing list