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

mobile_vs_desktop_search_box_ghost_text.png (473×780 px, 161 KB)

Event Timeline

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": "搜尋",

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 Medium 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-ARCHIVED board.
debt moved this task from Incoming 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

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

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

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:

Screen Shot 2016-10-29 at 19.13.28.png (104×1 px, 24 KB)

When my language is set to zh:

Screen Shot 2016-10-29 at 19.14.03.png (118×882 px, 27 KB)

  NODES
Idea 3
idea 3
Note 4
Project 7