summaryrefslogtreecommitdiffstats
path: root/editor/import/resource_importer_csv_translation.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:08 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:59 -0500
commit3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d (patch)
treec7341bd56c977259578b127886c9a88eeef11820 /editor/import/resource_importer_csv_translation.cpp
parent5094c2a5f7d506b0e685120f14d1df42e1e9d495 (diff)
parentcb411fa960f0b7fdbd97dcdb4c90f9346360ee0e (diff)
downloadredot-engine-3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d.tar.gz
Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e
Diffstat (limited to 'editor/import/resource_importer_csv_translation.cpp')
-rw-r--r--editor/import/resource_importer_csv_translation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index c6ba0653ae..70d92e4d2f 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -74,7 +74,7 @@ void ResourceImporterCSVTranslation::get_import_options(const String &p_path, Li
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0));
}
-Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
+Error ResourceImporterCSVTranslation::import(ResourceUID::ID p_source_id, const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
bool compress = p_options["compress"];
String delimiter;
@@ -149,6 +149,9 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
if (r_gen_files) {
r_gen_files->push_back(save_path);
}
+
+ ResourceUID::ID save_id = hash64_murmur3_64(translations[i]->get_locale().hash64(), p_source_id);
+ ResourceSaver::set_uid(save_path, save_id);
}
return OK;