summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-27 12:22:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-27 12:22:51 +0300
commit62b8eba573e259045c6706dddc944eb8ebc69998 (patch)
treedb61203a18db333dbe9cb5858bb5929faab11fe8 /src
parentdfa708a764d689a1e33ec96ccee2a510a82237c8 (diff)
downloadmplint-62b8eba573e259045c6706dddc944eb8ebc69998.tar.gz
mplint-62b8eba573e259045c6706dddc944eb8ebc69998.tar.bz2
mplint-62b8eba573e259045c6706dddc944eb8ebc69998.tar.xz
mplint-62b8eba573e259045c6706dddc944eb8ebc69998.zip
Add support for ignore some po files for some checks.
Diffstat (limited to 'src')
-rw-r--r--src/rulebase.h3
-rw-r--r--src/rules/po.cpp4
2 files changed, 7 insertions, 0 deletions
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)