From f61fe2799cbf0063370ad1423d9b10f63d8905e6 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 17 Oct 2024 10:30:17 +0800 Subject: [PATCH] Don't pseudolocalize empty strings --- core/string/translation_domain.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/string/translation_domain.cpp b/core/string/translation_domain.cpp index 6a5e1b2af852..53b9ce837961 100644 --- a/core/string/translation_domain.cpp +++ b/core/string/translation_domain.cpp @@ -389,6 +389,10 @@ void TranslationDomain::set_pseudolocalization_suffix(const String &p_suffix) { } StringName TranslationDomain::pseudolocalize(const StringName &p_message) const { + if (p_message.is_empty()) { + return p_message; + } + String message = p_message; int length = message.length(); if (pseudolocalization.override_enabled) {