The mobile skin has traditionally used the template variable 'language_urls' in SkinTemplate to access the list of alternative languages of an article. We are now seeing a lot of friction and bugs as we try to move our codebase closer to core.
Question 1: What does 'language_urls' mean - is it acceptable for anything other than a real language to be in that list?
Over the course of 3 weeks however we have had 3 bugs that have added things that are not languages to this list. This has caused various noticeable problems with how languages works on mobile.
Question 2: Why do developers abuse it in this way - is there not a better more semantic way to do this?
Currently we have an issue live on all wikipedias which makes a language button show up on all pages - even those without articles. x https://en.m.wikipedia.org/w/index.php?title=Diggers_%26_Dealers&title=D... When the language button at the bottom of the screen is clicked it says "This page is available in 1 language: Edit links (Edit interlanguage links)
As a result I've now proposed a change for our skin to override this [1] so that we can control the list contents and override the effects of the hook.
This however is rather frustrating - especially given none of our template variables are documented and open to this kind of interpretation
Question 3: Should we document these template variables? If so where and how?
Thanks for your opinions on this matter.
[1] https://gerrit.wikimedia.org/r/99693