From b88af8e709665d526d6f60335593a184cf632e6a Mon Sep 17 00:00:00 2001 From: Seth Deegan Date: Sun, 5 Feb 2023 12:16:04 -0500 Subject: [PATCH 1/2] Add Translate extension --- cookbooks/wiki/recipes/default.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index 58836b54f..e4e606f2d 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -122,6 +122,12 @@ template_cookbook "wiki" end +mediawiki_extension "Translate" do + site "wiki.openstreetmap.org" + template "mw-ext-Translate.inc.php.erb" + template_cookbook "wiki" +end + cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] From 399f6d294a20ea7785995adeaa66867ad9cf91fe Mon Sep 17 00:00:00 2001 From: Seth Deegan Date: Sun, 5 Feb 2023 13:08:22 -0500 Subject: [PATCH 2/2] Create mw-ext-Translate.inc.php.erb --- .../default/mw-ext-Translate.inc.php.erb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb 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..c410b0469 --- /dev/null +++ b/cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb @@ -0,0 +1,36 @@ + '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 ] ] +);