한국   대만   중국   일본 
? T263093 Create a custom skin for Content Translation special pages
Page Menu Home Phabricator

Create a custom skin for Content Translation special pages
Closed, Resolved Public

Description

The Special pages for Content translation is hack-ish approach to get minimal page template, removing sidebar and other page items. This was done in 2014 by sub classing SpecialPage. This worked well, but occassionally required changes since it uses internal skin and SpecialPage method for this customization. Also, issues like T259577: ContentTranslation must provide an element #mw-content-text causes issues to other code that assumes certain structure for a mediawiki page. There is also a problem of unused code from skin.

So there was a suggestion by Jon Robson to create a custom skin for Content Translation. This ticket is to capture its development.

  • Create a custom skin to match the design of Content translation special pages. It should have the top header(logo, menu dropdown). Should be responsive, mobile friendly. It should not use OOUI or Vue or Jquery so that skin does not comes with a UI library. Better if skin does not require javascript at all. Testable in arbitrary pages using useskin=contenttranslation
  • Disable this skin from public listing by adding to $wgSkipSkins . This must be done before merging the skin code
  • CX3(Vue Section translation system) can be the first candidate to switch to this skin to evaluate and test without exposing to wider set of users
  • Migrate Special:CXStats to this new skin
  • Migrate Special:CX to this new skin

Event Timeline

Change 627982 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] ContentTranslation Skin

https://gerrit.wikimedia.org/r/627982

Screenshots:

Big screens:
image.png (485×1 px, 41 KB)
Small screens:
image.png (727×500 px, 38 KB)
Menu open
image.png (706×498 px, 44 KB)

Change 628065 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[operations/mediawiki-config@master] wgSkipSkins: Exclude contenttranslation skin from skin options for users

https://gerrit.wikimedia.org/r/628065

Change 630559 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] CX3: Use contenttranslation skin

https://gerrit.wikimedia.org/r/630559

Change 630559 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] CX3: Use contenttranslation skin

https://gerrit.wikimedia.org/r/630559

Change 628065 merged by jenkins-bot:
[operations/mediawiki-config@master] wgSkipSkins: Exclude contenttranslation skin from skin options for users

https://gerrit.wikimedia.org/r/628065

Mentioned in SAL (#wikimedia-operations) [2020-10-05T11:12:43Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: cd30b626e23b48146b970c72731f8f7bb1eee9e1 : wgSkipSkins: Exclude contenttranslation skin from skin options for users ( T263093 ) (duration: 00m 59s)

Change 627982 merged by Santhosh:
[mediawiki/extensions/ContentTranslation@master] ContentTranslation Skin

https://gerrit.wikimedia.org/r/627982

Change 630559 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX3: Use contenttranslation skin

https://gerrit.wikimedia.org/r/630559

@santhosh any hints on how I can test this?

Appeding useskin=contenttranslation to URL will change that page to contenttranslation skin. For example https://sx.wmflabs.org/?useskin=contenttranslation
But since the skin is written only for CX special pages, it works best with Special:CX. What you see at https://sx.wmflabs.org/index.php/Special:ContentTranslation#/ now is this skin. It is working as expected there.