Closed Bug 1899439 Opened 5 months ago Closed 4 months ago

Add a way to locally load experiment-localized messages

Categories

(Firefox :: Messaging System, task, P1)

task
Points:
2

Tracking

()

RESOLVED FIXED
129 Branch
Iteration:
129.1 - Jun 10 - Jun 21
Tracking Status
firefox129 --- fixed

People

(Reporter: aminomancer, Assigned: aminomancer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Right now, if you're working on a localized messaging experiment, testing your message locally can be pretty tedious, because once you add $l10n objects to the message, it can no longer be rendered. This basically forces you to add the $l10n objects as the final step. Do your development locally with the plain message, and then replace all the strings with $l10n objects once you're finished. But what if QA comes back to you with problems after that? Now you have to go back to development mode, requiring you to either 1) turn the $l10n objects back into strings, or 2) forgo local development, making modifications in experimenter and just waiting for the server to update. Either way it's pretty tedious.

Instead of all this, we can add a function that flattens $l10n objects back into strings, so you can locally edit the same exact message you're going to put into the experiment branch configuration. Since $l10n objects must have a text property anyway, containing the English string, it's straightforward to dynamically convert them back into strings. And doing this at runtime is better than writing a script or something to flatten the $l10n objects, because once you're finished editing the message, you want to put it back into experimenter. So you don't want to lose the $l10n objects permanently, you just want ASRouter to route a flattened version of the message.

We should lock this capability behind the devtools pref, since it does nothing in production except probably incur a minor performance hit.

Assignee: nobody → shughes
Status: NEW → ASSIGNED
Iteration: --- → 128.2 - May 27 - Jun 7
Points: --- → 2
Priority: -- → P1
Iteration: 128.2 - May 27 - Jun 7 → 129.1 - Jun 10 - Jun 21
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6ca02568bef Flatten experiment-translated messages in local providers so they can be rendered. r=negin,omc-reviewers,emcminn,frontend-codestyle-reviewers

Backed out for causing xcpshell failures in xpcshell/test_PanelTestProvider.js.

Flags: needinfo?(shughes)

I'd like to get rid of this EXPECTED_MESSAGE_COUNTS 🤦‍♀️ is testing the number of messages really necessary?

Flags: needinfo?(shughes)
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce5f71d58edc Flatten experiment-translated messages in local providers so they can be rendered. r=negin,omc-reviewers,emcminn,frontend-codestyle-reviewers
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: