summaryrefslogtreecommitdiff
path: root/src/utils/translation
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-21 22:44:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-21 22:45:15 +0300
commit42f47e483da19079a937c4801ca94bd62d8dc970 (patch)
tree56dc96737e01e04d54357ce7118de3a1f000c516 /src/utils/translation
parent2d8b9246c8003f1d32ba396bc19cc11bc5a595b2 (diff)
downloadplus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.gz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.bz2
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.xz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.zip
Remove useless else.
Diffstat (limited to 'src/utils/translation')
-rw-r--r--src/utils/translation/poparser.cpp48
1 files changed, 23 insertions, 25 deletions
diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp
index 1050cc82e..399980a21 100644
--- a/src/utils/translation/poparser.cpp
+++ b/src/utils/translation/poparser.cpp
@@ -160,35 +160,33 @@ bool PoParser::readMsgId()
mReadingId = false;
return false;
}
- else
+
+ // check line start from msgid "
+ if (strStartWith(mLine, msgId1))
{
- // check line start from msgid "
- if (strStartWith(mLine, msgId1))
- {
- if (!mSkipId)
- { // translation not fuzzed and can be processed
- mReadingId = true;
- const size_t msgId1Size = msgId1.size();
- // reading text from: msgid "text"
- mMsgId.append(mLine.substr(msgId1Size,
- mLine.size() - 1 - msgId1Size));
- }
- else
- { // skipped fuzzed translation. reset skip flag
- mSkipId = false;
- }
- mLine.clear();
- return true;
+ if (!mSkipId)
+ { // translation not fuzzed and can be processed
+ mReadingId = true;
+ const size_t msgId1Size = msgId1.size();
+ // reading text from: msgid "text"
+ mMsgId.append(mLine.substr(msgId1Size,
+ mLine.size() - 1 - msgId1Size));
}
- else if (mLine == "#, fuzzy")
- { // check for fuzzy translation
- mSkipId = true;
- mLine.clear();
- return true;
+ else
+ { // skipped fuzzed translation. reset skip flag
+ mSkipId = false;
}
- // stop reading if we don't read msgid before
- return mMsgId.empty();
+ mLine.clear();
+ return true;
+ }
+ else if (mLine == "#, fuzzy")
+ { // check for fuzzy translation
+ mSkipId = true;
+ mLine.clear();
+ return true;
}
+ // stop reading if we don't read msgid before
+ return mMsgId.empty();
}
bool PoParser::readMsgStr()