summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-04 20:23:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-04 20:23:22 +0300
commit971e3ef054af935eb2a0b8b11c7fb53a86dd00c7 (patch)
tree8ef22d1ad6bba4d0368bc6b73bd7caecacbf491a /src
parentb37c6febad44ba62bb089eea35a1ae71104a9334 (diff)
downloadmplint-971e3ef054af935eb2a0b8b11c7fb53a86dd00c7.tar.gz
mplint-971e3ef054af935eb2a0b8b11c7fb53a86dd00c7.tar.bz2
mplint-971e3ef054af935eb2a0b8b11c7fb53a86dd00c7.tar.xz
mplint-971e3ef054af935eb2a0b8b11c7fb53a86dd00c7.zip
Add check in po files for start and end quotes.
Diffstat (limited to 'src')
-rw-r--r--src/rules/po.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rules/po.cpp b/src/rules/po.cpp
index b8390e4..ab40041 100644
--- a/src/rules/po.cpp
+++ b/src/rules/po.cpp
@@ -121,6 +121,18 @@ static void processMessage(RuleBase *const rule)
isError = true;
}
}
+ if (strStartWith(msgId, "\\\"") && strEndWith(msgId, "\\\"") &&
+ !strStartWith(msgStr, "\\\"") && !strEndWith(msgStr, "\\\""))
+ {
+ rule->print("Missing \" at start and at end of translated line.");
+ isError = true;
+ }
+ if (strStartWith(msgStr, "\\\"") && strEndWith(msgStr, "\\\"") &&
+ !strStartWith(msgId, "\\\"") && !strEndWith(msgId, "\\\""))
+ {
+ rule->print("Extra \" at start and at end of translated line.");
+ isError = true;
+ }
if (msgId.find("###") != std::string::npos &&
msgStr.find("###") == std::string::npos)
{