mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
build!: turn off translations by default
The translation step prolongs the build time too much to be enabled by default. Enable it by passing cmake flag `ENABLE_TRANSLATIONS=ON`.
This commit is contained in:
@ -66,7 +66,9 @@ API
|
|||||||
|
|
||||||
BUILD
|
BUILD
|
||||||
|
|
||||||
On Windows, only building with the UCRT runtime is supported.
|
• On Windows, only building with the UCRT runtime is supported.
|
||||||
|
• Translations are turned off by default. Enable by building Nvim with the
|
||||||
|
CMake flag `ENABLE_TRANSLATIONS=ON`.
|
||||||
|
|
||||||
DEFAULTS
|
DEFAULTS
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
option(ENABLE_TRANSLATIONS "Localizations to build" OFF)
|
||||||
|
if(NOT ENABLE_TRANSLATIONS)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Gettext REQUIRED)
|
find_package(Gettext REQUIRED)
|
||||||
find_program(XGETTEXT_PRG xgettext)
|
find_program(XGETTEXT_PRG xgettext)
|
||||||
find_program(ICONV_PRG iconv)
|
find_program(ICONV_PRG iconv)
|
||||||
@ -7,8 +12,7 @@ mark_as_advanced(
|
|||||||
ICONV_PRG
|
ICONV_PRG
|
||||||
XGETTEXT_PRG)
|
XGETTEXT_PRG)
|
||||||
|
|
||||||
option(ENABLE_LANGUAGES "Localizations to build" ON)
|
if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
||||||
if(ENABLE_LANGUAGES)
|
|
||||||
set(LANGUAGES
|
set(LANGUAGES
|
||||||
af
|
af
|
||||||
ca
|
ca
|
||||||
@ -36,9 +40,7 @@ if(ENABLE_LANGUAGES)
|
|||||||
vi
|
vi
|
||||||
zh_CN.UTF-8
|
zh_CN.UTF-8
|
||||||
zh_TW.UTF-8)
|
zh_TW.UTF-8)
|
||||||
endif()
|
|
||||||
|
|
||||||
if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
|
||||||
set(ENV{OLD_PO_FILE_INPUT} yes)
|
set(ENV{OLD_PO_FILE_INPUT} yes)
|
||||||
set(ENV{OLD_PO_FILE_OUTPUT} yes)
|
set(ENV{OLD_PO_FILE_OUTPUT} yes)
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ for p in ("${TEST_INCLUDE_DIRS}" .. ";"):gmatch("[^;]+") do
|
|||||||
table.insert(M.include_paths, p)
|
table.insert(M.include_paths, p)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.translations_enabled = "${ENABLE_TRANSLATIONS}" == "ON"
|
||||||
M.vterm_test_file = "${VTERM_TEST_FILE}"
|
M.vterm_test_file = "${VTERM_TEST_FILE}"
|
||||||
M.test_build_dir = "${CMAKE_BINARY_DIR}"
|
M.test_build_dir = "${CMAKE_BINARY_DIR}"
|
||||||
M.test_source_path = "${CMAKE_SOURCE_DIR}"
|
M.test_source_path = "${CMAKE_SOURCE_DIR}"
|
||||||
|
@ -2424,6 +2424,7 @@ end)
|
|||||||
|
|
||||||
describe('ui/msg_puts_printf', function()
|
describe('ui/msg_puts_printf', function()
|
||||||
it('output multibyte characters correctly', function()
|
it('output multibyte characters correctly', function()
|
||||||
|
skip(not t.translations_enabled(), 'Nvim not built with ENABLE_TRANSLATIONS')
|
||||||
local screen
|
local screen
|
||||||
local cmd = ''
|
local cmd = ''
|
||||||
local locale_dir = test_build_dir .. '/share/locale/ja/LC_MESSAGES'
|
local locale_dir = test_build_dir .. '/share/locale/ja/LC_MESSAGES'
|
||||||
|
@ -840,4 +840,8 @@ function M.skip_fragile(pending_fn, cond)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.translations_enabled()
|
||||||
|
return M.paths.translations_enabled
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Reference in New Issue
Block a user