"Search within pages" message is always in content language
Closed, ResolvedPublic

Description

The MobileFrontend's search functionality displays the mobile-frontend-search-content-no-results message (currently set to '''{{int:mobile-frontend-search-content}}''' to see if this phrase appears anywhere.), using an embedded {{int:mobile-frontend-search-content}} to insert a bolded Search within pages phrase.

However, the construction (together with the message definition) causes the embedded {{int:}} to use the content language of the wiki instead of the user's UI language like the rest of the message. That means the users sees a bilingual mixed message whenever she uses a different UI language than the wiki content language.

For instance: go to https://cs.m.wikipedia.org/wiki/X?uselang=en and write some nonsense to the search box. You'll get "No page with this title. Hledat v obsahu stránek to see if this phrase appears anywhere." with a Czech translation of the subphrase within the English message. (Or vice versa: go to https://en.m.wikipedia.org/wiki/X?uselang=cs and write some nonsense there, and you'll get "Neexistuje žádná stránka s tímto názvem. Search within pages, zda se tento text někde neobjevuje.")

This bug have probably been reported already at T74985, which is now Closed, Invalid. Not sure if something changed since then or not, but this is definitely a bug, so the resolution does not make much sense to me.

Developer notes

Some screenshots illustrate the problem:


Mormegil created this task.Jul 9 2018, 9:10 PM
Mormegil triaged this task as Low priority.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 9 2018, 9:10 PM

Change 433082 had a related patch set uploaded (by Mormegil; owner: Mormegil):
[mediawiki/extensions/MobileFrontend@master] Fix parsing/i18n of no-results message

https://gerrit.wikimedia.org/r/433082

Jdlrobson raised the priority of this task from Low to Normal.Jul 9 2018, 9:39 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: alexhollender, Jdlrobson.

Thanks @Mormegil for taking the time to explain this. I understand this now and have merged your patch. I've added to our sprint board to make sure this also gets reviewed by our designer and goes through some testing.

@alexhollender let me know if the description is not clear. You can test this on http://reading-web-staging.wmflabs.org/wiki/Main_Page?uselang=es#/search

Restricted Application added a project: Readers-Web-Backlog. · View Herald TranscriptJul 9 2018, 9:45 PM

Change 433082 merged by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Fix parsing/i18n of no-results message

https://gerrit.wikimedia.org/r/433082

ovasileva reassigned this task from ABorbaWMF to Ryasmeen.Jul 12 2018, 5:41 PM
ovasileva added a subscriber: ABorbaWMF.

This was merged Monday, July 9th and should be available for testing in prod. E.g., https://cs.m.wikipedia.org/wiki/X?uselang=en.

ovasileva closed this task as Resolved.Jul 19 2018, 10:29 AM
ovasileva added a subscriber: ovasileva.

all done here!

Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptSep 13 2018, 6:39 PM