Page MenuHomePhabricator

Don't require Special:MyLanguage for translatable page links
Closed, DeclinedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

If Help is a translatable page with the Translate extension, I want to be able to link to it like:

[[Help]]

instead of:

[[Special:MyLanguage/Help]]

to show the page name in the user interface language and have it direct the user to the appropriate language.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Almost never if a page is translatable do you want link to it with its normal link. It makes sense our of convenience to editors that a link to a translatable page should show and direct the user to the page in their language.

If users want to direct a user to the source language of the page, then they should link to it using [[Help/<lang code>]]

Benefits (why should this be implemented?):

  • Easier editing
  • Faster translation
  • Cleaner wikitext

Event Timeline

Lectrician1 renamed this task from Don't require Special:MyLanguage to Don't require Special:MyLanguage for translatable page links.Dec 9 2022, 8:05 PM

This is not easily possible due to caching. See T110489.

Tacsipacsi subscribed.

This is not the same as T110489, and has less serious caching issues:

  • T110489 asks that when the user navigates to https://wiki.example.org/wiki/Help and their browser sends Accept-Language: de HTTP header, they get German content. AFAIK our caches cannot be split on the Accept-Language header at the moment, and even if they could, Accept-Language: de, en would need to be cached separately from Accept-Language: de, en, fr (what if the source language of the page is Italian, and it has only Czech and French translation?), leading to much more cache entries.
  • This task asks that when [[Help]] appears in wikitext, and the UI language is set to German, the link text is German and the user is sent to the German page. Since the UI language cannot be changed for anonymous users on Wikimedia wikis (except for using the &uselang= hack used on Commons, but that bypasses some caches), this puts less strain on caches (frontend caches don’t need to be split at all, since those are only for anonymous users, while the parser cache can already be split by UI language – and that’s only one language, not a language chain, avoiding the issue of exponential number of cache entries). The link target itself could even be Special:MyLanguage, avoiding splitting the cache at all if the link text is overridden.

That being said, I oppose anything that uses the UI language, and want to see solutions that use the page language, for two reasons:

  • The UI-language-based solution discriminates logged-out users, who are forced to use the site with the default UI language (English). The page language isn’t tied to logging in.
  • It still increases cache fragmentation. Using the page language doesn’t, since one page has one page language.

If users want to direct a user to the source language of the page, then they should link to it using [[Help/<lang code>]]

But that’s a different page. There’s both https://www.mediawiki.org/wiki/Project:Help and https://www.mediawiki.org/wiki/Project:Help/en, with different source text, different page histories, different talk pages etc. You should find another solution. I’m still not convinced this task is worth the effort.

Hah, thanks! You're right, and I'm declining this per the last comment.