diff options
author | rubenwardy <rw@rubenwardy.com> | 2021-02-07 15:28:15 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2021-02-07 16:03:48 +0000 |
commit | 857dbcd5728e2f18cdbb478d85f5861d5f0c7123 (patch) | |
tree | 17fc834032208b627e16842669981a3284160775 /src/translation.cpp | |
parent | 3a8c37181a9bf9624f3243e8e884f12ae7692609 (diff) | |
download | minetest-857dbcd5728e2f18cdbb478d85f5861d5f0c7123.tar.gz minetest-857dbcd5728e2f18cdbb478d85f5861d5f0c7123.tar.bz2 minetest-857dbcd5728e2f18cdbb478d85f5861d5f0c7123.zip |
Reduce empty translation error to infostream
Fixes #10905
Diffstat (limited to 'src/translation.cpp')
-rw-r--r-- | src/translation.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/translation.cpp b/src/translation.cpp index 82e813a5d..55c958fa2 100644 --- a/src/translation.cpp +++ b/src/translation.cpp @@ -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; } } |