Skip to content

Commit

Permalink
Relates #311: MacOS: create Resources/<lang>.lproj directory
Browse files Browse the repository at this point in the history
This should persuade the OS to switch the Finder Menu
to the current language.
At least for me it does not work.

Keep it for reference. It does not hurt either.
  • Loading branch information
chris2511 committed Aug 22, 2024
1 parent 8851b57 commit fbbf919
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ foreach(lang ${XCA_LANGUAGES})
endif()
string(APPEND LANG_COMPS " </Component>\n")
list(APPEND LANG_ALLCOMPS ${LANG_COMPS})
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${D}/${lang}.keep)
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${D}/${lang}.keep)
set_source_files_properties(${D}/${lang}.keep PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources/${lang}.lproj")
endforeach()

string(APPEND WIX_LANG_CONTENT
Expand All @@ -29,7 +33,6 @@ WixFile(${D}/language.wxs ${WIX_LANG_CONTENT})
if (${QT_VERSION} VERSION_LESS 6.0.0 )
qt5_add_translation(QM_FILES ${TS_FILES} OPTIONS -silent)
message(STATUS "Updating translations from source with 'lupdate' only supprted with QT6")
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${QM_FILES})
else()
get_target_property(LIBSRC xcalib SOURCES)
get_target_property(XCASRC xca SOURCES)
Expand All @@ -40,7 +43,7 @@ else()
)
add_custom_target(trans DEPENDS xca_lupdate "${D}/xca.pot")
endif()
list(APPEND APP_RESOURCES ${QM_FILES})
list(APPEND APP_RESOURCES ${QM_FILES} ${LANG_DIRS})
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${QM_FILES})

if (UNIX AND NOT APPLE)
Expand Down

0 comments on commit fbbf919

Please sign in to comment.