Link in add-on recommendation heading has incorrect text
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1840953
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Details
(Keywords: regression, Whiteboard: [fidefe-reusable-components])
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
(In reply to Mark Striemer [:mstriemer] from comment #0)
Created attachment 9341627 [details]
image.pngThe 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?
Recommend
-
38
As a vulnerability analyst at the CERT Coordination Center, I am interested not only in software vulnerabilities themselves, but also exploits and exploit mitigations. Working in this field, it doesn't take too long to r...
-
30
Incorrect code review Add to FavoritesShareIncorrect code review...
-
30
Sometimes, you may experience “ERROR 1034: Incorrect key file” while running the ALTER TABLE or CREATE INDEX command: mysql> alter table ontime add key(FlightDate); ERROR 1034 (HY000): Incorrect key file for t...
-
9
Your Android phone is 15s incorrect ... Kaushik Gopal Dr.Neil Degrasse Tyson on the Verge: .. the bulk of the Androids get their time from GPS satellites.. The...
-
7
Contributor the8472 commented
-
6
Incorrect traffic sign fixed Writing Software, technology, sysadmin war stories, and more. Monday, December 17, 2012 Incorrect traffic sign fixed
-
4
Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful Saturday, February 28, 2009 I am doing some work on writing
-
7
some commonly used methods can produce incorrect answers. Check out my examples and recommendation in this post."Don’t miss what’s happeningPeople on Twitter are the first to know.
-
6
Optimize your link-earning strategy for better rankings in the new year. Internet Marketing N...
-
6
Non-Negative Matrix Factorization for Text Classification and Recommendation In this blog, we shall discuss on how matrix-factorization-based unsupervised machine learning techniques can be applied to so...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK