refactor: use metaglot to take macos bundle i18n over
- use metaglot for macos bundle i18n - set macos icon from PUBLIC to PRIVATE - remove CFBundleLongVersionString from Info.plist
This commit is contained in:
+16
-23
@@ -14,10 +14,8 @@
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>{{ default.strings.app_name | xml_escape }}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@@ -29,28 +27,23 @@
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<!-- FIXME: this list can't be automatically generated by Qt's CMake API, don't know why. -->
|
||||
<string>MIT/Expat License - Copyright (C) 2026 Gary Wang</string>
|
||||
<!--
|
||||
CFBundleLocalizations is generated from the metadata localization languages (the metaglot
|
||||
"langs" list), while this field by definition describes the application's language
|
||||
availability. This deviation works around an upstream Qt bug: since the Qt 6.7.0 refactor,
|
||||
the CMake function _qt_internal_store_languages_from_ts_files_in_targets loses the parsed
|
||||
TS language codes (a missing list(APPEND)), so Qt's own CFBundleLocalizations generation
|
||||
yields an empty list. Consistency between the metadata languages and the application
|
||||
languages is maintained manually at release time.
|
||||
TODO: drop this workaround and let Qt generate CFBundleLocalizations itself once the
|
||||
upstream bug is fixed and the fix ships in the CI toolchain.
|
||||
-->
|
||||
<key>CFBundleLocalizations</key>
|
||||
<array>
|
||||
<string>en</string>
|
||||
<string>ca</string>
|
||||
<string>de</string>
|
||||
<string>es</string>
|
||||
<string>fr</string>
|
||||
<string>id</string>
|
||||
<string>it</string>
|
||||
<string>ja</string>
|
||||
<string>ko</string>
|
||||
<string>nb_NO</string>
|
||||
<string>nl</string>
|
||||
<string>pa_PK</string>
|
||||
<string>ru</string>
|
||||
<string>si</string>
|
||||
<string>ta</string>
|
||||
<string>tr</string>
|
||||
<string>uk</string>
|
||||
<string>zh_CN</string>
|
||||
{% for lang in langs %}
|
||||
<string>{{ lang }}</string>
|
||||
{% endfor %}
|
||||
</array>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
version = 1
|
||||
source_language = "en"
|
||||
|
||||
[strings.app_name]
|
||||
msgid = "Pineapple Pictures"
|
||||
comment = "Display name of the application."
|
||||
|
||||
[strings.file_type_jpeg]
|
||||
msgid = "JPEG Image"
|
||||
comment = "Name of the JPEG document type (jpg, jpeg, jfif)."
|
||||
|
||||
[strings.file_type_png]
|
||||
msgid = "PNG Image"
|
||||
comment = "Name of the PNG document type."
|
||||
|
||||
[strings.file_type_webp]
|
||||
msgid = "WebP Image"
|
||||
comment = "Name of the WebP document type."
|
||||
|
||||
[strings.file_type_gif]
|
||||
msgid = "GIF Image"
|
||||
comment = "Name of the GIF document type."
|
||||
|
||||
[strings.file_type_svg]
|
||||
msgid = "SVG Image"
|
||||
comment = "Name of the SVG document type."
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
/* Application display name. The key is the Info.plist key name. */
|
||||
"CFBundleName" = "{{ strings.app_name | plist_strings_escape }}";
|
||||
/* File type names. The key is the source text, covering CFBundleTypeName. */
|
||||
"{{ sources.file_type_jpeg | plist_strings_escape }}" = "{{ strings.file_type_jpeg | plist_strings_escape }}";
|
||||
"{{ sources.file_type_png | plist_strings_escape }}" = "{{ strings.file_type_png | plist_strings_escape }}";
|
||||
"{{ sources.file_type_webp | plist_strings_escape }}" = "{{ strings.file_type_webp | plist_strings_escape }}";
|
||||
"{{ sources.file_type_gif | plist_strings_escape }}" = "{{ strings.file_type_gif | plist_strings_escape }}";
|
||||
"{{ sources.file_type_svg | plist_strings_escape }}" = "{{ strings.file_type_svg | plist_strings_escape }}";
|
||||
Reference in New Issue
Block a user