After talking about T148118 with @Tgr I brought up that RESTBase redirects pages that are actually stored in the Commons project.
This can lead to I18n issues. Example:
https://de.wikipedia.org/api/rest_v1/page/mobile-sections/Datei%3APrussian_standard.jpg (German) redirects to https://commons.wikimedia.org/wiki/File:Prussian_standard.jpg (English).
On the desktop web site the page https://de.wikipedia.org/wiki/Datei:Prussian_standard.jpg shows the text in German, though.
The same seems to happen for Parsoid: https://de.wikipedia.org/api/rest_v1/page/html/File%3APrussian_standard.jpg redirects to https://commons.wikimedia.org/api/rest_v1/page/html/File%3APrussian_standard.jpg, resulting in English text.
I think we should stop redirecting for File pages, and potentially for global user pages, too.
Here's some extra info from my IRC chat with @Tgr in #wikimedia-reading on Dec. 20, 2016:
- IIRC this is handled by ForeignDBFile::getDescription() and that will just make a HTTP request to <commons description page>?action=render&uselang=<local wiki content language> and show that on the top of the editable part of the file page
- theoretically, you can have both local and remote file page for an image, and the contents of both will be displayed
- commons uses section titles like == {{intl:licensing}} == so that they can be shown in the right language when transcluded and the templates use various horrible hacks to change their text depending on what language you view them in. https://commons.wikimedia.org/wiki/Commons:Localization#Content_internationalization_methods has the gory details
- Are there any similar cases?
<tgr> global user pages. If you are asking about including content from a remote wiki, those are the only two cases I can think of