Page MenuHomePhabricator

Allow "go" search feature to reach messages
Closed, ResolvedPublic

Description

As a translator or interested MediaWiki user, if I already know the key of a message, I want to reach it with one click from the translatewiki.net main page, without special knowledge of the site's functioning being required.


Details follow if the issue is not clear enough for the reader.

Context: the new main page suppresses all the normal wiki elements, including the search bar. The new search, based on Special:SearchTranslations, doesn't search normal pages nor bring to pages with exact title matches (called "go" feature in monobook and internals, default for Vector's search). Two solutions come to my mind:

  • restore the normal search bar on the main page (the new one is made visible enough by its huge size),
  • make the new search work with exact title matches.

Workarounds used currently:

  1. entering the page title directly in the location bar (requires knowledge of the wiki's structure and of the browser location bar's functioning),
  2. entering the page title with interwiki prefix in the browser's search (requires a properly configured Firefox or other equally good browser and knowledge of the interwiki prefix),
  3. reaching the actual search bar (Special:Search-based) by clicking one of the five links at the very bottom of the page, or the username link in the personal tools (requires knowledge of the wiki's structure and it's very slow).

Filed on behalf of Nnemo: https://www.mediawiki.org/wiki/Thread:Template_talk:Extension/Link_to_translatewiki/reply_(6).


Version: master
Severity: enhancement

Details

Reference
bz60570

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz60570.
bzimport added a subscriber: Unknown Object (MLST).
Nemo_bis created this task.Jan 29 2014, 8:34 AM

Before I forget again, a somehow similar messageid operator exists to search by message key (without language subpage), e.g. https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&query=messageid%3A%22MediaWiki%3ATitlematches%22 (first revealed by Nikerabbit in https://gerrit.wikimedia.org/r/#/c/94064/2/includes/specials/SpecialAllmessages.php).

He7d3r added a comment.EditedFeb 3 2014, 4:12 PM

[offtopic] Just in case someone else likes it, I use this a script like this to easily get from a WMF wiki to Translatewiki:

// Add a link to Translatewiki above the interface messages
if ( 8 === mw.config.get( 'wgNamespaceNumber' ) ) {
	mw.util.addPortletLink(
		'p-namespaces',
		'//translatewiki.net/wiki/' +
			mw.util.wikiUrlencode( mw.config.get( 'wgPageName' ) ) +
			'/' + mw.config.get( 'wgUserLanguage' ),
		'Translatewiki',
		'ca-trans',
		'See this message on Translatewiki.net'
	);
}

I'd like to discuss expected behaviour here. We have Special:Translations for a list of all translations of a key. For example https://translatewiki.net/wiki/Special:Translations/MediaWiki:Show.

You could search for "MediaWiki:Show" on the main page, or for "Show".

  1. What would be expected behaviour, and
  2. What would the algorithm look like that makes the decision?

Suggestion: I think the easier way would be a two click work flow. Similar to a "Did you mean". We can have Special:SearchTranslations do a check for keys that match the search term, and if it finds something, we could add a link to Special:Translations/<key> at the top of the search results.

How does that sound?

(In reply to Siebrand Mazeland from comment #3)

How does that sound?

It sounds like a separate feature requests, unless Nnemo disagrees on my interpretation of his request. The "go" search feature only checks title match; optionally you could pick an appropriate langcode subpage.

Nnemo added a subscriber: Nnemo.Mar 5 2015, 7:22 PM
Nnemo updated the task description. (Show Details)Mar 5 2015, 7:45 PM
Nnemo set Security to None.
Nnemo added a comment.Mar 5 2015, 7:51 PM

I think that @Nemo_bis has understood my request correctly. You may see the edited link to the discussion in the task's description.

Change 196140 had a related patch set uploaded (by Phoenix303):
Search message with message key without interwiki prefix

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

Change 226335 had a related patch set uploaded (by Phoenix303):
Search with exact title match

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 22 2015, 7:14 PM

Change 226335 merged by jenkins-bot:
Search with exact title match

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

The "go" search feature only checks title match; optionally you could pick an appropriate langcode subpage.

More: that's definitely T70518: Special:SearchTranslations: allow messageid with ElasticSearch (we already take care of language scoring etc. there). This is for Special:Search-like "go" title match, while that's for the generic message key search.

Phoenix303 closed this task as Resolved.Aug 19 2015, 7:36 AM
Phoenix303 claimed this task.
Nikerabbit reopened this task as Open.Aug 28 2015, 1:25 PM

This works, but let's consider the (believed) common scenario:

  1. Go to translatewiki.net main page
  2. Write or paste message name to the search box, for example MediaWiki:Newarticletext/fr

This will not show the search message (unless your interface language is French), because it appends language=<interface language> to url parameters. I think we should ignore the language parameter in this case to "do what I mean".

Change 196140 abandoned by Nikerabbit:
Search message with message key

Reason:
Does not rebase cleanly, and I think we can resolve our use cases in other ways.

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

Change 236403 had a related patch set uploaded (by Phoenix303):
Ignore language parameter in the query when url parameter 'language' is present.

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

Change 236403 merged by jenkins-bot:
Ignore the language query parameter when a title with language subpage is given.

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

Nikerabbit closed this task as Resolved.Oct 5 2015, 10:18 AM