diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-03 15:16:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 15:16:46 +0100 |
commit | c4f38813b4e9d14f59fc43f66f24307962eb4fc1 (patch) | |
tree | 8c5583b67b680dc8e3555eeade328b3a5f8f70a0 /platform | |
parent | 17d33c0530fbd01404dced47a51be97cd73c87aa (diff) | |
parent | 2eeff4caec00a9eec06919d35c3ea8d87322cd31 (diff) |
Merge pull request #57577 from bruvzg/mac_export_tr
Diffstat (limited to 'platform')
-rw-r--r-- | platform/osx/export/export_plugin.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp index 4d1f72f5c9..f0b58efb63 100644 --- a/platform/osx/export/export_plugin.cpp +++ b/platform/osx/export/export_plugin.cpp @@ -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; |