Page MenuHomePhabricator

Add PhonosInlineAudioPlayerMode
Closed, ResolvedPublic3 Estimated Story Points

Description

Add a new configuration variable (PhonosInlineAudioPlayerMode) that prevents Phonos from rendering any IPA (either passed via the ipa parameter, or retrieved via a wikibase item), but allows the playing of audio files (either passed via the file parameter, or retrieved via a wikibase item).

This also allows for the completion of the Inline Audio-Player for pronunciations and other usages proposal.

Acceptance criteria

  • With PhonosInlineAudioPlayerMode set to false (default), Phonos will render IPA passed via the ipa parameter
  • With PhonosInlineAudioPlayerMode set to false (default), Phonos will render IPA retrieved via the wikibase parameter
  • With PhonosInlineAudioPlayerMode set to false (default), Phonos will play an audio file specified by the file parameter
  • With PhonosInlineAudioPlayerMode set to true, Phonos will not render IPA passed via the ipa parameter
  • With PhonosInlineAudioPlayerMode set to true, Phonos will not render IPA retrieved via the wikibase parameter
  • With PhonosInlineAudioPlayerMode set to true, Phonos will play an audio file specified by the file parameter

Further work/considerations

Event Timeline

Restricted Application added a subscriber: Aklapper. Β· View Herald Transcript

Change 900634 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] Phonos: Add PhonosInlineAudioPlayerMode config variable

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

Change 900634 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: Add PhonosInlineAudioPlayerMode config variable

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

TheresNoTime set the point value for this task to 3.Mar 27 2023, 3:11 PM

@TheresNoTime just some thoughts about wording of existing errors. I am happy to raise them as separate bugs if you would prefer.

With $wgPhonosInlineAudioPlayerMode = true, if you put a Phonos tag like <phonos text="tomato" lang="en-AU" /> the error message states:

Either IPA, a file, or a Wikibase item must be provided.

Which is not strictly true.

Perhaps phonos-param-error should be changed to remove the reference to IPA when $wgPhonosInlineAudioPlayerMode is true, or we should display the new phonos-inline-audio-player-mode message instead.

If no audio and no IPA can be found for a wikidata item/lexeme, the error message is:

No IPA transcription found.

Which might mislead users into thinking IPA is supported. Then, if they do pass a wikidata item with an IPA transcription, they will be shown the new phonos-inline-audio-player-mode message.

@TheresNoTime just some thoughts about wording of existing errors. I am happy to raise them as separate bugs if you would prefer.

These are good points, but would you mind logging them as separate tasks?

@TheresNoTime just some thoughts about wording of existing errors. I am happy to raise them as separate bugs if you would prefer.

These are good points, but would you mind logging them as separate tasks?

I've raised T334961.

Change 910800 had a related patch set uploaded (by Samtar; author: Samtar):

[operations/mediawiki-config@master] InitialiseSettings-labs: Set Phonos config on testwiki.beta

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

Change 910800 merged by jenkins-bot:

[operations/mediawiki-config@master] InitialiseSettings-labs: Set Phonos config on testwiki.beta

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

Have set wgPhonosInlineAudioPlayerMode to true on test.wikipedia.beta for deployment testing