Page MenuHomePhabricator

Update skin-specific menu labels to be more predictable, intuitive with better default values
Closed, ResolvedPublic3 Estimated Story Points

Description

NOTE: Editors should feel free to review/override existing interface messages listed in the table below.

Context: Since many of Wikimedia’s deployed skins do not have accountable maintainers, WMF have been simplifying skins to reduce the maintenance cost of retaining these skins in production. This week a change was made, to simplify how menu messages were labelled.

Message keys are currently unpredictable. While we consider removal of the fallbacks altogether in T300183, we should at least make sure the skin key fallback is more predictable.

QA

new message keyIn Vector skins expected labelIn timeless/monobook skin expected label
action-addsectionAdd topic+
view-historyView historyHistory
action-undeleteUndeleteUndelete {{PLURAL:$1|one edit|$1 edits}} (e.g. Undelete 2 edits)
view-viewReadView
action-deleteDeletedelete this page
action-moveMovemove this page
action-protectProtectProtect
action-unprotectChange protectionChange protection

Acceptance criteria

  • We will refactor the Skin code, so that all menu labels are routed via the same function, to prevent menu keys from being inconsistent in future. The message label logic will be updated to first check "$skname-$labelMessageKey" and then check "$labelMessageKey" and then the legacy key (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/760670)
  • To avoid any change to non-Vector skins, we will consider creating local overrides in the Monobook and Timeless skins (Modern and CologneBlue are in maintenance mode so we'll consider those separately)
  • We'll implement the new message key labels (See table) with the new defaults inspired by the Vector legacy skin. For entries not overriden in Vector, we'll copy across the existing rules.
  • We'll ask translatewiki to do a mass update of the message keys, to speed up translation. Ask Jon R how to do this.
  • We'll remove the fallback message key labels once there is an i18n key for all the new entries.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@Esanders there are 605 overrides and these will continue to work provided they are using the skin prefixed key that shows up with ?uselang=qqx. For example, a message MediaWiki:vector-action-protect will still take precedence as it did before. Vector skin is not impacted by this change, as all the newly introduced messages were already being overriden in Vector, so any impact on overrides here is limited to Monobook, Timeless, CologneBlue and Modern.

For these skins, it's questionable to why they are overridden and if they are still needed. In fact, when I analyzed the existing overrides [1], for over a half of cases the messages were identical, that number grows when you add case insensitivity.

When https://gerrit.wikimedia.org/r/c/mediawiki/core/+/761985 lands, then we are changing the message order from
monobook-view-edit, edit to monobook-view-edit, view-edit, edit, so some impact is to be expected where the skin message key is not being utilized.

For example, https://en.wikinews.org/wiki/MediaWiki:Edit ("Edit this page") appears in the Monobook skin. However, if the intention was to override this particular message it should be explicitly overriding monobook-view-edit. This change does mean that the label for Monobook on that project will switch from the overridden "Edit this page" to "Edit". The same change also happens on Vector 2022. However in the latter case, that's intended and requested by the community, the former is unavoidable to fix the latter.

Given all the ambiguity here, and the number of pages, I think some disruption is unavoidable, and a User-notice will be the best approach here. Better defaults for all skins seems like it's worth that short term pain.

[1] https://global-search.toolforge.org/?q=.&regex=1&namespaces=8&title=%28Monobook-view-history%7CMonobook-action-delete%7CMonobook-action-move%7CMonobook-action-undelete%7CMonobook-action-viewdeleted%7CMonobook-action-protect%7CMonobook-action-unprotect%7CMonobook-action-viewsource%7CMonobook-action-addsection%7CMonobook-view-view%7CMonobook-view-create%7CMonobook-view-edit%7CVector-view-history%7CVector-action-delete%7CVector-action-move%7CVector-action-undelete%7CVector-action-viewdeleted%7CVector-action-protect%7CVector-action-unprotect%7CVector-action-viewsource%7CVector-action-addsection%7CVector-view-view%7CVector-view-create%7CVector-view-edit%7CView-history%7CAction-delete%7CAction-move%7CAction-undelete%7CAction-viewdeleted%7CAction-protect%7CAction-unprotect%7CAction-viewsource%7CAction-addsection%7CView-view%7CView-create%7CView-edit%7CView%7CEdit%7CCreate%7CUnprotect%7CProtect%7CViewsource%7CAddsection%7CViewdeleted%7CHistory_short%7CUndelete_short%7CMove%7CDelete%29

[…] it's questionable to why they are overridden and if they are still needed. In fact, when I analyzed the existing overrides [1], for over a half of cases the messages were identical, that number grows when you add case insensitivity.

I believe casing is one of the reasons that these interface messages support a per-skin override. Originally these were tied to core and shared between skins. That is still the default, and that helps skins make a kickstart without having to own all these messages (and their stale translations) unless they need/want to.

However, differences in interface context require some languages to switch from verbs to nouns, and/or to align with differences in available space and length of phrasing, or voice and tone. These requiremements sometime materialize in the form of a character being uppercase or not, where e.g. "Edit" would be a noun but "edit" a verb, such as in German. (This cannot and should not be done through CSS as that affects presentation only, not linguistic meaning to AT; as an example, think about the word "contract" and the two ways it can be pronounced in English to carry a different meanings). Similarly, where Vector has space and submenus available for a longer action label like "View history", the default is a short noun like "History".

Change 763839 merged by jenkins-bot:

[mediawiki/core@master] [Take 2] Refactor menu navigation construction\"\"

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

Spot on betacluster.
monobook-action-move fallbacks to action-move but action-move has another purpose (see qqq)

Change 761985 merged by jenkins-bot:

[mediawiki/core@master] Update interface message defaults for all skins

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

Change 761985 merged by jenkins-bot:

[mediawiki/core@master] Update interface message defaults for all skins

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

- array_unshift( $subjectMsg, 'mainpage-nstab' );

@Jdlrobson It looks like this is removing support for this override. Is that correct? It appears to be used on several dozen wikis (Global Search). It is also documented on pages such as mw:Main_Page_tab, which suggests this was the canonical way to do for many years.

Are those overrides already superseded by local nstab-mainpage entries? Or is this still something to be done/announced/asked for this week?

I think there might be a related bug here?
I'm suddenly seeing lower-case and multiword labels, for things that were previously Sentence-case and single-word. (But inconsistently)
E.g. Screenshot of: MediaWiki-wiki, Wikitech, Office-wiki, Enwiki (which the train hasn't reached yet)
(And all using vector-2022 as default, and with ?safemode=1 to omit any gadgets/scripts)

image.png (856×737 px, 567 KB)

Given all the ambiguity here, and the number of pages, I think some disruption is unavoidable, and a User-notice will be the best approach here. Better defaults for all skins seems like it's worth that short term pain.

Re: Tech News - What wording would you suggest as the content? Thanks!

Change 767807 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] Revert "Update interface message defaults for all skins"

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

Tacsipacsi subscribed.

https://gerrit.wikimedia.org/r/767807 has been abandoned. I hope there will be a new, working patch soon, but there’s no patch for review for the time being.

Our intent is usually to ensure all skins have the same message. This change seems to be a negative from that point of view, unless I'm missing some obvious all-skins messages.

Something went wrong with German-language labels, as pointed out here. They are now using long-obsolete translations.

Our intent is usually to ensure all skins have the same message. This change seems to be a negative from that point of view, unless I'm missing some obvious all-skins messages.

The intent of this change is to make all skins have the same message. Historically the message has varied across skins, so some disruption is expected as we stabilize new defaults.

Something went wrong with German-language labels, as pointed out here. They are now using long-obsolete translations.

Unfortunately, https://gerrit.wikimedia.org/r/761985 didn't make the branch cut so this will be the case until next week's deploy (see T302956). I was hoping to backport that today, after checking a few things, but I've run out of time.

Our intent is usually to ensure all skins have the same message. This change seems to be a negative from that point of view, unless I'm missing some obvious all-skins messages.

The intent of this change is to make all skins have the same message. Historically the message has varied across skins, so some disruption is expected as we stabilize new defaults.

Does this change also makes it easy to override that one default message? I assume yes.

I'm seeing label changes on enwiki, they appear to point to message names (e.g. Monobook-action-protect) however these messages are not initiated; can they still be used to override? They seem to be inconsistent, I'm seeing "Change protection" on some pages vs the overly verbose "Change protection for this page" or the even longer "Change protection settings for this page" on others in monobook. This default text is so long it is pushing other tabs over.

however these messages are not initiated; can they still be used to override

Yep, these can be overridden locally. Given German was impacted particularly badly I used that technique: https://de.wikipedia.org/wiki/Spezial:Beitr%C3%A4ge/Jon_(WMF) (Since this adds on-wiki debt, I'll remove this on Thursday when the changes have fully rolled out)

Basically <key> e.g. action-protect = message for all skins. <skinname>-<key> e.g. monobook-action-protect can be used to override on a per skin basis.

@Jdlrobson - can you point to the list of the "key"s and their now current default text?

The change to "Delete this page" and "Move this page" in Monobook is just annoying. What page could I possibly be interested in interacting with if not "this page", which is now displayed three times, taking up valuable screen estate. Monobook needs short labels to work well.

Seems like whatever pushed this is failing the acceptance criteria " To avoid any change to non-Vector skins, we will consider creating local overrides in the Monobook and Timeless skins (Modern and CologneBlue are in maintenance mode so we'll consider those separately)" - is a revert going to happen?

@Jdlrobson - can you point to the list of the "key"s and their now current default text?

They are in the description.

is a revert going to happen?

The issue is not about reverting a change, it's about https://gerrit.wikimedia.org/r/c/761985 not making the train cut or the backport window. I've added local wiki overrides for enwiki in the short term.
Edit: I'll aim to backport this first thing Monday.

Last change broke permissionserrorstext-withaction, because messages such as MediaWiki:Action-protect are part of this.

Last change broke permissionserrorstext-withaction, because messages such as MediaWiki:Action-protect are part of this.

They shouldn't be doing that. Message keys shouldn't be reused in different contexts. I'll create a bug (edit: T303012).

@Jdlrobson - can you point to the list of the "key"s and their now current default text?

They are in the description.

is a revert going to happen?

The issue is not about reverting a change, it's about https://gerrit.wikimedia.org/r/c/761985 not making the train cut or the backport window. I've added local wiki overrides for enwiki in the short term.
Edit: I'll aim to backport this first thing Monday.

Am I missing something? It seems like a lot of fancy wordsmithing is going on for what appears that some other change, that was expecting this referenced change, DID occur without making sure this dependency was there? Why wasn't that change just revertible?

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

[mediawiki/core@master] Update nstab-mainpage using on-wiki message values

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

Quiddity updated the task description. (Show Details)
Quiddity updated the task description. (Show Details)
Quiddity moved this task from To Triage to In current Tech/News draft on the User-notice board.

Change 767911 merged by jenkins-bot:

[mediawiki/core@master] Update nstab-mainpage using on-wiki message values

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

Is there a typo of Undelete 2 edit(s)? Seems to be Undelete $1 edits per translatewiki.net.

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

[mediawiki/core@master] [Skin] Remove legacy fallbacks in menu labels

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

Change 769068 merged by jenkins-bot:

[mediawiki/core@master] [Skin] Remove legacy fallbacks in menu labels

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

I will sign this off tomorrow.

Change 767911 merged by jenkins-bot:

[mediawiki/core@master] Update nstab-mainpage using on-wiki message values

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

In case you missed this comment:

@Krinkle wrote on Gerrit:

Cases where the WMF wikipedia language edition has customised their main page name, now have their name fed into the software for 1 message but nothing else. If this was desirable, translators would likely have done so already.

Many of these are now using a different label than the 'mainpage' and other 'mainpage-' messages. These should very rarely differ, if ever.

For example:

  • za.json: mainpage: "Yiebdaeuz", mainpage-description: "Yiebdeauz", mainpage-nstab: "Yiebdaeuz", tooltip-n-mainpage: "Raen Yiebdaeuz",
za.json
- "nstab-mainpage": "Yiebdaeuz"
+ "nstab-mainpage": "Feanzcieng"

Much the same situation for nb.json and others.

hak.json
+ "頭頁/Thèu-Ya̍p"

This seems to be very WMF-specific and inappropiate for the software in general.

Change 769805 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Add 'skin-' prefix to remaining nav item messages

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

Vector 2022 is now showing the modernized messages and there is a clearer separation between skin messages and action for messages now:

Screen Shot 2022-03-10 at 12.19.06 PM.png (704×2 px, 387 KB)

I am keeping an eye out for any bug reports. Translatewiki editors should feel free to adjust any messages that seem WMF-specific.

@Raymond We'd like to do one last follow-up on this, to leave this in a clean state and call this resolved. This renames several messages. To avoid losing translations would it be possible to do the rename inside TranslateWiki as I know the updating in code approach caused a few problems for translators last week..

Change 769805 merged by jenkins-bot:

[mediawiki/core@master] Add 'skin-' prefix to remaining nav item messages

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

Jdlrobson updated the task description. (Show Details)

I'm sorry but I'm not going to clean up the mess for you. Re-opening as reminder. Feel free to file a new task if you prefer that. In that case, please do tag it also as MW-1.38-release blocker, as we can't release the software like this.

Change 767911 merged by jenkins-bot:

[mediawiki/core@master] Update nstab-mainpage using on-wiki message values

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

@Krinkle wrote on Gerrit:

[…] If this was desirable, translators would likely have done so already.

Many of these are now using a different label than the 'mainpage' and other 'mainpage-' messages. These should very rarely differ, if ever.

For example:

  • za.json: mainpage: "Yiebdaeuz", mainpage-description: "Yiebdeauz", mainpage-nstab: "Yiebdaeuz", tooltip-n-mainpage: "Raen Yiebdaeuz",
za.json
- "nstab-mainpage": "Yiebdaeuz"
+ "nstab-mainpage": "Feanzcieng"

Much the same situation for nb.json and others.

hak.json
+ "頭頁/Thèu-Ya̍p"

This seems to be very WMF-specific and inappropiate for the software in general.