Closed Bug 1840953 Opened 1 year ago Closed 1 year ago

Link in add-on recommendation heading has incorrect text

Categories

(Toolkit :: Add-ons Manager, defect, P3)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- fixed
firefox115 --- wontfix
firefox116 --- fixed
firefox117 --- fixed

People

(Reporter: mstriemer, Assigned: tgiles)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [recomp])

Attachments

(2 files)

Attached image image.png

The moz-support-link in the add-on recommendations intro is having its text replaced with "Learn more" when it should be coming from its parents' fluent string. We'll likely need to teach moz-support-link to not localize itself even though it isn't given a fluent id

Whiteboard: [fidefe-reusable-components]

(In reply to Mark Striemer [:mstriemer] from comment #0)

Created attachment 9341627 [details]
image.png

The moz-support-link in the add-on recommendations intro is having its text replaced with "Learn more" when it should be coming from its parents' fluent string. We'll likely need to teach moz-support-link to not localize itself even though it isn't given a fluent id

Hey Mark,
based on a quick look I just gave to the moz-support-link custom element internals, it looks that if the is=moz-support-link element does have its own explicit data-l10n-id attribute then the custom element would not be overriding that localized string with its own "Learn more" default localized string: https://searchfox.org/mozilla-central/rev/ada05ac4faf1f79944a35a9eb79083a684a98975/toolkit/content/widgets/moz-support-link/moz-support-link.mjs#54-56

And so something like the following would also force the link to be localized as recommends (but to be considered as a valid fix only after we have also gathered L10n perspective about using this strategy):

diff --git a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
--- a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
@@ -313,6 +313,9 @@ discopane-intro =
     often developed by a third party. Here’s a selection { -brand-product-name }
     <a data-l10n-name="learn-more-trigger">recommends</a> for exceptional
     security, performance, and functionality.
+# This strings is going to be the one used for the data-l10n-name "learn-more-trigger"
+# link included in the discopane-intro string.
+discopane-intro-recommends-sumo-link = recommends
 
 # Notice to make user aware that the recommendations are personalized.
 discopane-notice-recommendations =
diff --git a/toolkit/mozapps/extensions/content/aboutaddons.html b/toolkit/mozapps/extensions/content/aboutaddons.html
--- a/toolkit/mozapps/extensions/content/aboutaddons.html
+++ b/toolkit/mozapps/extensions/content/aboutaddons.html
@@ -708,6 +708,7 @@
               is="moz-support-link"
               support-page="recommended-extensions-program"
               data-l10n-name="learn-more-trigger"
+              data-l10n-id="discopane-intro-recommends-sumo-link"
             >
             </a>
           </span>

This may also be a reasonable longer term fix (not just a shorter term one) if we would end up deciding to not add a new special case in the moz-support-link custom element (and instead prefer to leverage this existing special case based on having an explicit data-l10n-id attribute on the link element).

As an additional side note, should this bug block Bug 1801924?

Flags: needinfo?(mstriemer)
Keywords: regression
Regressed by: 1804695

Set release status flags based on info from the regressing bug 1804695

I'm gonna look into this and see what we can do about this.

As an additional side note, should this bug block Bug 1801924?

Seems reasonable to me.

Assignee: nobody → tgiles
Severity: -- → S4
Status: NEW → ASSIGNED
Priority: -- → P3

Allows moz-support-link to have data-l10n-name assigned to it via
Fluent file without overwriting the data-l10n-name attribute.

Pushed by tgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa0b61933d0a Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Duplicate of this bug: 1842380

Comment on attachment 9343565 [details]
Bug 1840953 - Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: The link within the "Personalize Your Nightly" section of about:addons will be localized incorrectly without this change.
  • User impact if declined: Users may be confused by the recommended extensions link in about:addons since the sentence will be "Here's a selection Firefox Learn more for exceptional security, performance, and functionality".
  • Fix Landed on Version: 117
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change is limited to one component and has automated test coverage for this regression
Attachment #9343565 - Flags: approval-mozilla-esr115?

Comment on attachment 9343565 [details]
Bug 1840953 - Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer

If we're talking about taking this on ESR115, we should probably take it on Beta for Fx116 also.

Tim, this patch grafts cleanly to Beta but hits conflicts on ESR115 due to bug 1814424. We'll either need a rebased patch for uplifting or an approval request on bug 1814424 also if they should go together.

Flags: needinfo?(tgiles)
Attachment #9343565 - Flags: approval-mozilla-beta?

Comment on attachment 9343565 [details]
Bug 1840953 - Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer

Approved for 116.0b7

Attachment #9343565 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Pushed by dsmith@mozilla.com: https://hg.mozilla.org/releases/mozilla-beta/rev/ba11c78ce3b0 Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer,a=dsmith

Thanks for the Beta approval flag, didn't know we needed to land it on Beta as well (will remember for next time). Created an ESR request for bug 1814424 in order to get this patch to land cleanly.

Flags: needinfo?(tgiles)
Flags: needinfo?(mstriemer)
Regressions: 1844288

Im going to wait until bug 1844288 lands and gets uplifted before uplifting to esr

Comment on attachment 9343565 [details]
Bug 1840953 - Fix moz-support-link overwriting assigned data-l10n-name. r=mstriemer

Approved for 115.1esr

Attachment #9343565 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
Whiteboard: [fidefe-reusable-components] → [recomp]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: