[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-102.9.0esr-12.5-1] 4 commits: fixup! Bug 41695: Warn on window maximization without letterboxing in RFPHelper module

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Wed Mar 29 14:59:03 UTC 2023



Pier Angelo Vendrame pushed to branch base-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser


Commits:
2ffae0ac by Pier Angelo Vendrame at 2023-03-29T16:58:54+02:00
fixup! Bug 41695: Warn on window maximization without letterboxing in RFPHelper module

Bug 41698

- - - - -
59f56195 by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages

Bug 41698: Reword the recommendation badges in about:addons

We need to add a new commit for all base browser strings

- - - - -
6f98fb4c by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
Base Browser strings

This commit adds all the strings needed by following Base Browser
patches.

- - - - -
a825810a by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
Bug 41698: Reword the recommendation badges in about:addons

Firefox strings use { -brand-product-name }.
As a result, it seems that the fork is recommending extensions, whereas
AMO curators are doing that.
So, we replace the strings with custom ones that clarify that Mozilla is
recommending them.

We assign the strings with JS because our translation backend does not
support Fluent attributes, yet, but once it does, we should switch to
them, instead.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1825033

- - - - -


3 changed files:

- browser/locales/en-US/browser/languageNotification.ftl
- toolkit/mozapps/extensions/content/aboutaddons.html
- toolkit/mozapps/extensions/content/aboutaddons.js


Changes:

=====================================
browser/locales/en-US/browser/languageNotification.ftl
=====================================
@@ -2,6 +2,13 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+# These strings are used by the Base Browser part of the changeset, not only for
+# the language notification.
+# TODO: Rename this file to make this clearer
+
+
+## Language notification
+
 # $language is the language Tor Browser is displayed in (already translated)
 language-notification-label-system = { -brand-short-name } has set your display language to { $language } based on your system’s language.
 # This is shown when the system language is not supported, so we fall back to another language instead.
@@ -9,6 +16,15 @@ language-notification-label-system = { -brand-short-name } has set your display
 language-notification-label = { -brand-short-name } has set your display language to { $language }.
 language-notification-button = Change Language…
 
+
+## Fullscreen/maximization notification shown when letterboxing is disabled
+
 basebrowser-rfp-maximize-warning-message = Maximizing the browser window can allow websites to determine your monitor size, which can be used to track you. We recommend that you leave browser windows in their original default size.
 basebrowser-rfp-restore-window-size-button-label = Restore
 basebrowser-rfp-restore-window-size-button-ak = R
+
+
+## Tooltip for the about:addons recommended badge
+
+basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance
+basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance


=====================================
toolkit/mozapps/extensions/content/aboutaddons.html
=====================================
@@ -24,6 +24,8 @@
     <link rel="localization" href="toolkit/about/aboutAddons.ftl">
     <link rel="localization" href="toolkit/about/abuseReports.ftl">
 
+    <link rel="localization" href="browser/languageNotification.ftl"/>
+
     <!-- Defer scripts so all the templates are loaded by the time they run. -->
     <script defer src="chrome://mozapps/content/extensions/aboutaddonsCommon.js"></script>
     <script defer src="chrome://mozapps/content/extensions/abuse-reports.js"></script>
@@ -153,7 +155,6 @@
                  is="support-link"
                  support-page="add-on-badges"
                  utmcontent="promoted-addon-badge"
-                 data-l10n-id="addon-badge-recommended2"
                  hidden>
               </a>
               <a class="addon-badge addon-badge-line"
@@ -167,7 +168,6 @@
                  is="support-link"
                  support-page="add-on-badges"
                  utmcontent="promoted-addon-badge"
-                 data-l10n-id="addon-badge-verified2"
                  hidden>
               </a>
               <a class="addon-badge addon-badge-private-browsing-allowed"


=====================================
toolkit/mozapps/extensions/content/aboutaddons.js
=====================================
@@ -4885,6 +4885,29 @@ async function initialize() {
       );
     }
   }
+
+  // At the moment we need to do this, because Weblate still does not support
+  // attributes in Fluent.
+  const [recommended, verified] = await document.l10n.formatValues([
+    { id: "basebrowser-addon-badge-recommended" },
+    { id: "basebrowser-addon-badge-verified" },
+  ]);
+
+  importTemplate("card");
+  _templates.card.content
+    .querySelector(".addon-badge-recommended")
+    .setAttribute("title", recommended);
+  _templates.card.content
+    .querySelector(".addon-badge-verified")
+    .setAttribute("title", verified);
+
+  // We also update any template copy that has already been created.
+  for (const badge of document.querySelectorAll(".addon-badge-recommended")) {
+    badge.setAttribute("title", recommended);
+  }
+  for (const badge of document.querySelectorAll(".addon-badge-verified")) {
+    badge.setAttribute("title", verified);
+  }
 }
 
 window.promiseInitialized = new Promise(resolve => {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9e31ce5b95947cad1e826fab343a638f55b78584...a825810a0530dd6f04d221bdaedcd256197cafac

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9e31ce5b95947cad1e826fab343a638f55b78584...a825810a0530dd6f04d221bdaedcd256197cafac
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230329/84905e7c/attachment-0001.htm>


More information about the tbb-commits mailing list