Page MenuHomePhabricator

Add support for fallbacks on Special:MyLanguage
Closed, ResolvedPublic

Description

Currently Special:MyLanguage doesn't have fallback support if the target page does not exist. It goes to the root page by default.

It would be nice to have language fallbacks enabled, especially for languages such as zh and its variants.

See also:

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:23 AM
bzimport set Reference to bz48292.
bzimport added a subscriber: Unknown Object (MLST).

Currently [[Special:MyLanguage/Page/de]] will attempt to access pages in the following order:

  • Page/<uilang>
  • Page/de
  • Page

Not sure what the intention of linking to [[Special:MyLanguage/Page/de]] in the first place, but I propose the following:

  • Page/<uilang>
  • Page/de
  • Page/<uilang-fallback(s)>
  • Page

So that it doesn't break current links

  • Bug 50493 has been marked as a duplicate of this bug. ***

btw It's mentioned in bug 50493 that the URL param &variant= should be used.

So the chain should be:

  • Page/<uilang>
  • Page/<parentlang-of-uilang-with-variant=uilang> (This page is guaranteed to be un uilang)
  • Page/de
  • Page/<uilang-fallback(s)>
  • Page

I would move Page/de just before Page. Would you be able to come up with a patch that is backwards compatible to MW 1.20?

(In reply to comment #4)

I would move Page/de just before Page. Would you be able to come up with a
patch that is backwards compatible to MW 1.20?

Copy the code of getParentLanguage to Extension:Translate?

or just ignore this item when that function is not there?

(In reply to comment #4)

I would move Page/de just before Page.

Note than en is always in the fallback chain.

I'm moving this back to MediaWiki core as the special page was moved there.

Bumping this gently, since this type of fallback has been requested by community members on Meta this week (in the context of the current workaround being somewhat unintuitive and people being redirected back to English if it's not done exactly right). Any chance someone could make this happen?

Change 266785 had a related patch set uploaded (by BryanDavis):
Support language fallbacks for Special:MyLanguage

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

bd808 set Security to None.

Change 266785 merged by jenkins-bot:
[mediawiki/core@master] Support language fallbacks for Special:MyLanguage

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

@matej_suchanek:

Is this done?

Still unlucky, by clicking Meta:About in Meta:Sandbox (oldid=18098392) URL still navigated me to the English page rather than Meta:About/zh.

This bug hasn't been fixed for more than SIX YEARS?

It does happen still now. Fo example, my ui language is zh-cn, which is a variant of zh. But Special:MyLanguage doesn't redirect to the zh translation with the cn variant, which means I should click "中文" in the language box and set the variant from "不转换" (not convert) to "大陆简体" (zh-cn).

@SolidBlock: Age of a task is entirely irrelevant. Please see https://www.mediawiki.org/wiki/Bug_management/Development_prioritization for more information - thanks.

Nikerabbit claimed this task.

This is actually done. Copying my response from https://gerrit.wikimedia.org/r/c/mediawiki/core/+/675291:

The underlying cause, which makes Chinese not work here, is that none of the Chinese languages include zh in their fallbacks. Adding zh to their fallback chains should be a simple fix, assuming there aren't any negative side effects.

We can deal with that in the context of T278639: Add language redirects or backwards fallbacks for Special:MyLanguage or T182485: zh falls back to zh-hans, why?.