[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2751: On second thought, simply ignoring a message element with no (vidalia/trunk/src/tools/ts2po)
Author: edmanm
Date: 2008-06-18 00:44:31 -0400 (Wed, 18 Jun 2008)
New Revision: 2751
Modified:
vidalia/trunk/src/tools/ts2po/ts2po.cpp
Log:
On second thought, simply ignoring a message element with no corresponding
source string is probably silly. We should error out instead if the .ts file
is invalid.
Modified: vidalia/trunk/src/tools/ts2po/ts2po.cpp
===================================================================
--- vidalia/trunk/src/tools/ts2po/ts2po.cpp 2008-06-18 04:30:36 UTC (rev 2750)
+++ vidalia/trunk/src/tools/ts2po/ts2po.cpp 2008-06-18 04:44:31 UTC (rev 2751)
@@ -81,8 +81,11 @@
while (!msg.isNull()) {
/* Extract the <source> tags */
source = msg.firstChildElement(TS_ELEMENT_SOURCE);
- if (source.isNull())
- continue; /* Empty source string. Ignore. */
+ if (source.isNull()) {
+ *errorMessage = QString("message element with no source string "
+ "(line %1)").arg(msg.lineNumber());
+ return -1;
+ }
msgid = source.text();
msgid.replace("\r", "");
msgid.replace("\n", "\"\n\"");