Page MenuHomePhabricator

Use page content language to determine if Wikispeech can run
Closed, ResolvedPublic1 Estimated Story Points

Description

The Wikispeech frontend correctly makes use of the page content language to set the language used when calling the WikispeechListenAPI for synthesis.

The check for whether the Wikispeech UI should be displayed on a page however looks at the interface languge.

The behaviour can be replicated by:

  1. going to a Swedish language page and setting ?pagelang=de (player disappears)
  2. going to a German language page and setting ?pagelang=sv (player appears)

Event Timeline

The frontend calls language = mw.config.get( 'wgPageContentLanguage' );

T248162: Use revision and segment ID as input for synthesizing speech will have to figure out how to get the page content language as well since it makes sense to get this together with the text

Lokal_Profil set the point value for this task to 5.Jul 9 2020, 10:17 AM

The patch for this should also introduce a test

Change 619468 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[mediawiki/extensions/Wikispeech@master] Trigger Wikispeech UI on PageContentLanguage, not interface language

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

Lokal_Profil changed the point value for this task from 5 to 1.Aug 20 2020, 8:09 AM

Change 619468 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Trigger Wikispeech UI on PageContentLanguage, not interface language

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