Skip to content

Commit 857dbcd

Browse files
committedFeb 7, 2021
Reduce empty translation error to infostream
Fixes #10905
1 parent 3a8c371 commit 857dbcd

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed
 

Diff for: ‎src/translation.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,13 @@ void Translations::loadTranslation(const std::string &data)
144144
}
145145

146146
std::wstring oword1 = word1.str(), oword2 = word2.str();
147-
if (oword2.empty()) {
148-
oword2 = oword1;
149-
errorstream << "Ignoring empty translation for \""
150-
<< wide_to_utf8(oword1) << "\"" << std::endl;
147+
if (!oword2.empty()) {
148+
std::wstring translation_index = textdomain + L"|";
149+
translation_index.append(oword1);
150+
m_translations[translation_index] = oword2;
151+
} else {
152+
infostream << "Ignoring empty translation for \""
153+
<< wide_to_utf8(oword1) << "\"" << std::endl;
151154
}
152-
153-
std::wstring translation_index = textdomain + L"|";
154-
translation_index.append(oword1);
155-
m_translations[translation_index] = oword2;
156155
}
157156
}

0 commit comments

Comments
 (0)