Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editor pseudolocalization support. #96105

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ opts.Add(BoolVariable("scu_build", "Use single compilation unit build", False))
opts.Add("scu_limit", "Max includes per SCU file when using scu_build (determines RAM use)", "0")
opts.Add(BoolVariable("engine_update_check", "Enable engine update checks in the Project Manager", True))
opts.Add(BoolVariable("steamapi", "Enable minimal SteamAPI integration for usage time tracking (editor only)", False))
opts.Add(BoolVariable("editor_pseudolocalization", "Enable editor pseudolocalization support", False))

# Thirdparty libraries
opts.Add(BoolVariable("builtin_brotli", "Use the built-in Brotli library", True))
Expand Down Expand Up @@ -997,6 +998,8 @@ if env["minizip"]:
env.Append(CPPDEFINES=["MINIZIP_ENABLED"])
if env["brotli"]:
env.Append(CPPDEFINES=["BROTLI_ENABLED"])
if env["editor_pseudolocalization"]:
env.Append(CPPDEFINES=["ENABLE_EDITOR_PSEUDOLOCALIZATION"])

if not env["verbose"]:
methods.no_verbose(env)
Expand Down
6 changes: 6 additions & 0 deletions core/string/translation_server.compat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@

#ifndef DISABLE_DEPRECATED

String TranslationServer::_get_tool_locale_bind_compat_96105() {
return get_tool_locale();
}

void TranslationServer::_bind_compatibility_methods() {
ClassDB::bind_compatibility_method(D_METHOD("translate", "message", "context"), &TranslationServer::translate, DEFVAL(""));
ClassDB::bind_compatibility_method(D_METHOD("translate_plural", "message", "plural_message", "n", "context"), &TranslationServer::translate_plural, DEFVAL(""));

ClassDB::bind_compatibility_method(D_METHOD("get_tool_locale"), &TranslationServer::_get_tool_locale_bind_compat_96105);
}

#endif
Loading
Loading