Page MenuHomePhabricator

Remove capitalize-all-nouns from MW core and move it to the Monobook skin
Closed, ResolvedPublic

Description

MediaWiki core has a feature whereby the setting $capitalizeAllNouns = true can be set in a LanguageXx.php file. When this is set, OutputPage attaches the capitalize-all-nouns class to the page <body> element. The only languages for which $capitalizeAllNouns = true are German and languages with German as a fallback (e.g. Alemannic).

This feature is AFAICS only used by the Monobook skin to disable lowercase transformation of tab titles for those languages, so it should be removed from core and put into the Monobook skin. It is a very obscure feature and I can't see why it would ever be required for anything else apart from this one special use case.

TODO

  • Move logic to MonoBook
  • Remove from core

Event Timeline

TTO raised the priority of this task from to Needs Triage.
TTO updated the task description. (Show Details)
TTO added projects: MonoBook, I18n.
TTO added a subscriber: TTO.

hmm, this definitely should be moved into monobook.

Change 435637 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/skins/MonoBook@master] Move capitalize-all-nouns CSS class support from core to MonoBook

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

Change 435638 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/core@master] Remove capitalize-all-nouns CSS class support from core now that it's been moved to MonoBook

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

Is the override even needed within MonoBook? It seems like this would be naturally handled as part of the interface message. The relevant words are simply uppercased within their text as needed, with the rest already lowercase in the base message. As far as I know, we do this with all other interface messages already.

The only thing I can think of that might make this a problem for this use case is if the "personal toolbar" messages re-used by multiple code paths (skins), which is already an established anti-pattern and can be resolved by giving MonoBook its own copy of the relevant messages.

Change 435637 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/skins/MonoBook@master] Move capitalize-all-nouns CSS class support from core to MonoBook

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

Change 435637 merged by jenkins-bot:

[mediawiki/skins/MonoBook@master] Move capitalize-all-nouns CSS class support from core to MonoBook

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

Volker_E added a subscriber: Volker_E.

The only other skins, we're aware of (captured by CodeSearch) that include the CSS selectors only:

  • GuMaxDD
  • WikiMANNia / MediaWiki-Skins-with-Advertisements
  • cforcomputer / eveskin

I highly assume that these have only copied over Monobook CSS without even relying on the functionality.

Sent a proposal for removal without deprecation to wikitech-l.

Change 435638 merged by jenkins-bot:

[mediawiki/core@master] Remove capitalize-all-nouns CSS class support

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

Volker_E assigned this task to Jdlrobson.
Volker_E removed a project: Patch-For-Review.
This comment was removed by hgzh.

Why do you provoke conflicts with the german language Wikipedia again?

We are flooded with requests to communicate about all the bullshit from the foundation, but they keep their attitude of installing something without asking.

Undo this bug asap.

Are we supposed to fix this on dewiki directly via Monobook.css (easily doable) or will there actually be a central solution? I don’t really understand what the proposed “move to Monobook” of this task was trying to do.

I think the problem is caused by monobook's conversion to responsive/non-responsive. .monobook-capitalize-all-nouns becomes body:not(.skin--responsive) .monobook-capitalize-all-nouns resp. body.skin--responsive .monobook-capitalize-all-nouns and that doesn't match anymore as .monobook-capitalize-all-nouns is a class assigned to body.

This looks like a small unintentional mistake in T285492 that's easily rectifiable due to 2 conflicting but unrelated changes. No action is needed from editors.

Are we supposed to fix this on dewiki directly via Monobook.css (easily doable) or will there actually be a central solution? I don’t really understand what the proposed “move to Monobook” of this task was trying to do.

For the record, this task was a refactor to make MonoBook more manageable that was done in July that has nothing to do with the current breakage. The current breakage occurred due to applying a patch that was written before the change and only recently merged. I've applied a temporary fix to MonoBook.css which I'll remove when this is dealt with.

Change 712978 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MonoBook@master] Restore capitalization to MonoBook

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

This looks like a small unintentional mistake in T285492 that's easily rectifiable due to 2 conflicting but unrelated changes. No action is needed from editors.

Are we supposed to fix this on dewiki directly via Monobook.css (easily doable) or will there actually be a central solution? I don’t really understand what the proposed “move to Monobook” of this task was trying to do.

For the record, this task was a refactor to make MonoBook more manageable that was done in July that has nothing to do with the current breakage. The current breakage occurred due to applying a patch that was written before the change and only recently merged. I've applied a temporary fix to MonoBook.css which I'll remove when this is dealt with.

I had already added a quick fix to the Monobook.css in order to avoid more angry reactions, but better double than nothing. We can remove all of it afterwards. Thanks!

If I understand T3553#58698 ff correctly, there was no objection in 2008 to removing the CSS text-transform feature from Monobook altogether. I think it should have been removed then, as such things tend to cause trouble much later. There is simply no reason I can think of that this should be the default, instead of a user setting in their own CSS.

The Hotfix is just a part of the story. There are still lowercase letters in https://de.wikipedia.org/wiki/Spezial:Einstellungen (or if you prefer english: https://de.wikipedia.org/wiki/Special:Preferences )

Yes, that could only be fixed via Common.css, but I would not touch that stylesheet only for a temporary fix.

I mentioned https://de.wikipedia.org/wiki/Spezial:Einstellungen because testing the final solution should take a look at that page too.

@Wurgl @XanonymusX The updated patch takes care of those in Spezial:Einstellungen as well!

Change 712978 merged by jenkins-bot:

[mediawiki/skins/MonoBook@master] Restore capitalization styling in MonoBook portlets

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

Patch merged above will rollout this week.