Page MenuHomePhabricator

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


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 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 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:

Screen Shot 2018-07-09 at 2.37.38 PM.png (245×848 px, 40 KB)

Screen Shot 2018-07-09 at 2.36.54 PM.png (251×762 px, 37 KB)

Event Timeline

Mormegil created this task.

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

Jdlrobson raised the priority of this task from Low to Medium.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

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

This was merged Monday, July 9th and should be available for testing in prod. E.g.,

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