diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-10-17 10:30:17 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-10-17 10:30:17 +0800 |
commit | f61fe2799cbf0063370ad1423d9b10f63d8905e6 (patch) | |
tree | 70d1885114332c8feef9859e72e29ffa90220dfe | |
parent | 04692d83cb8f61002f18ea1d954df8c558ee84f7 (diff) | |
download | redot-engine-f61fe2799cbf0063370ad1423d9b10f63d8905e6.tar.gz |
Don't pseudolocalize empty strings
-rw-r--r-- | core/string/translation_domain.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/string/translation_domain.cpp b/core/string/translation_domain.cpp index 6a5e1b2af8..53b9ce8379 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) { |