summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAngad Kambli <angadkambli@gmail.com>2021-08-08 20:37:57 +0530
committerAngad Kambli <angadkambli@gmail.com>2021-08-08 20:37:57 +0530
commite79dde1cbb0e9a97c17bb5d535809efbcee1d965 (patch)
treeab9ab5c9a73820c096936d452e36cc6e189bbbda /editor
parent855c7c7414a2f29cd420e8dd654a4630226bcd50 (diff)
add pseudolocalization to Godot
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_settings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 0667d7116f..34d167e54c 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -374,6 +374,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/display_scale", 0);
// Display what the Auto display scale setting effectively corresponds to.
float scale = get_auto_display_scale();
+
+ _initial_set("interface/editor/enable_debugging_pseudolocalization", false);
+ set_restart_if_changed("interface/editor/enable_debugging_pseudolocalization", true);
+ // Use pseudolocalization in editor.
+
hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(scale * 100)), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/custom_display_scale", 1.0f);
hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
@@ -955,11 +960,11 @@ fail:
}
void EditorSettings::setup_language() {
+ TranslationServer::get_singleton()->set_editor_pseudolocalization(get("interface/editor/enable_debugging_pseudolocalization"));
String lang = get("interface/editor/editor_language");
if (lang == "en") {
return; // Default, nothing to do.
}
-
// Load editor translation for configured/detected locale.
EditorTranslationList *etl = _editor_translations;
while (etl->data) {