Page MenuHomePhabricator

Recording: "Click on $1 below" i18n variable not replaced on Special:RecordWizard step 4
Closed, ResolvedPublic6 Estimated Story PointsBUG REPORT

Description

Twin with T281038
List of steps to reproduce (step by step, including full links if applicable):

What happens?:

  • The help message states Click on $1 below, then read the word aloud

image.png (617×969 px, 35 KB)

What should have happened instead?:

  • The $1 variable should either be replaced with a translatable phrase, or properly replaced. E.g:

image.png (612×954 px, 35 KB)

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Avenues:
In the Record Wizard, Step 4: Studio, this sentence is displayed ("Click on $1 below, then read the word aloud").
Likely a broken variable transmission or something.

This icon changes if we switch to handsign video recording. Thereby:

  • if language's media audio, then mic-blue.svg
  • if language's media video, then hands-blue.svg

See ext.studio.css#L259-L268

See also :

Event Timeline

Yug renamed this task from i18n variable not replaced on Special:RecordWizard step 4 to "Click on $1 below" i18n variable not replaced on Special:RecordWizard step 4.Jul 6 2022, 10:48 AM
Yug triaged this task as High priority.
Yug raised the priority of this task from High to Unbreak Now!.Jul 6 2022, 10:50 PM
Yug updated the task description. (Show Details)
Yug renamed this task from "Click on $1 below" i18n variable not replaced on Special:RecordWizard step 4 to Recording: "Click on $1 below" i18n variable not replaced on Special:RecordWizard step 4.Jul 7 2022, 3:07 PM

The en.json messages files in English has this precise two messages.

	"mwe-recwiz-studio-info-audio": "Click on $1 below, then read the word aloud.",
	"mwe-recwiz-studio-info-video": "Click on $1 below, then say the word in sign language",

They are then used in /specials/templates/studio.mustache

		<div id="mwe-rws-info-audio" class="mwe-rw-info">
			{{&_ "mwe-recwiz-studio-info-audio" "<i></i>"}}
		</div>
		<div id="mwe-rws-info-video" class="mwe-rw-info">
			{{&_ "mwe-recwiz-studio-info-video" "<i></i>"}}
		</div>

This is the only case of value replacement within .mustache file. Other occurrence are done via vue.js files.

The system is supposed to do the replacement of $1 by <i></i> here must be broken somehow.

To test the solution :
Record wizard, got to step 4 : Studio. "$1" is visible.
Open the inspector, open the console tab, paste and run :

$("#mwe-rws-info-audio").html($("#mwe-rws-info-audio").text().replace("$1","<i></i>"));
$("#mwe-rws-info-video").html($("#mwe-rws-info-audio").text().replace("$1","<i></i>"));

It will then display properly.

tstarling lowered the priority of this task from Unbreak Now! to High.Jul 15 2022, 6:15 AM
tstarling added a subscriber: tstarling.

I don't think this is "unbreak now". See https://www.mediawiki.org/wiki/Phabricator/Project_management#Priority_levels for information about setting task priority.

Yug set the point value for this task to 6.Jul 21 2022, 6:22 PM

@0x010C , please be aware of the recent and dirty JS fix in MediaWiki:Common.js.

Done in commit 4addc776.
The mustach helper function used for I18n was not supporting message parameters.