jenkins-bot has submitted this change and it was merged.
Change subject: Make <visualeditor-preference-enable> message respect plural
rules
......................................................................
Make <visualeditor-preference-enable> message respect plural rules
Change-Id: I4660a530cd50a179c06a82295b6a24cae1b741b6
---
M VisualEditor.hooks.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
3 files changed, 9 insertions(+), 5 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 8ee29ba..1744597 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -255,16 +255,20 @@
public static function onGetPreferences( User $user, array
&$preferences ) {
global $wgLang;
- $config = ConfigFactory::getDefaultInstance()->makeConfig(
'visualeditor' );
if ( !array_key_exists( 'visualeditor-enable', $preferences ) )
{
+ $namespaces = ConfigFactory::getDefaultInstance()
+ ->makeConfig( 'visualeditor' )
+ ->get( 'VisualEditorNamespaces' );
+
$preferences['visualeditor-enable'] = array(
'type' => 'toggle',
'label-message' => array(
'visualeditor-preference-enable',
$wgLang->commaList( array_map(
array( 'self', 'convertNs' ),
- $config->get(
'VisualEditorNamespaces' )
- ) )
+ $namespaces
+ ) ),
+ count( $namespaces )
),
'section' => 'editing/editor'
);
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 2a365bb..eb868d4 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -209,7 +209,7 @@
"visualeditor-preference-core-discussion-link":
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/Talk:VisualEditor\/Beta_Features\/General",
"visualeditor-preference-core-info-link":
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/General",
"visualeditor-preference-core-label": "VisualEditor",
- "visualeditor-preference-enable": "Enable VisualEditor. It will be
available in the following namespaces: $1",
+ "visualeditor-preference-enable": "Enable VisualEditor. It will be
available in the following {{PLURAL:$2|namespace|namespaces}}: $1",
"visualeditor-preference-language-description": "Add an experimental tool
to VisualEditor for marking the language in which text is written for testing,
ahead of general release. Please remember to always review your changes before
saving when using experimental features.",
"visualeditor-preference-language-discussion-link":
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/Talk:VisualEditor\/Beta_Features\/Language",
"visualeditor-preference-language-info-link":
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/Language",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 4ff819e..ba3ca85 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -218,7 +218,7 @@
"visualeditor-preference-core-discussion-link": "{{optional|Used on
[[Special:Preferences]] as a link to a page where users can discuss this Beta
Feature. Defaults to a page on MediaWiki.org.}}",
"visualeditor-preference-core-info-link": "{{optional|Used on
[[Special:Preferences]] as a link to a page where users can learn about this
Beta Feature. Defaults to a page on MediaWiki.org.}}",
"visualeditor-preference-core-label": "Used in
[[Special:Preferences]].\n\nUsed as label for checkbox to enable
VisualEditor.\n\nThe description for this checkbox is:\n*
{{msg-mw|Visualeditor-preference-core-description}}\n{{Identical|VisualEditor}}",
- "visualeditor-preference-enable": "Label for the user preference to
enable VisualEditor while it is in alpha (opt-in) mode.\nLinks are in
{{msg-mw|Visualeditor-mainnamespacepagelink}} and
{{msg-mw|visualeditor-usernamespacepagelink}}.\n\nParameters:\n* $1 - Comma
separated list of namespace names.\n\nSee also:\n*
{{msg-mw|Visualeditor-preference-core-description}}",
+ "visualeditor-preference-enable": "Label for the user preference to
enable VisualEditor while it is in alpha (opt-in) mode.\nLinks are in
{{msg-mw|Visualeditor-mainnamespacepagelink}} and
{{msg-mw|visualeditor-usernamespacepagelink}}.\n\nParameters:\n* $1 - Comma
separated list of namespace names.\n* $2 - Number of namespaces in which it
will be used.\n\nSee also:\n*
{{msg-mw|Visualeditor-preference-core-description}}",
"visualeditor-preference-language-description": "Used in
[[Special:Preferences]].\n\nUsed as description for the checkbox to enable
language tools in VisualEditor.\n\nThe label for this checkbox is
{{msg-mw|Visualeditor-preference-language-label}}.",
"visualeditor-preference-language-discussion-link": "{{optional|Used on
[[Special:Preferences]] as a link to a page where users can discuss this Beta
Feature. Defaults to a page on MediaWiki.org.}}",
"visualeditor-preference-language-info-link": "{{optional|Used on
[[Special:Preferences]] as a link to a page where users can learn about this
Beta Feature. Defaults to a page on MediaWiki.org.}}",
--
To view, visit https://gerrit.wikimedia.org/r/160699
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4660a530cd50a179c06a82295b6a24cae1b741b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits