Skip to content

Commit

Permalink
fix: don't add translated string if source is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Montel committed Oct 24, 2024
1 parent bd0e6b1 commit c94ff31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/qttsdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ void QtTsDocument::addMessage(pugi::xml_node contextChild, const QString &contex
void QtTsDocument::addMessage(const QString &context, const QString &fileName, const QString &source,
const QString &translation, const QString &comment)
{
if (source.isEmpty()) {
return;
}
LOG(context, fileName, source, translation, comment);
if (fileName.isEmpty() || source.isEmpty() || context.isEmpty()) {
spdlog::error(R"({}: Location or context or source is empty)", FUNCTION_NAME);
Expand Down

0 comments on commit c94ff31

Please sign in to comment.