Follows-up T291590: DiscussionTools markup appears in dropdowns on Special:MediaSearch:
- We call wfMessage()->inLanguage() in ResourceLoaderContext, which core responds to by turning off Message::$interface. It's unclear why this exists in core in the first place, but at least for RL I think we can skip that and restore it with setInterfaceMessageFlag().
The call to inLanguage() is here only because on static/cookieless endpoints like load.php we get the user language from a different source than for index.php requests. In the transition to NO_SESSION we plugged that by calling inLanguage() but another way could have been to feed RequestContext::getMain() somehow the right language to use for load.php, in which case we wouldn't have started calling this method and still had the interface flag.
Having said that, it is a mystery to me why this is turned off by Message::inLanguage() in the first place, so we should look at why that was, and more importantly look at the current state of the world in terms of when something checks Message::$interface and how that affects MessageCache and Parser today. Once we understand that, we'll know if it is actually sensible to restore this in RL or to do it everywhere.
- We set wfMessage()->title() with the famous "Dwimmerlaik" placeholder (codesearch). The placeholder is needed because RL primarily operates in a statically-cached context and not setting it to something will produce a warning, but also if we don't set it and we call RL outside its static context (e.g. embedded preview/private modules) would wronlgy expose those to the title of the current page view and potentially poison a shared cache.
This should be updated to the newer pattern used in other parts of core where the placeholder is in NS_SPECIAL instead of NS_MAIN, and uses "Badtitle" with an explaination rather than a cryptic Tolkien reference.