Show language autonyms on index page
The old behavior of showing the language code was mainly laziness –
showing language names in that language is rather nicer. We load the
autonyms once from the MediaWiki API and then cache them until the next
tool restart (I don’t think there’s any need to discard them after a
while, this data should really only change very rarely).
If the API response is unexpectedly incomplete, we log a warning, but
don’t do anything else. I don’t think there’s a better course of action
in this function – if I make load_language_info() return None, then the
next autonym (in this request, not the next one) will immediately
request the autonyms again, and the API probably won’t have recovered
that quickly. Hopefully someone will tell me that the autonyms on the
index page are gone, and then I can restart the tool and it’ll pick up
new language autonyms.