diff options
-rw-r--r-- | core/string/translation.cpp | 6 | ||||
-rwxr-xr-x | doc/tools/make_rst.py | 18 | ||||
-rw-r--r-- | editor/input_event_configuration_dialog.cpp | 6 | ||||
-rw-r--r-- | platform/windows/detect.py | 2 |
4 files changed, 18 insertions, 14 deletions
diff --git a/core/string/translation.cpp b/core/string/translation.cpp index a443ed308d..8fcf2b24b5 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -518,8 +518,12 @@ String TranslationServer::get_country_name(const String &p_country) const { } void TranslationServer::set_locale(const String &p_locale) { - locale = standardize_locale(p_locale); + String new_locale = standardize_locale(p_locale); + if (locale == new_locale) { + return; + } + locale = new_locale; ResourceLoader::reload_translation_remaps(); if (OS::get_singleton()->get_main_loop()) { diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 6a99bfbe06..89308b1ee1 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -1361,7 +1361,7 @@ def make_enum(t: str, is_bitfield: bool, state: State) -> str: if is_bitfield: if not state.classes[c].enums[e].is_bitfield: print_error(f'{state.current_class}.xml: Enum "{t}" is not bitfield.', state) - return f"|bitfield|\<:ref:`{e}<enum_{c}_{e}>`\>" + return f"|bitfield|\\<:ref:`{e}<enum_{c}_{e}>`\\>" else: return f":ref:`{e}<enum_{c}_{e}>`" @@ -2082,9 +2082,9 @@ def format_text_block( post_text = text[endurl_pos + 6 :] if pre_text and pre_text[-1] not in MARKUP_ALLOWED_PRECEDENT: - pre_text += "\ " + pre_text += "\\ " if post_text and post_text[0] not in MARKUP_ALLOWED_SUBSEQUENT: - post_text = "\ " + post_text + post_text = "\\ " + post_text text = pre_text + tag_text + post_text pos = len(pre_text) + len(tag_text) @@ -2162,9 +2162,9 @@ def format_text_block( # Properly escape things like `[Node]s` if escape_pre and pre_text and pre_text[-1] not in MARKUP_ALLOWED_PRECEDENT: - pre_text += "\ " + pre_text += "\\ " if escape_post and post_text and post_text[0] not in MARKUP_ALLOWED_SUBSEQUENT: - post_text = "\ " + post_text + post_text = "\\ " + post_text next_brac_pos = post_text.find("[", 0) iter_pos = 0 @@ -2172,7 +2172,7 @@ def format_text_block( iter_pos = post_text.find("*", iter_pos, next_brac_pos) if iter_pos == -1: break - post_text = f"{post_text[:iter_pos]}\*{post_text[iter_pos + 1 :]}" + post_text = f"{post_text[:iter_pos]}\\*{post_text[iter_pos + 1 :]}" iter_pos += 2 iter_pos = 0 @@ -2181,7 +2181,7 @@ def format_text_block( if iter_pos == -1: break if not post_text[iter_pos + 1].isalnum(): # don't escape within a snake_case word - post_text = f"{post_text[:iter_pos]}\_{post_text[iter_pos + 1 :]}" + post_text = f"{post_text[:iter_pos]}\\_{post_text[iter_pos + 1 :]}" iter_pos += 2 else: iter_pos += 1 @@ -2222,7 +2222,7 @@ def escape_rst(text: str, until_pos: int = -1) -> str: pos = text.find("*", pos, until_pos) if pos == -1: break - text = f"{text[:pos]}\*{text[pos + 1 :]}" + text = f"{text[:pos]}\\*{text[pos + 1 :]}" pos += 2 # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink @@ -2232,7 +2232,7 @@ def escape_rst(text: str, until_pos: int = -1) -> str: if pos == -1: break if not text[pos + 1].isalnum(): # don't escape within a snake_case word - text = f"{text[:pos]}\_{text[pos + 1 :]}" + text = f"{text[:pos]}\\_{text[pos + 1 :]}" pos += 2 else: pos += 1 diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp index 724ad9370b..a0d2662045 100644 --- a/editor/input_event_configuration_dialog.cpp +++ b/editor/input_event_configuration_dialog.cpp @@ -553,9 +553,8 @@ void InputEventConfigurationDialog::_notification(int p_what) { event_listener->grab_focus(); } break; - case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - input_list_search->set_right_icon(input_list_search->get_editor_theme_icon(SNAME("Search"))); + input_list_search->set_right_icon(get_editor_theme_icon(SNAME("Search"))); key_mode->set_item_icon(KEYMODE_KEYCODE, get_editor_theme_icon(SNAME("Keyboard"))); key_mode->set_item_icon(KEYMODE_PHY_KEYCODE, get_editor_theme_icon(SNAME("KeyboardPhysical"))); @@ -613,12 +612,13 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION; set_title(TTR("Event Configuration")); - set_min_size(Size2i(550 * EDSCALE, 0)); // Min width + set_min_size(Size2i(550, 0) * EDSCALE); VBoxContainer *main_vbox = memnew(VBoxContainer); add_child(main_vbox); event_as_text = memnew(Label); + event_as_text->set_custom_minimum_size(Size2(500, 0) * EDSCALE); event_as_text->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); event_as_text->add_theme_font_size_override("font_size", 18 * EDSCALE); diff --git a/platform/windows/detect.py b/platform/windows/detect.py index bdacdbb9ba..dbdb13697b 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -481,7 +481,7 @@ def configure_msvc(env, vcvars_msvc_config): env["BUILDERS"]["ProgramOriginal"] = env["BUILDERS"]["Program"] env["BUILDERS"]["Program"] = methods.precious_program - env.Append(LINKFLAGS=["/NATVIS:platform\windows\godot.natvis"]) + env.Append(LINKFLAGS=["/NATVIS:platform\\windows\\godot.natvis"]) env.AppendUnique(LINKFLAGS=["/STACK:" + str(STACK_SIZE)]) |