From 3775bd00e1c620e3faa02869f75264abd7037894 Mon Sep 17 00:00:00 2001 From: Davide Di Staso Date: Sat, 11 Oct 2025 13:21:28 +0200 Subject: [PATCH] Fixes issue with "none" locale --- .../autoload/shutter_window/shutter_window.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/screenshots/autoload/shutter_window/shutter_window.gd b/addons/screenshots/autoload/shutter_window/shutter_window.gd index ff0a92d..0b54ccb 100644 --- a/addons/screenshots/autoload/shutter_window/shutter_window.gd +++ b/addons/screenshots/autoload/shutter_window/shutter_window.gd @@ -72,10 +72,11 @@ func take_burst() -> void: await get_tree().create_timer(0.01).timeout for locale in locales: - if not locale == "none": - TranslationServer.set_locale(locale) + var locale_to_set = locale + if locale == "none": + locale_to_set = previous_locale + TranslationServer.set_locale(locale_to_set) await get_tree().process_frame - save_image() TranslationServer.set_locale(previous_locale) @@ -85,6 +86,7 @@ func take_burst() -> void: tree.paused = game_was_paused visible = shutter_was_visible burst_ended.emit() + print_rich("[color=green][Screenshots] Done! (%s)[/color]") position = old_position func save_image() -> void: @@ -143,8 +145,6 @@ func save_image() -> void: print_rich("[Screenshots] Saved at: [url=%s]%s[/url]" % [ProjectSettings.globalize_path(file_path.get_base_dir()), file_path]) - print_rich("[color=green][Screenshots] Done! (%s)[/color]" % timestamp) - func get_unique_filepath(base_path: String) -> String: if not FileAccess.file_exists(base_path): return base_path