From d5f04670b68f3ef66c430164e16cb0fb8d8cf4f7 Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Mon, 17 Aug 2015 22:32:49 +0200 Subject: [PATCH] Simplify translatewiki.net links from Special:AllMessages * SearchTranslations was migrated to ElasticSearch, which does not support operators. * Full text search with content and message key is the simplest possible search and hopefully will be always supported in the future. By avoiding the "MediaWiki:" prefix for the key, we can hope to match message keys which are prefixed in translatewiki.net. * Per T70518, the message keys are now indeed indexed, so we can hope to find something. * Since T55656 was fixed, we can just search the available translation (or source text) and then let the tabs and facets help the user find the existing message in the correct language or the interface to translate it in the desired language. This makes results significantly more relevant, see an example with an abusefilter message. Before, the correct message isn't in the first page in any language. https://phabricator.wikimedia.org/F4160053 After, the top 5 results include the correct message and language. https://phabricator.wikimedia.org/F4160054 Change-Id: I0ab9b7c80513818a0776681eca9353845f6541d0 --- includes/specials/pagers/AllMessagesTablePager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/specials/pagers/AllMessagesTablePager.php b/includes/specials/pagers/AllMessagesTablePager.php index 8e4fbaaad2..60f642d9c3 100644 --- a/includes/specials/pagers/AllMessagesTablePager.php +++ b/includes/specials/pagers/AllMessagesTablePager.php @@ -306,9 +306,8 @@ class AllMessagesTablePager extends TablePager { 'title' => 'Special:SearchTranslations', 'group' => 'mediawiki', 'grouppath' => 'mediawiki', - 'query' => 'language:' . $this->getLanguage()->getCode() . '^25 ' . - 'messageid:"MediaWiki:' . $value . '"^10 "' . - $this->msg( $value )->inLanguage( 'en' )->plain() . '"' + 'language' => $this->getLanguage()->getCode(), + 'query' => $value . ' ' . $this->msg( $value )->plain() ] ), $this->msg( 'allmessages-filter-translate' )->text() ); -- 2.20.1