Add a way to locally load experiment-localized messages
Categories
(Firefox :: Messaging System, task, P1)
Tracking
()
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 | ||
Comment 1•5 months ago
|
||
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Comment 3•4 months ago
|
||
Backed out for causing xcpshell failures in xpcshell/test_PanelTestProvider.js.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/asrouter/tests/xpcshell/test_PanelTestProvider.js | xpcshell return code: 0
Assignee | ||
Comment 4•4 months ago
|
||
I'd like to get rid of this EXPECTED_MESSAGE_COUNTS
🤦♀️ is testing the number of messages really necessary?
Comment 6•4 months ago
|
||
bugherder |
Description
•