summaryrefslogtreecommitdiff
path: root/src/utils/translation
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/translation')
-rw-r--r--src/utils/translation/poparser.cpp4
-rw-r--r--src/utils/translation/translationmanager.cpp11
2 files changed, 6 insertions, 9 deletions
diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp
index 55d4e01e2..b2034903d 100644
--- a/src/utils/translation/poparser.cpp
+++ b/src/utils/translation/poparser.cpp
@@ -133,7 +133,7 @@ bool PoParser::readMsgId()
if (mReadingStr)
return false;
- const std::string msgId1 = "msgid \"";
+ const std::string msgId1("msgid \"");
// check if in reading process
if (mReadingId)
@@ -175,7 +175,7 @@ bool PoParser::readMsgId()
bool PoParser::readMsgStr()
{
- const std::string msgStr1 = "msgstr \"";
+ const std::string msgStr1("msgstr \"");
// check if in reading process
if (mReadingStr)
diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp
index 0a5e7bca5..6036ddeab 100644
--- a/src/utils/translation/translationmanager.cpp
+++ b/src/utils/translation/translationmanager.cpp
@@ -109,14 +109,11 @@ bool TranslationManager::translateFile(const std::string &fileName,
const size_t pos2 = str.find(">>", pos1 + 2);
if (pos2 == std::string::npos)
break;
- const std::string key = str.substr(pos1 + 2, pos2 - pos1 - 2);
- const std::string key2 = "<<" + str.substr(
- pos1 + 2, pos2 - pos1 - 2) + ">>";
- const std::string val = dict->getStr(key);
-
-// logger->log("key:" + key);
+ const std::string key(str.substr(pos1 + 2, pos2 - pos1 - 2));
+ const std::string key2("<<" + str.substr(
+ pos1 + 2, pos2 - pos1 - 2) + ">>");
+ const std::string val(dict->getStr(key));
replaceAll(str, key2, val);
-
oldPos1 = pos1;
}