summaryrefslogtreecommitdiffstats
path: root/platform/osx/export/export_plugin.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-04 09:27:44 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-04 09:27:44 +0200
commit5fdea6927616bdf2222c0375d644befe28af96e1 (patch)
tree8fb7bab6ecc71afd502497e36479176573afc55e /platform/osx/export/export_plugin.cpp
parentd0c3094da8fb3ec2ffb0b88df464979abebefe85 (diff)
downloadredot-engine-5fdea6927616bdf2222c0375d644befe28af96e1.tar.gz
[macOS and iOS export] Add localized application name to the translation .plist files.
Diffstat (limited to 'platform/osx/export/export_plugin.cpp')
-rw-r--r--platform/osx/export/export_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp
index 24b9bc02a2..4d0fc9add6 100644
--- a/platform/osx/export/export_plugin.cpp
+++ b/platform/osx/export/export_plugin.cpp
@@ -787,6 +787,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
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);
+ f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
}
for (const String &E : translations) {
@@ -795,6 +796,10 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
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);
+ String prop = "application/config/name_" + tr->get_locale();
+ if (ProjectSettings::get_singleton()->has_setting(prop)) {
+ f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get(prop).operator String() + "\";");
+ }
}
}
}