This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 496a256693 make doc lang configurable with cmake (#10685)
496a256693 is described below

commit 496a256693701baf33706571d69b93c6d28231b8
Author: Brian Olsen <[email protected]>
AuthorDate: Sat Oct 28 19:47:11 2023 -0600

    make doc lang configurable with cmake (#10685)
    
    * make doc lang configurable with cmake
    
    * cmake: only print DOC_LANG config if ENABLE_DOCS defined
---
 CMakeLists.txt       | 4 ++++
 doc/conf.cmake.in.py | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a3ea44a36..97d2eb19ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -615,6 +615,7 @@ if(ENABLE_EXAMPLE)
 endif()
 
 if(ENABLE_DOCS)
+  set(DOC_LANG en CACHE STRING "Document language option")
   add_subdirectory(doc)
 endif()
 add_subdirectory(rc)
@@ -716,5 +717,8 @@ cmake_print_variables(TS_PKGSYSGROUP)
 cmake_print_variables(BUILD_MACHINE)
 cmake_print_variables(DEFAULT_STACK_SIZE)
 cmake_print_variables(CMAKE_INSTALL_RPATH)
+if(DEFINED DOC_LANG)
+  cmake_print_variables(DOC_LANG)
+endif(DEFINED DOC_LANG)
 
 print_auto_options_summary()
diff --git a/doc/conf.cmake.in.py b/doc/conf.cmake.in.py
index e5f534bbff..a5761d7b12 100644
--- a/doc/conf.cmake.in.py
+++ b/doc/conf.cmake.in.py
@@ -110,7 +110,7 @@ version = '@TS_VERSION_STRING@'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
+language = '@DOC_LANG@'
 locale_dirs = ['locale/']
 gettext_compact = False
 

Reply via email to