diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-28 11:35:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-28 11:35:50 +0300 |
commit | 7c744c1c323cc678bddb02c574730a23b10a6da0 (patch) | |
tree | 0bbb5b207cd58f2839ffa6e97cb511191e5156f2 /src/rules | |
parent | 62b8eba573e259045c6706dddc944eb8ebc69998 (diff) | |
download | mplint-7c744c1c323cc678bddb02c574730a23b10a6da0.tar.gz mplint-7c744c1c323cc678bddb02c574730a23b10a6da0.tar.bz2 mplint-7c744c1c323cc678bddb02c574730a23b10a6da0.tar.xz mplint-7c744c1c323cc678bddb02c574730a23b10a6da0.zip |
Extend checking last char in po files.
Add checking for ### in po files.
Diffstat (limited to 'src/rules')
-rw-r--r-- | src/rules/po.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/rules/po.cpp b/src/rules/po.cpp index 0aab5c5..fadc650 100644 --- a/src/rules/po.cpp +++ b/src/rules/po.cpp @@ -63,11 +63,33 @@ static void processMessage(RuleBase *const rule) if (findCutLast(name, "po/ar.po") || findCutLast(name, "po/fa.po")) return; - if (cId == '.' || cId == ',' ||cId == '!' || cId == '?' || cId == '-') + if (cId == '.' || cId == ',' || cId == '!' || cId == '?' || cId == '-' + || cId == ':' || cId == ';' || cId == '+' || cId == '|' + || cId == ' ') { if (cId != cStr) rule->print("Wrong character at end of translation line."); } + if (msgId.find("###") != std::string::npos + && msgStr.find("###") == std::string::npos) + { + rule->print("Missing ### in translation."); + } +/* + if (msgId.find("\\n") != std::string::npos) + { + if (!findCutLast(name, "help/zh_CN.po")) + { + if (msgStr.find("\\n") == std::string::npos) + rule->print("Missing \\n in translation."); + } + } + else + { + if (msgStr.find("\\n") != std::string::npos) + rule->print("Useless \\n in translation."); + } +*/ } } |