Add dynamic, targeted paragraph content for opt-in message
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: aminomancer, Assigned: emcminn)
References
(Blocks 1 open bug)
Details
(Whiteboard: [omc])
Attachments
(1 file, 1 obsolete file)
See the versions in Figma link. The one on the left has Amazon first, the one on the right has Best Buy first.
We would like to make 3 different versions of the opt-in message, where the order of the shopping site names is different for each version. So if you're on Amazon, and you see the sidebar, the opt-in message should be the version that lists Amazon first in paragraph 1 of the opt-in message copy. And if you're on Best Buy, you'd get the version that lists Best Buy first.
This requires 2 things.
- Some way to handle site targeting. Either integration with ASRouter (back burnered for now), or custom logic to check the current site and branch out into 3 message definitions (or 3 different paragraph strings). Ideally, this should be localizable in the long term, but it's not necessary for the MVP.
- Splitting what we have now (1 message) into 3 messages.
We still need to discuss the relative priority of this and whether we can squeeze it in for the MVP. I think we will be able to discuss in a meeting next week.
Reporter | ||
Comment 1•2 years ago
|
||
Note to file a Jira ticket for this after discussing priority/sizing.
Assignee | ||
Comment 2•2 years ago
|
||
Reporter | ||
Comment 3•2 years ago
|
||
Hey flod I have a technical question. Is there anything wrong with adding third-party brand names like Best Buy
, Walmart
and Amazon
? If not, where would be an appropriate place to add these? Does it work to just add them to shopping.ftl like this?
-bestbuy-brand-name = Best Buy
-walmart-brand-name = Walmart
-amazon-brand-name = Amazon
and then the messages in shopping.ftl can reference them like { -bestbuy-brand-name }
?
Comment 4•2 years ago
•
|
||
flod, related is is it any better/worse to instead use variables { $siteName1 }
instead of Amazon
or { -amazon-brand }
in 3 similar strings that have the sites in different order?
E.g.,
with-vars = … { $site1 } … { $site2 } and { $site3 }
vs
amazon-first-using-terms = … { -amazon-brand } … { -walmart-brand } and { -best-buy-brand }
walmart-first-hardcoded = … Walmart … Amazon and Best Buy
best-buy-first = … Best Buy … Amazon and Walmart
Comment 5•2 years ago
|
||
We want to reserve Fluent terms for Mozilla brandings. I think it's OK-ish to use variables in this case, and explain what are the possible values in comments (brand names in English, from this list).
Reporter | ||
Comment 6•2 years ago
•
|
||
Do you mean something like this?
# What about this?
our-message = { $siteName1 ->
[bestbuy] 访问百思买,然后访问亚马逊,然后访问沃尔玛。
[walmart] 参观沃尔玛,然后是百思买,然后是亚马逊。
[amazon] 访问亚马逊,然后是百思买,然后是沃尔玛。
}
I think an issue with just passing $siteName1
from JS is that in some languages, these brand names are probably not ordinarily written in English. It's also potentially jarring for RTL scripts. But from what I've seen it's possible to add this kind of switch statement in fluent
Comment 7•2 years ago
|
||
No, the variables would set in the code and always contain the name in English.
Variants are not a valid option for this
https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#variants-and-plurals
Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•1 years ago
|
Comment 10•1 years ago
|
||
bugherder |
Description
•