Skip to content

Commit

Permalink
Add I18N module
Browse files Browse the repository at this point in the history
  • Loading branch information
Madman10K committed Sep 1, 2023
1 parent 2944de9 commit 1f388f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
21 changes: 17 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,23 @@ if (NOT USE_CLI_PARSER_MODULE OR NOT BUILD_VARIANT_VENDOR)
add_subdirectory(Framework/Modules/CLIParser/ThirdParty/UntitledCLIParser/ThirdParty/utfcpp)
endif()

if (USE_I18N_MODULE)
if (BUILD_VARIANT_VENDOR)
set(USE_PRECONFIGURED_YAML ON)
add_subdirectory(Framework/Modules/i18n/ThirdParty/UntitledI18N)
list(APPEND ENABLED_LIBRARIES UntitledI18N)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(UntitledI18N REQUIRED UntitledI18N)

link_directories(${UntitledI18N_LIBRARY_DIRS})
list(APPEND LM_INCLUDE_DIRS ${UntitledI18N_INCLUDE_DIRS})
list(APPEND ENABLED_LIBRARIES UntitledI18N)
pkg_get_variable(UI18N_COMPILE_DEFS UntitledI18N compile_defs)
list(APPEND VENDOR_COMPILE_DEFS ${UI18N_COMPILE_DEFS})
endif()
endif()

# ----------------------------------------------------------------------------------------------------------------------
# ---------------------------------------------- Add files and directories ---------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -388,10 +405,6 @@ if (BUILD_VARIANT_VENDOR)
enable_module_defs(UIMGUI_BUILD_VARIANT_VENDOR)
endif()

if (USE_I18N_MODULE)
enable_module_defs(UIMGUI_I18N_MODULE_ENABLED)
endif()

if (USE_PLOTTING_MODULE)
enable_module_defs(UIMGUI_PLOTTING_MODULE_ENABLED)
endif()
Expand Down
3 changes: 0 additions & 3 deletions Config/Translations/translation-base.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions Config/Translations/ui18n-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terms:
- example: example

0 comments on commit 1f388f6

Please sign in to comment.