diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-10 22:25:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-10 22:25:59 +0300 |
commit | 999cd8f31c6c2d01ffb216d95ea19e8a50a72234 (patch) | |
tree | ef7858a8b7dc6af5fba10577a3fb8a63cffe6094 /src | |
parent | 78e79af6fd2a6bb5400b6a7aa82fba2df9c234e9 (diff) | |
download | mplint-999cd8f31c6c2d01ffb216d95ea19e8a50a72234.tar.gz mplint-999cd8f31c6c2d01ffb216d95ea19e8a50a72234.tar.bz2 mplint-999cd8f31c6c2d01ffb216d95ea19e8a50a72234.tar.xz mplint-999cd8f31c6c2d01ffb216d95ea19e8a50a72234.zip |
in po rule not check fuzzy translations.
Diffstat (limited to 'src')
-rw-r--r-- | src/rules/po.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rules/po.cpp b/src/rules/po.cpp index fadc650..7725177 100644 --- a/src/rules/po.cpp +++ b/src/rules/po.cpp @@ -24,6 +24,7 @@ registerRuleExt(po, "010", "(.+)[.](po)") bool readId(false); bool readStr(false); +bool skipOneCheck(false); std::string msgId; std::string msgStr; @@ -34,6 +35,11 @@ static void processMessage(RuleBase *const rule) readId = false; readStr = false; + if (skipOneCheck) + { + skipOneCheck = false; + return; + } // skip not translated lines if (msgStr.empty()) return; @@ -97,6 +103,7 @@ startRule(po) { readId = false; readStr = false; + skipOneCheck = false; msgId = std::string(); msgStr = std::string(); } @@ -109,7 +116,11 @@ endRule(po) parseLineRule(po) { - if (findCutFirst(data, "msgid \"")) + if (strStartWith(data, "#, fuzzy")) + { + skipOneCheck = true; + } + else if (findCutFirst(data, "msgid \"")) { // msgId start if (readStr) { |