Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34645491
SpecialContentTranslation T291193
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Krinkle
Sep 16 2021, 10:16 PM
2021-09-16 22:16:55 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
SpecialContentTranslation T291193
View Options
diff --git a/extension.json b/extension.json
index a198a1ce..ba6a1966 100644
--- a/extension.json
+++ b/extension.json
@@ -28,23 +28,6 @@
"ExtensionMessagesFiles": {
"ContentTranslationAliases": "ContentTranslation.alias.php"
},
- "ValidSkinNames": {
- "contenttranslation": {
- "class": "SkinContentTranslation",
- "args": [
- {
- "name": "contenttranslation",
- "responsive": true,
- "styles": [
- "mw.cx.skin"
- ],
- "messages": [
- "cx-javascript"
- ]
- }
- ]
- }
- },
"HookHandlers": {
"sxbeforepublish": {
"class": "ContentTranslation\\SectionTranslationBeforePublishHandler",
diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php
index 76561fd4..9c4b5981 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -16,7 +16,7 @@ use ExtensionRegistry;
use Html;
use MediaWiki\MediaWikiServices;
use MutableContext;
-use SkinFactory;
+use SkinContentTranslation;
use SpecialPage;
use Wikimedia\Services\NoSuchServiceException;
@@ -25,17 +25,9 @@ use Wikimedia\Services\NoSuchServiceException;
* a special page that shows Content Translation user interface.
*/
class SpecialContentTranslation extends SpecialPage {
- /**
- * @var SkinFactory
- */
- private $skinFactory;
- /**
- * @param SkinFactory $skinFactory
- */
- public function __construct( \SkinFactory $skinFactory ) {
+ public function __construct() {
parent::__construct( 'ContentTranslation' );
- $this->skinFactory = $skinFactory;
}
public function getDescription() {
@@ -55,9 +47,18 @@ class SpecialContentTranslation extends SpecialPage {
}
'@phan-var MutableContext $context';
- $context->setSkin(
- $this->skinFactory->makeSkin( 'contenttranslation' )
- );
+
+ $skin = new SkinContentTranslation( [
+ 'name' => 'contenttranslation',
+ 'responsive' => true,
+ 'styles' => [
+ 'mw.cx.skin'
+ ],
+ 'messages' => [
+ 'cx-javascript'
+ ]
+ ] );
+ $context->setSkin( $skin );
if ( !$this->canUserProceed() ) {
return;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9183088
Default Alt Text
SpecialContentTranslation T291193 (2 KB)
Attached To
Mode
P17287 SpecialContentTranslation T291193
Attached
Detach File
Event Timeline
Log In to Comment