Add direct links to translation interface on Special:AllMessages
The local Special:AllMessages page is the first and most friendly place
where average users will look for the message and try to translate it:
when they find it, add a link to translatewiki.net so that they can start
translating without searching for it from scratch.
Special:SearchTranslations is the only target usable for this: the solr
search is smart enough to present the most relevant results first and the
translation interface is directly available in place.
On the bright side, similar messages popping up from other projects or areas
of the code will provide suggestions and help find other occurrences of
translations which can similarly be improved.
More specifically, we are using a combined language, key and text search:
* the English text is the only thing guaranteed to exist, if the message is
available, though quoting it can give some false negatives and not quoting
it would give it too much weight if it's long;
* the key can be used thanks to the feature revealed by Niklas Laxström in
comments to this patch: it is simpler to handle but allows only exact matches
and can be wrong if TWN adds a prefix for the extension, so it can't be used
alone, but in the best case it's what we're looking for;
* the language makes sense in combination with the key match.
We boost key and language to get the current translation of the message where
possible; if it's not, the first result will usually be English text.
https://wiki.apache.org/solr/SolrQuerySyntax
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html
From the initial search, the user can further refine its search and navigate
the interface to find the message(s) and editor where to add or edit the
translation.
Change-Id: I8de3faba829c50cdc0f2d09726f738c585792e00