jenkins-bot has submitted this change and it was merged.
Change subject: Provide one click beta feature activation from Special:CX
......................................................................
Provide one click beta feature activation from Special:CX
For the users landing in Special:CX without CX enabled, instead of
providing 'No such special page' message, provide a useful message
and a way to enable the feature easily.
The campaign need to be configured to identify it as a one click
beta feature activation token.
Bug: T125306
Change-Id: I1400da27f1333a3c207a49417d44f4428cc6d71b
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M specials/SpecialContentTranslation.php
4 files changed, 9 insertions(+), 1 deletion(-)
Approvals:
Amire80: Looks good to me, approved
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/extension.json b/extension.json
index 2d80cd0..19dec15 100644
--- a/extension.json
+++ b/extension.json
@@ -132,6 +132,7 @@
"ContentTranslationTargetNamespace": "Main",
"ContentTranslationCampaigns": {
"cxstats": true,
+ "specialcx": true,
"newarticle": true
},
"ContentTranslationBrowserBlacklist": {
diff --git a/i18n/en.json b/i18n/en.json
index a583f18..566bbfd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -18,6 +18,7 @@
"cx": "Translate page",
"cx-dashboard-header": "Translations",
"cx-javascript": "This tool does not work without JavaScript.",
+ "cx-specialpage-enable-betafeature": "[[mw:ContentTranslation|Content
Translation]] is a tool to quickly translate pages into your language. [$1 Try
it now!]",
"cx-license-agreement": "By clicking the \"$1\" button, you agree to
the [//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and you
irrevocably agree to release your contributions with the translation tool under
the [https://creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0 License] and
the
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License
GFDL] with the understanding that a hyperlink or URL is sufficient for CC BY-SA
3.0 attribution.",
"cx-error-server-connection": "Error: Could not connect to the server.",
"cx-desc": "Makes it easy to translate content pages",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b6bb1c2..0a3ad9c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -24,6 +24,7 @@
"cx": "{{doc-special|ContentTranslation}}",
"cx-dashboard-header": "Title to be displayed in header while viewing
the dashboard",
"cx-javascript": "Error message shown when JavaScript is not enabled in
the browser.",
+ "cx-specialpage-enable-betafeature": "Message shown in
[[Special:ContentTranslation]] if the user did not enable the beta feature.",
"cx-license-agreement": "License agreement for the contributions using
Content Translation tool. This is legal text and be careful. You may point the
license URLs to a Wikipedia page in your language if it exists. Parameters:\n*
$1 - Label of the button that starts the translation tool.",
"cx-error-server-connection": "Error message shown when connection to
the Content Translation server has failed.",
"cx-desc":
"{{desc|name=ContentTranslation|url=https://www.mediawiki.org/wiki/Extension:ContentTranslation}}",
diff --git a/specials/SpecialContentTranslation.php
b/specials/SpecialContentTranslation.php
index 02c038a..36b7814 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -126,7 +126,12 @@
);
return;
}
- $out->showErrorPage( 'nosuchspecialpage',
'nospecialpagetext' );
+ $out->showErrorPage(
+ 'cx',
+ 'cx-specialpage-enable-betafeature',
+ SpecialPage::getTitleFor(
'ContentTranslation' )
+ ->getCanonicalURL( array(
'campaign' => 'specialcx' ) )
+ );
return;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/269403
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1400da27f1333a3c207a49417d44f4428cc6d71b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Hashar <[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