Skip to content

Commit

Permalink
Merge pull request #57577 from bruvzg/mac_export_tr
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Feb 3, 2022
2 parents 17d33c0 + 2eeff4c commit c4f3881
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions platform/osx/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,24 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Resources");
}

Vector<String> translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
if (translations.size() > 0) {
{
String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
tmp_app_dir->make_dir_recursive(fname);
FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
}

for (const String &E : translations) {
Ref<Translation> tr = ResourceLoader::load(E);
if (tr.is_valid()) {
String fname = tmp_app_path_name + "/Contents/Resources/" + tr->get_locale() + ".lproj";
tmp_app_dir->make_dir_recursive(fname);
FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
}
}
}

// Now process our template.
bool found_binary = false;
Vector<String> dylibs_found;
Expand Down

0 comments on commit c4f3881

Please sign in to comment.