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)