Skip to content

Commit c94ff31

Browse files
committed
fix: don't add translated string if source is empty
1 parent bd0e6b1 commit c94ff31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/qttsdocument.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ void QtTsDocument::addMessage(pugi::xml_node contextChild, const QString &contex
125125
void QtTsDocument::addMessage(const QString &context, const QString &fileName, const QString &source,
126126
const QString &translation, const QString &comment)
127127
{
128+
if (source.isEmpty()) {
129+
return;
130+
}
128131
LOG(context, fileName, source, translation, comment);
129132
if (fileName.isEmpty() || source.isEmpty() || context.isEmpty()) {
130133
spdlog::error(R"({}: Location or context or source is empty)", FUNCTION_NAME);

0 commit comments

Comments
 (0)