mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Don't ship with broken languages (#4940)
This commit is contained in:
parent
09f1a0c1ff
commit
ba52a34f94
@ -689,6 +689,28 @@ if(BUILD_SERVER)
|
|||||||
endif()
|
endif()
|
||||||
endif(BUILD_SERVER)
|
endif(BUILD_SERVER)
|
||||||
|
|
||||||
|
# Blacklisted locales that don't work.
|
||||||
|
# see issue #4638
|
||||||
|
set(GETTEXT_BLACKLISTED_LOCALES
|
||||||
|
be
|
||||||
|
he
|
||||||
|
ko
|
||||||
|
ky
|
||||||
|
zh_CN
|
||||||
|
zh_TW
|
||||||
|
)
|
||||||
|
|
||||||
|
option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid broken locales" TRUE)
|
||||||
|
|
||||||
|
if (GETTEXT_FOUND AND APPLY_LOCALE_BLACKLIST)
|
||||||
|
set(GETTEXT_USED_LOCALES "")
|
||||||
|
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
|
||||||
|
if (NOT ";${GETTEXT_BLACKLISTED_LOCALES};" MATCHES ";${LOCALE};")
|
||||||
|
list(APPEND GETTEXT_USED_LOCALES ${LOCALE})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
message(STATUS "Locale blacklist applied; Locales used: ${GETTEXT_USED_LOCALES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set some optimizations and tweaks
|
# Set some optimizations and tweaks
|
||||||
|
|
||||||
@ -807,7 +829,7 @@ if(BUILD_CLIENT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_GETTEXT)
|
if(USE_GETTEXT)
|
||||||
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
|
foreach(LOCALE ${GETTEXT_USED_LOCALES})
|
||||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||||
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||||
install(FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH})
|
install(FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH})
|
||||||
@ -836,7 +858,7 @@ endif()
|
|||||||
if (USE_GETTEXT)
|
if (USE_GETTEXT)
|
||||||
set(MO_FILES)
|
set(MO_FILES)
|
||||||
|
|
||||||
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
|
foreach(LOCALE ${GETTEXT_USED_LOCALES})
|
||||||
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME}.po")
|
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME}.po")
|
||||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||||
|
Loading…
Reference in New Issue
Block a user