@@ -64,14 +64,18 @@ func _slipstream_and_clean() -> void:
6464
6565
6666func _wipe_old_translations () -> void :
67- for lang in DirAccess .get_directories_at ("res://i18n" ):
68- for file in DirAccess .get_files_at ("res://i18n/%s " % [lang ]):
67+ var global_base_dir := ProjectSettings .globalize_path ("res://i18n" )
68+
69+ for lang in DirAccess .get_directories_at (global_base_dir ):
70+ if lang == "images" :
71+ continue
72+ for file in DirAccess .get_files_at ("%s /%s " % [global_base_dir , lang ]):
6973 if file .get_extension () != "po" :
7074 continue
7175
7276 if not file .get_basename () in ["n_application" , "course" , "supplementary" ]:
73- DirAccess .remove_absolute ("res://i18n/ %s /%s " % [lang , file ])
74- DirAccess .rename_absolute ("res://i18n/ %s /n_application.po" % lang , "res://i18n/ %s /application.po" % lang )
77+ DirAccess .remove_absolute ("%s / %s /%s " % [global_base_dir , lang , file ])
78+ DirAccess .rename_absolute ("%s / %s /n_application.po" % [ global_base_dir , lang ] , "%s / %s /application.po" % [ global_base_dir , lang ] )
7579
7680
7781func _build_translated_lessons () -> void :
@@ -123,6 +127,9 @@ func _slipstream_existing_translations() -> void:
123127 var global_supp := ProjectSettings .globalize_path (SUPPLEMENTARY_POT_PATH )
124128
125129 for lang in DirAccess .get_directories_at (global_base_dir ):
130+ if lang == "images" :
131+ continue
132+
126133 print ("Processing %s ..." % [lang ])
127134 await get_tree ().process_frame
128135 await get_tree ().process_frame
0 commit comments