]> git.openstreetmap.org Git - chef.git/blob - cookbooks/wiki/templates/default/mw-ext-Translate.inc.php.erb
Add configuration for the Translate extension
[chef.git] / cookbooks / wiki / templates / default / mw-ext-Translate.inc.php.erb
1 <?php
2 # DO NOT EDIT - This file is being maintained by Chef
3 wfLoadExtension( 'Translate' );
4
5 /**
6  * Allow all confirmed users to edit translations.
7  */
8 $wgGroupPermissions['autoconfirmed']['translate'] = true;
9 $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true; // Bug 34182: needed with ConfirmEdit
10
11 /**
12  * Allow all confirmed users to review translations.
13  */
14 $wgGroupPermissions['autoconfirmed']['translate-messagereview'] = true;
15
16 /**
17  * Allow all translations administrators to manage translations.
18  */
19 $wgGroupPermissions['translationadmin']['pagetranslation'] = true;
20 $wgGroupPermissions['translationadmin']['translate-manage'] = true;
21
22 /**
23  * Language code for message documentation. Suggested values are qqq or info.
24  * If set to false (default), message documentation feature is disabled.
25  */
26 $wgTranslateDocumentationLanguageCode = 'qqq';
27
28 /**
29  * Let Translate extension use ElasticSearch to store commonly-used translation messages to suggest to translators
30  */
31 $wgTranslateTranslationServices['TTMServer'] = [
32         'type' => 'ttmserver',
33         'class' => 'ElasticSearchTTMServer',
34         'cutoff' => 0.75,
35         /*
36          * See http://elastica.io/getting-started/installation.html
37          * See https://github.com/ruflin/Elastica/blob/8.x/src/Client.php
38          */
39         'config' => [ 'servers' => [ 'host' => '127.0.0.1', 'port' => 9114 ] ]
40 ];