Page MenuHomePhabricator

Put SITENAME in search box placeholder "searchsuggest-search" like in MobileFrontend's "mobile-frontend-placeholder"
Closed, ResolvedPublic

Description

Mobile Frontend has "Search {{SITENAME}}" sitting in the searchbox.
But switching back to desktop, one only sees "Search".
Seen on http://radioscanningtw.jidanni.org/

Adding in an image that shows the mobile treatment on the top and the desktop on the bottom with the search box ghost text noted by an arrow:
https://en.m.wikipedia.org/wiki/Main_Page and https://en.wikipedia.org/wiki/Main_Page

Event Timeline

Jidanni created this task.Sep 2 2016, 9:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 2 2016, 9:34 PM

Indeed.
Placeholder in mobile says 搜尋 台掃
Placeholder in desktop says 搜尋

Translation in zh-hant.json of MobileFrontend says: "mobile-frontend-placeholder": "搜尋 {{SITENAME}}",
Translation in zh-hant.json of MediaWiki Core says: "searchsuggest-search": "搜尋",

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptSep 4 2016, 1:55 PM
Aklapper renamed this task from Put SITENAME in search box, just like Mobile Frontend to Put SITENAME in search box placeholder "searchsuggest-search" like in MobileFrontend's "mobile-frontend-placeholder".Sep 4 2016, 1:55 PM
debt triaged this task as Normal priority.Sep 6 2016, 5:23 PM
debt updated the task description. (Show Details)
debt edited projects, added Discovery-Search (Current work); removed Discovery-Search.
debt moved this task from Needs triage to UX on the Discovery board.
debt moved this task from in progress to UI on the Discovery-Search (Current work) board.
debt added subscribers: Jdrewniak, CKoerner_WMF.

Change 315501 had a related patch set uploaded (by Jdrewniak):
Adding SITENAME to search box placeholder

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

debt assigned this task to Jdrewniak.Oct 12 2016, 1:12 PM

Change 315501 merged by jenkins-bot:
Adding SITENAME to search box placeholder

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

debt closed this task as Resolved.Oct 14 2016, 9:43 PM
Nirmos added a subscriber: Nirmos.Oct 27 2016, 7:50 PM

Was this really a good idea? The search indices for Wikipedia, Wiktionary etc will soon be merged and grouped by language, so this will have to be removed.

Was this really a good idea? The search indices for Wikipedia, Wiktionary etc will soon be merged and grouped by language, so this will have to be removed.

Given that the current plans are for the primary results that will be shown to the user are for the wiki that they're on, it's probably good that it's displayed. If not, the change is relatively simple, so it can be reverted fairly easily. :-)

Was this really a good idea? The search indices for Wikipedia, Wiktionary etc will soon be merged and grouped by language, so this will have to be removed.

Given that the current plans are for the primary results that will be shown to the user are for the wiki that they're on, it's probably good that it's displayed. If not, the change is relatively simple, so it can be reverted fairly easily. :-)

I'm afraid this should be reopened, because Shwangtianyuan told that after patch merged, the {{SITENAME}} on zhwiki is now "Wikipedia" instead of "維基百科/维基百科"

I'm afraid this should be reopened, because Shwangtianyuan told that after patch merged, the {{SITENAME}} on zhwiki is now "Wikipedia" instead of "維基百科/维基百科"

I've investigated this. It appears that this issue is in fact an issue with the wiki's setup, not with this implementation of this task. The message in question is MediaWiki:Searchsuggest-search which does not appears to be using the overriden Template:SITENAME, instead using the default value which is "Wikipedia". These kinds of issues crop up all the time on zhwiki due to the code that handles switching between the different kinds of Chinese writing. I'll see if I can fix it.

I believe that this edit fixed it. You may need to clear your browser cache for the update to happen.

I was partially correct that above; the local template is actually called {{Sitename}} not {{SITENAME}}. Now that the message is pointing to that template rather than the default, it translates the sitename based on the user's interface language.

If this doesn't fix it, please let me know.

When my language is set to en:

When my language is set to zh: