https://bugzilla.wikimedia.org/show_bug.cgi?id=57091

--- Comment #12 from Jon <[email protected]> ---
(In reply to comment #11)
> (In reply to comment #10)
> > So if I understand correctly you now annotate these phantom languages with a
> > class? I haven't taken a closer look at the code yet and am not 100% clear
> 
> The languages have class, non-languages don't.

Got it.

> > but this still seems a little hacky to me
> 
> Yes it is. The whole related code is filled with comments saying "hack". We
> were looking for a solution of least effort here, instead of big rewrites.
>
OK as long as that's clear. I understand the need for a solution of least
effort - we encounter this problem all the time in mobile - but I do worry
about hacks as MediaWiki is already full of them and this suggests hacks tend
to stay around for a long time which makes me sad. I think this is a bigger
picture question off topic for this thread - why are non-hacks so much effort?

> > and semantically incorrect.. a list of languages should only contain
> > languages
> > surely?
> 
> Only if someone declares it as a list of languages. I'd rather see it as a
> way
> to access different language versions without specifying the functionality ;)

Well someone /did/ declare it as a list of languages - the element id attribute
value of the list itself is #p-lang-list :). uls-p-lang-dummy is not a language
link so shouldn't be in that list period.

From mobile's perspective, we can iterate through the list of languages and
strip out any elements which have don't have this new class (although to do
that we will have to do a string search for each class in the list - and in
pages with lots of languages that could be 200+ checks). Thus it's still not
ideal, as most of these elements in mobile are inactive due to JavaScript and
CSS not being loaded (it would actually be better not to add them in the first
place if you detect you are in mobile mode -
MobileContext::singleton()->shouldDisplayMobileView();). That said it's
definitely more workable and future proof then the existing solution but seems
an unnecessary step.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to