diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-03 18:14:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-03 18:14:54 +0300 |
commit | b9f034639f3371187a95c9a6ed859948fcccd72a (patch) | |
tree | 95605e7f7514b1b2132b05503dd4303ef0586d9f /src/rules | |
parent | 00a41b3346a0e6aadad025a90b0089a01aa7df3e (diff) | |
download | mplint-b9f034639f3371187a95c9a6ed859948fcccd72a.tar.gz mplint-b9f034639f3371187a95c9a6ed859948fcccd72a.tar.bz2 mplint-b9f034639f3371187a95c9a6ed859948fcccd72a.tar.xz mplint-b9f034639f3371187a95c9a6ed859948fcccd72a.zip |
Add basic support for checking plurals in po files.
Diffstat (limited to 'src/rules')
-rw-r--r-- | src/rules/po.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rules/po.cpp b/src/rules/po.cpp index 54f34bc..f0d743f 100644 --- a/src/rules/po.cpp +++ b/src/rules/po.cpp @@ -142,7 +142,8 @@ parseLineRule(po) else print("Wrong msgId line. Missing last \"."); } - else if (findCutFirst(data, "msgstr \"")) + else if (findCutFirst(data, "msgstr \"") || + findCutFirst(data, "msgstr[0] \"")) { // msgStr start if (readId) readId = false; @@ -152,6 +153,11 @@ parseLineRule(po) else print("Wrong msgStr line. Missing last \"."); } + else if (findCutFirst(data, "msgid_plural \"") || + findCutFirst(data, "msgstr[")) + { + // nothing + } else if (findCutFirst(data, "\"")) { // line start with " if (readId) |