Feature: dynamic changes of language and locale at runtime issue #2644 (#2659)

This change updates the UI to allow for dynamic changes of language and
locale at runtime. Right now none of the language translations are finished
yet or in releasable shape so it also adds a new option to the build that
enables/disables the feature. By default no translations are currently
enabled to be built as part of a release.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
AT
2024-07-12 16:14:58 -04:00
committed by GitHub
parent 0a94d7d55d
commit d515ad3b18
8 changed files with 3950 additions and 4170 deletions

View File

@@ -33,6 +33,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(GPT4ALL_TRANSLATIONS OFF "Build with translations")
option(GPT4ALL_LOCALHOST OFF "Build installer for localhost repo")
option(GPT4ALL_OFFLINE_INSTALLER "Build an offline installer" OFF)
option(GPT4ALL_SIGN_INSTALL "Sign installed binaries and installers (requires signing identities)" OFF)
@@ -226,9 +227,14 @@ qt_add_qml_module(chat
icons/you.svg
)
qt_add_translations(chat
TS_FILES ${CMAKE_SOURCE_DIR}/translations/gpt4all_en.ts
)
if (GPT4ALL_TRANSLATIONS)
qt_add_translations(chat
TS_FILES
${CMAKE_SOURCE_DIR}/translations/gpt4all_en.ts
${CMAKE_SOURCE_DIR}/translations/gpt4all_es_MX.ts
${CMAKE_SOURCE_DIR}/translations/gpt4all_zh_CN.ts
)
endif()
set_target_properties(chat PROPERTIES
WIN32_EXECUTABLE TRUE