From 62b8eba573e259045c6706dddc944eb8ebc69998 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Jul 2014 12:22:22 +0300 Subject: Add support for ignore some po files for some checks. --- src/rulebase.h | 3 +++ src/rules/po.cpp | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/rulebase.h b/src/rulebase.h index 9a1fbc2..3263a8c 100644 --- a/src/rulebase.h +++ b/src/rulebase.h @@ -75,6 +75,9 @@ class RuleBase void printRaw(const std::string &text) const; + std::string getFile() const + { return file; } + protected: void addMask(const std::string &mask); diff --git a/src/rules/po.cpp b/src/rules/po.cpp index bb99e1e..0aab5c5 100644 --- a/src/rules/po.cpp +++ b/src/rules/po.cpp @@ -59,6 +59,10 @@ static void processMessage(RuleBase *const rule) const char cId = msgId[szId - 1]; if (cStr == ' ' && cId != ' ') rule->print("Useless space at end of translation line."); + std::string name = rule->getFile(); + if (findCutLast(name, "po/ar.po") || findCutLast(name, "po/fa.po")) + return; + if (cId == '.' || cId == ',' ||cId == '!' || cId == '?' || cId == '-') { if (cId != cStr) -- cgit v1.2.3-70-g09d2