mirror of https://github.com/PCSX2/pcsx2.git
Qt:Mac: Add CFBundleLocalizations tag
This commit is contained in:
parent
1d63779b7d
commit
22682e4150
|
@ -205,6 +205,18 @@ if(WIN32)
|
|||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES})
|
||||
elseif(APPLE)
|
||||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES)
|
||||
set(PCSX2_MACOS_LOCALIZATIONS)
|
||||
foreach (TS_FILE IN LISTS TS_FILES)
|
||||
get_filename_component(TS_FILE_NAME ${TS_FILE} NAME)
|
||||
set(regex "^pcsx2-qt_([a-zA-Z0-9\\-]+)\\.ts$")
|
||||
if (TS_FILE_NAME MATCHES ${regex})
|
||||
string(REGEX REPLACE ${regex} "\\1" language ${TS_FILE_NAME})
|
||||
string(REPLACE "-" "_" language ${language})
|
||||
set(PCSX2_MACOS_LOCALIZATIONS "${PCSX2_MACOS_LOCALIZATIONS}\n\t\t<string>${language}</string>")
|
||||
else()
|
||||
message(WARNING "Unrecognized ts file ${TS_FILE_NAME}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach (QM_FILE IN LISTS QM_FILES)
|
||||
target_sources(pcsx2-qt PRIVATE ${QM_FILE})
|
||||
set_source_files_properties(${QM_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations/)
|
||||
|
|
|
@ -41,5 +41,10 @@
|
|||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleLocalizations</key>
|
||||
<array>${PCSX2_MACOS_LOCALIZATIONS}
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Reference in New Issue