Add support for JSON i18n files
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index e9e4545..8356170 100644 (file)
@@ -3993,7 +3993,6 @@ $wgDefaultUserOptions = array(
        'date' => 'default',
        'diffonly' => 0,
        'disablemail' => 0,
-       'disablesuggest' => 0,
        'editfont' => 'default',
        'editondblclick' => 0,
        'editsection' => 1,
@@ -4013,7 +4012,6 @@ $wgDefaultUserOptions = array(
        'math' => 1,
        'minordefault' => 0,
        'newpageshidepatrolled' => 0,
-       'nocache' => 0,
        'noconvertlink' => 0,
        'norollbackdiff' => 0,
        'numberheadings' => 0,
@@ -4035,8 +4033,8 @@ $wgDefaultUserOptions = array(
        'uselivepreview' => 0,
        'usenewrc' => 0,
        'vector-simplesearch' => 1,
-       'watchcreations' => 0,
-       'watchdefault' => 0,
+       'watchcreations' => 1,
+       'watchdefault' => 1,
        'watchdeletion' => 0,
        'watchlistdays' => 3.0,
        'watchlisthideanons' => 0,
@@ -5933,6 +5931,16 @@ $wgExtensionFunctions = array();
  * Variables defined in extensions will override conflicting variables defined
  * in the core.
  *
+ * Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
+ * messages in JSON format and use $wgExtensionMessagesDirs. For setting other variables than
+ * $messages, $wgExtensionMessagesFiles should still be used.
+ *
+ * If there is an entry in $wgExtensionMessagesDirs with the same key as one in
+ * $wgExtensionMessagesFiles, then any $messages variables set in the $wgExtensionMessagesFiles file
+ * will be ignored. This means an extension that only provides messages can be backwards compatible
+ * by using both $wgExtensionMessagesFiles and $wgExtensionMessagesDirs, and only one of the two
+ * will be used depending on what the version of MediaWiki supports.
+ *
  * @par Example:
  * @code
  *    $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
@@ -5940,6 +5948,32 @@ $wgExtensionFunctions = array();
  */
 $wgExtensionMessagesFiles = array();
 
+/**
+ * Extension messages directories.
+ *
+ * Associative array mapping extension name to the path of the directory where message files can
+ * be found. The message files are expected to be JSON files named for their language code, e.g.
+ * en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
+ * message directories.
+ *
+ * @par Simple example:
+ * @code
+ *    $wgExtensionMessagesDirs['ConfirmEdit'] = __DIR__ . '/i18n';
+ * @endcode
+ *
+ * @par Complex example:
+ * @code
+ *    $wgExtensionMessagesDirs['VisualEditor'] = array(
+ *        __DIR__ . '/i18n',
+ *        __DIR__ . '/modules/ve-core/i18n',
+ *        __DIR__ . '/modules/qunit/localisation',
+ *        __DIR__ . '/modules/oojs-ui/messages',
+ *    )
+ * @endcode
+ * @since 1.23
+ */
+$wgExtensionMessagesDirs = array();
+
 /**
  * Array of files with list(s) of extension entry points to be used in
  * maintenance/mergeMessageFileList.php