loolwsd.xml.in | 2 ++ wsd/LOOLWSD.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit e8fd8ca01f1946b835075422ab7001c3d3f896f2 Author: Jan Holesovsky <ke...@collabora.com> Date: Fri Jan 26 20:57:54 2018 +0100 wsd: Support for configuration of the allowed languages. Change-Id: I233619b89ac61aeaab4ba96f1f52773802cfd7ae Reviewed-on: https://gerrit.libreoffice.org/48721 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/loolwsd.xml.in b/loolwsd.xml.in index 31ab1a07..724a3d67 100644 --- a/loolwsd.xml.in +++ b/loolwsd.xml.in @@ -3,6 +3,8 @@ <!-- Note: 'default' attributes are used to document a setting's default value as well as to use as fallback. --> <!-- Note: When adding a new entry, a default must be set in WSD in case the entry is missing upon deployment. --> + <allowed_languages desc="List of supported languages on this instance." default="de_DE en_GB en_US es_ES fr_FR it pt_BR pt_PT ru">de_DE en_GB en_US es_ES fr_FR it pt_BR pt_PT ru</allowed_languages> + <tile_cache_path desc="Path to a directory where to keep the tile cache." type="path" relative="false" default="@LOOLWSD_CACHEDIR@"></tile_cache_path> <sys_template_path desc="Path to a template tree with shared libraries etc to be used as source for chroot jails for child processes." type="path" relative="true" default="systemplate"></sys_template_path> <lo_template_path desc="Path to a LibreOffice installation tree to be copied (linked) into the jails for child processes. Should be on the same file system as systemplate." type="path" relative="false" default="@LO_PATH@"></lo_template_path> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 591071c1..4c417d02 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -637,7 +637,8 @@ void LOOLWSD::initialize(Application& self) // Add default values of new entries here. static const std::map<std::string, std::string> DefAppConfig - = { { "tile_cache_path", LOOLWSD_CACHEDIR }, + = { { "allowed_languages", "de_DE en_GB en_US es_ES fr_FR it pt_BR pt_PT ru" }, + { "tile_cache_path", LOOLWSD_CACHEDIR }, { "tile_cache_persistent", "true" }, { "sys_template_path", "systemplate" }, { "lo_template_path", LO_PATH }, @@ -798,6 +799,9 @@ void LOOLWSD::initialize(Application& self) LOOLWSD::SSLTermination.set(false); #endif + std::string allowedLanguages(config().getString("allowed_languages")); + setenv("LOK_WHITELIST_LANGUAGES", allowedLanguages.c_str(), 1); + Cache = getPathFromConfig("tile_cache_path"); SysTemplate = getPathFromConfig("sys_template_path"); LoTemplate = getPathFromConfig("lo_template_path"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits