File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,10 @@ func register_global_classes_from_array(new_global_classes: Array) -> void:
510510# file should have been created in Godot already: When you improt a CSV, such
511511# a file will be created for you.
512512func add_translation_from_resource (resource_path : String ) -> void :
513+ if not File .new ().file_exists (resource_path ):
514+ ModLoaderUtils .log_fatal ("Tried to load a translation resource from a file that doesn't exist. The invalid path was: %s " % [resource_path ], LOG_NAME )
515+ return
516+
513517 var translation_object : Translation = load (resource_path )
514518 TranslationServer .add_translation (translation_object )
515519 ModLoaderUtils .log_info ("Added Translation from Resource -> %s " % resource_path , LOG_NAME )
You can’t perform that action at this time.
0 commit comments