Page MenuHomePhabricator

Languages header should not change on pages without languages
Closed, ResolvedPublic


On the language button label changes from "0 languages" to "Languages"

This appears to be due to a piece of code in the ext.uls.interface

This code should not be applied to the newer version of Vector.

Event Timeline

Jdlrobson created this task.Thu, Feb 4, 8:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptThu, Feb 4, 8:09 PM

Change 661797 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/UniversalLanguageSelector@master] Don't apply heading change to modern Vector

Jdlrobson triaged this task as High priority.Thu, Feb 4, 8:13 PM
Jdlrobson added subscribers: Rileych, Nikerabbit.

cc @Nikerabbit @Rileych - the above patch was the simplest solution I could come up with, without any expertise of the extension. An alternative would be to remove this line of code - I'm not 100% what it's for, as this results in a flash of unstyled content (and inconsistent heading) e.g. compare with noting the flash of "In other languages" changing to "langguages"

This is connected with the discussion in T273144#6805993. The purpose of keeping the "languages" header even when there was no list was to keep a consistent place for people to find the language settings.
Conceptually, the list to change the content language was the main element, but we wanted to keep an access to settings (secondary but persistent) for consistency.

Makes sense. Then I think my patch here is appropriate as a stopgap for now, while we work out the new design.

Change 661797 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] Modern Vector should be compatible with ULS

Edtadros added a subscriber: Edtadros.

@Jdlrobson which is correct, "0 languages" or "Languages"?

Jdlrobson reassigned this task from Jdlrobson to Edtadros.Thu, Feb 18, 6:10 PM

@Jdlrobson which is correct, "0 languages" or "Languages"?

"0 languages"

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Navigate to a page with 0 languages.
✅ AC1: The Language button should read "0 languages"

Discussed this with @alexhollender today. I'm a bit concerned with the language used here: "0 languages" could be confusing to new users who don't have expectations for language switching, in particular on smaller wikis. Is it possible to go back to "Languages" without the switch from one to the other?

From standup - will close this task and add note on new copy into T275147: Empty state for language button and menu (short-term solution)

ovasileva closed this task as Resolved.Wed, Feb 24, 6:12 PM