mirror of
https://github.com/transmission/transmission
synced 2024-12-22 15:54:57 +00:00
f544399183
* Sync translations with code * Move Qt client's it_IT to it "it_IT" was merged into pre-existing "it", so no (huge) loss of translations should occur; "it" was chosen as a base since it contains more up-to-date translations while "it_IT" hasn't changed much in years (I think, because most phrases were marked as reviewed and so impossible to change by most translators based on their assigned role). * Sync translations with Transifex * Add new languages (90+% complete) Mac client: * Basque (eu) * Hebrew (he) * Hungarian (hu) * Japanese (ja) * Polish (pl) * Portuguese (Brazil) (pt_BR) * Swedish (sv) * Ukrainian (uk) * Chinese (China) (zh_CN) * Chinese (Taiwan) (zh_TW) Qt client: * Icelandic (is) Also, fix Qt client languages list to include those already in translations/ subdirectory and 90+% complete: * Hebrew (he) * Chinese (Taiwan) (zh_TW) * Fix Xcode language mapping for pt_PT/pt-PT * Fix Xcode language mapping for pt_BR/pt-BR * Fix Xcode language mapping for zh_CN/zh-CN * Fix Xcode language mapping for zh_TW/zh-TW * Sync translations with Transifex (again) Primarily to fixup "Port: $@" translation, but there were other updates in the meantime. * Update list of QuickLookPlugin languages * Fixup local pt-BR language name in tx config
109 lines
2.6 KiB
CMake
109 lines
2.6 KiB
CMake
set(MAC_QL_BUNDLE_NAME QuickLookPlugin)
|
|
|
|
add_library(${TR_NAME}-mac-ql MODULE)
|
|
|
|
target_sources(${TR_NAME}-mac-ql
|
|
PRIVATE
|
|
../NSDataAdditions.mm
|
|
../NSStringAdditions.mm
|
|
GeneratePreviewForURL.mm
|
|
GenerateThumbnailForURL.mm
|
|
main.cc)
|
|
|
|
set(LINGUAS
|
|
da
|
|
de
|
|
en
|
|
es
|
|
eu
|
|
fr
|
|
he
|
|
hu
|
|
it
|
|
ja
|
|
nl
|
|
pl
|
|
pt-BR
|
|
pt-PT
|
|
ru
|
|
sv
|
|
tr
|
|
uk
|
|
zh-CN
|
|
zh-TW)
|
|
|
|
if(ENABLE_NLS)
|
|
set(ENABLED_LINGUAS ${LINGUAS})
|
|
else()
|
|
set(ENABLED_LINGUAS en)
|
|
endif()
|
|
|
|
set(LANG_STRINGS_FILES
|
|
Localizable.strings)
|
|
|
|
set(RESOURCES
|
|
style.css)
|
|
source_group(Resources
|
|
FILES ${RESOURCES})
|
|
|
|
set_source_files_properties(
|
|
${RESOURCES}
|
|
PROPERTIES
|
|
MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
foreach(LANG ${ENABLED_LINGUAS})
|
|
set(${LANG}_STRINGS_FILES)
|
|
set(STRINGS_FILES_RESOURCES_DIR Resources)
|
|
if(NOT CMAKE_GENERATOR STREQUAL Xcode)
|
|
string(APPEND STRINGS_FILES_RESOURCES_DIR /${LANG}.lproj)
|
|
endif()
|
|
foreach(F ${LANG_STRINGS_FILES})
|
|
list(APPEND ${LANG}_STRINGS_FILES ${LANG}.lproj/${F})
|
|
list(APPEND RESOURCES ${${LANG}_STRINGS_FILES})
|
|
set_source_files_properties(
|
|
${${LANG}_STRINGS_FILES}
|
|
PROPERTIES
|
|
MACOSX_PACKAGE_LOCATION ${STRINGS_FILES_RESOURCES_DIR})
|
|
endforeach()
|
|
source_group(Resources/${LANG}.lproj
|
|
FILES ${${LANG}_STRINGS_FILES})
|
|
endforeach()
|
|
|
|
target_sources(${TR_NAME}-mac-ql
|
|
PRIVATE
|
|
${RESOURCES})
|
|
|
|
set_target_properties(
|
|
${TR_NAME}-mac-ql
|
|
PROPERTIES
|
|
BUNDLE ON
|
|
BUNDLE_EXTENSION qlgenerator
|
|
INSTALL_RPATH "@loader_path/../../../../../MacOS;@loader_path/../../../../../Frameworks"
|
|
MACOSX_BUNDLE ON
|
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
|
|
OUTPUT_NAME ${MAC_QL_BUNDLE_NAME})
|
|
|
|
target_include_directories(${TR_NAME}-mac-ql
|
|
PRIVATE
|
|
..)
|
|
|
|
target_link_libraries(${TR_NAME}-mac-ql
|
|
PRIVATE
|
|
${TR_NAME}
|
|
"-framework Foundation"
|
|
"-framework CoreFoundation"
|
|
"-framework CoreServices"
|
|
"-framework AppKit"
|
|
"-framework QuickLook")
|
|
|
|
install(
|
|
TARGETS ${TR_NAME}-mac-ql
|
|
DESTINATION Applications/${MAC_BUNDLE_NAME}.app/Contents/Library/QuickLook)
|
|
|
|
install(CODE
|
|
"list(APPEND CMAKE_MODULE_PATH \"${PROJECT_SOURCE_DIR}/cmake\")
|
|
include(TrMacros)
|
|
include(GetPrerequisites)
|
|
tr_fixup_bundle_item(
|
|
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/Applications/${MAC_BUNDLE_NAME}.app\"
|
|
\"Contents/Library/QuickLook/${MAC_QL_BUNDLE_NAME}.qlgenerator/Contents/MacOS/${MAC_QL_BUNDLE_NAME}\" \"\")")
|