From bbb97ede0cf9a1453381ed4fb7972e3b7742078f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 4 May 2025 18:44:58 +0100 Subject: [PATCH] Add configuration for the Translate extension --- cookbooks/wiki/recipes/default.rb | 2 + .../default/mw-ext-Translate.inc.php.erb | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index 6ad434b51..0590346f3 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -158,6 +158,8 @@ end mediawiki_extension "Translate" do site site_name + template "mw-ext-Translate.inc.php.erb" + template_cookbook "wiki" only_if { node[:wiki][:test_mode] } end diff --git a/cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb b/cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb new file mode 100644 index 000000000..9c99934f8 --- /dev/null +++ b/cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb @@ -0,0 +1,40 @@ + 'ttmserver', + 'class' => 'ElasticSearchTTMServer', + 'cutoff' => 0.75, + /* + * See http://elastica.io/getting-started/installation.html + * See https://github.com/ruflin/Elastica/blob/8.x/src/Client.php + */ + 'config' => [ 'servers' => [ 'host' => '127.0.0.1', 'port' => 9114 ] ] +]; -- 2.39.5