Page MenuHomePhabricator

Display translated page title in search results
Open, NormalPublic

Description

Hi,

We discussed with one user on this topic : https://www.mediawiki.org/wiki/Topic:T309ediwdcwhm1nn, and we couldn't find how to do this :

When using Translate extension, we have the possibility to translate page title. But when you try to search for this title, you only have "Nom page/en" for instance for a page translated in English, instead of the page name.

Is it possible to have an option to display translated title in the search results ?

Details

Related Gerrit Patches:
mediawiki/extensions/CirrusSearch : master[WIP] Search against the display_title property
mediawiki/core : masterInclude display title in search results
mediawiki/extensions/CirrusSearch : masterAdd display_title to mappings

Event Timeline

Tuxxic created this task.Aug 19 2016, 9:01 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2016, 9:01 AM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptAug 19 2016, 10:49 AM
debt triaged this task as Normal priority.Sep 1 2016, 10:21 PM
debt moved this task from needs triage to This Quarter on the Discovery-Search board.

I saw something interesting in this post, for whoever might be interested in implementing this:
https://www.mediawiki.org/wiki/Topic:Sriim4n0ku6apszw

You can use the

{{Translations:Page name/Page display title{{#translation:}}}}

model, to get the translated page title if it exists.

While mostly a hack, the most direct method to deal with this would be some integration to make redirects from the translated name to the actual page.

Nikerabbit added a subscriber: Nikerabbit.EditedSep 14 2018, 3:43 PM

The display title is also available in the database in page props. Doing redirects has the usual issue of name conflicts between languages and possible "violations" of doing cross namespace redirects if the namespaces names are also translated.

Change 460958 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] [WIP] Include display title in search results

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

Change 460959 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings and start indexing it

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

Change 460960 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] [WIP] Search against the display_title property

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

Change 460991 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings

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

This is now blocked until roughly december waiting for data to populate the indices before it can be used

This should be about ready to be unblocked (timeline is right, we can't actually check how many pages have display_title currently, since it's not in the mappings). Deploying this requires an in-place reindex across all wikis which can take a week to run. For this reason we should try and coordinate this with any other mapping changes that need to go out.

Last step before deploy:

Deployment: