On 11/10/15, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Nov 10, 2015 at 4:00 PM, Brian Wolff bawolff@gmail.com wrote:
On 11/10/15, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
Also, if page content can vary based on user language, what to do about
bug
reports that Special:WhatLinksHere, category listings, file usage data at the bottom of file description pages, and so on don't report a link/template/category/file that only exists on the page when it's viewed in a non-default language? Yeah, we already have that with {{int:}}
hacks,
but you're talking about making it more of a feature.
If I remember correctly, we already parse the page once in the user language, and once in the content language (canonical parser options) in order to prevent this issue.
We parse in the content language to avoid T16404 https://phabricator.wikimedia.org/T16404, which is somewhat the opposite.
My concern here is that if varying page content on user language becomes a supported thing, people will probably complain that {{#ifeq:{{USERLANG}}|en|[[Category:Foo]]|[[Category:Bar]]}} (or the equivalent in Lua) on a site with 'en' as the default won't show the page when you look at Category:Bar, even though it probably will show Category:Bar at the bottom of the page in non-English languages.
T16404 https://phabricator.wikimedia.org/T16404 was about the fact that doing the equivalent with {{int:}} hacks used to sometimes put the page in Category:Foo and sometimes in Category:Bar, depending on the language of whoever last edited (or null-edited) the page.
Ah. I read your previous email too fast.
Maybe we should have something like:
{{#langswitch: en=foo fr=le foo .. }}
which works like normal #switch, except without dead-branch elimination. (And for bonus points, implements language fallback sanely).
Or maybe an in-core feature {{#langtransclude:foo}}, which works like normal {{foo}}, except it translcudes the language subpage instead (and does smart fallback, and records a transclusion link record for all the 2-3 letter subpages of the template).
Whatever else we do, I'm really not a fan of the syntax that translate extension does. If we implement something in core to make multilingualism easier, I really hope we go with more sane syntax. [And I say that as a person who love's MW's general crazy syntax]
-- -bawolff