Closed Bug 1847998 Opened 1 year ago Closed 1 year ago

Add dynamic, targeted paragraph content for opt-in message

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
119 Branch
Iteration:
119.1 - Aug 28 - Sept 8
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.

  1. 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.
  2. 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.

Note to file a Jira ticket for this after discussing priority/sizing.

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 }?

Flags: needinfo?(francesco.lodolo)

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

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).

Flags: needinfo?(francesco.lodolo)

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

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

Attachment #9349095 - Attachment description: WIP: Bug 1847998 - Testing changes to Shopping actors → WIP: Bug 1847998 - Dynamic content string w actor changes
Assignee: nobody → emcminn
Attachment #9349095 - Attachment description: WIP: Bug 1847998 - Dynamic content string w actor changes → Bug 1847998 - Dynamic content string w actor changes
Status: NEW → ASSIGNED
Iteration: --- → 118.2 - Aug 14 - Aug 25
Priority: -- → P1
Whiteboard: [omc]
Attachment #9348944 - Attachment is obsolete: true
Iteration: 118.2 - Aug 14 - Aug 25 → 119.1 - Aug 28 - Sept 8
Blocks: 1850787
Pushed by emcminn@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b8fb541e7ea Dynamic content string w actor changes r=aminomancer,jhirsch,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: