autodetect system language on MacOS

This commit is contained in:
Ryu481 2025-07-03 12:26:36 +02:00 committed by GitHub
commit 045c7bd93a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,7 +107,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
string(FIND "${TS_FILE}" "_" POS) string(FIND "${TS_FILE}" "_" POS)
math(EXPR START "${POS} + 1") math(EXPR START "${POS} + 1")
string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER)
string(REPLACE "ts" "lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}")
# @ is not valid as a language code for a lproj folder on MacOS # @ is not valid as a language code for a lproj folder on MacOS
string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}")
list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}")