Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits: 9b87c73a by Pier Angelo Vendrame at 2023-03-29T16:56:32+02:00 fixup! Bug 41695: Warn on window maximization without letterboxing in RFPHelper module
Bug 41698
- - - - - 071ef206 by Pier Angelo Vendrame at 2023-03-29T16:56:49+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
- - - - - 35133d69 by Pier Angelo Vendrame at 2023-03-29T16:56:49+02:00 Base Browser strings
This commit adds all the strings needed by following Base Browser patches.
- - - - - 663cd8e2 by Pier Angelo Vendrame at 2023-03-29T16:56:50+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/5a1faa0...