summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2024-10-17 21:27:30 -0700
committerGitHub <noreply@github.com>2024-10-17 21:27:30 -0700
commit4631a617e5ab4ec5cc51dbc43609b269a43059d9 (patch)
treee772e4c056140412243fc140b8a970bb588c2cba
parent14fc9a545ce5827db05454a6fd732dc900468e58 (diff)
parentf61fe2799cbf0063370ad1423d9b10f63d8905e6 (diff)
downloadredot-engine-4631a617e5ab4ec5cc51dbc43609b269a43059d9.tar.gz
Merge pull request #98255 from timothyqiu/form-is-indeed-emptiness
Don't pseudolocalize empty strings
-rw-r--r--core/string/translation_domain.cpp4
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) {