Skip to content

Commit

Permalink
Reduce empty translation error to infostream
Browse files Browse the repository at this point in the history
Fixes #10905
  • Loading branch information
rubenwardy committed Feb 7, 2021
1 parent 3a8c371 commit 857dbcd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/translation.cpp
Expand Up @@ -144,14 +144,13 @@ void Translations::loadTranslation(const std::string &data)
}

std::wstring oword1 = word1.str(), oword2 = word2.str();
if (oword2.empty()) {
oword2 = oword1;
errorstream << "Ignoring empty translation for \""
<< wide_to_utf8(oword1) << "\"" << std::endl;
if (!oword2.empty()) {
std::wstring translation_index = textdomain + L"|";
translation_index.append(oword1);
m_translations[translation_index] = oword2;
} else {
infostream << "Ignoring empty translation for \""
<< wide_to_utf8(oword1) << "\"" << std::endl;
}

std::wstring translation_index = textdomain + L"|";
translation_index.append(oword1);
m_translations[translation_index] = oword2;
}
}

0 comments on commit 857dbcd

Please sign in to comment.