From e5fd34aa918d0062119fef0fbc22355aa06580ca Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:50:14 +0300 Subject: [PATCH] Update Keychain --- addons/README.md | 2 +- addons/keychain/Keychain.gd | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/README.md b/addons/README.md index 7605b0eb4..994d23949 100644 --- a/addons/README.md +++ b/addons/README.md @@ -9,7 +9,7 @@ ## Keychain - Upstream: https://github.com/Orama-Interactive/Keychain -- Version: [8860f66e880ff2fe876d45e681751fd6c6946558](https://github.com/Orama-Interactive/Keychain/commit/8860f66e880ff2fe876d45e681751fd6c6946558) +- Version: [34bd83ab13f32c932479db8be4bb8c8b7e594fa2](https://github.com/Orama-Interactive/Keychain/commit/34bd83ab13f32c932479db8be4bb8c8b7e594fa2) - License: [MIT](https://github.com/Orama-Interactive/Keychain/blob/main/LICENSE) ## gdgifexporter diff --git a/addons/keychain/Keychain.gd b/addons/keychain/Keychain.gd index fc0594180..b523a75b1 100644 --- a/addons/keychain/Keychain.gd +++ b/addons/keychain/Keychain.gd @@ -107,7 +107,10 @@ func action_erase_events(action: StringName) -> void: func load_translation(locale: String) -> void: - var translation = load("res://addons/keychain/translations".path_join(locale + ".po")) + var translation_file_path := "res://addons/keychain/translations".path_join(locale + ".po") + if not ResourceLoader.exists(translation_file_path, "Translation"): + return + var translation := load(translation_file_path) if is_instance_valid(translation) and translation is Translation: TranslationServer.add_translation(translation)