[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-115.11.0esr-13.5-1] fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Mon May 27 08:16:30 UTC 2024



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


Commits:
1f9f11ca by Henry Wilkes at 2024-05-27T10:15:09+02:00
fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages

Bug 42573: Avoid async l10n.formatValue.

- - - - -


1 changed file:

- browser/base/content/languageNotification.js


Changes:

=====================================
browser/base/content/languageNotification.js
=====================================
@@ -2,7 +2,7 @@
 
 // Show a prompt to suggest to the user that they can change the UI language.
 // Show it only the first time, and then do not show it anymore
-window.addEventListener("load", async () => {
+window.addEventListener("load", () => {
   const PREF_NAME = "intl.language_notification.shown";
 
   if (Services.prefs.getBoolPref(PREF_NAME, false)) {
@@ -35,12 +35,12 @@ window.addEventListener("load", async () => {
     Services.locale.requestedLocales,
     Services.locale.availableLocales
   ).length;
-  const label = await document.l10n.formatValue(
-    matchingSystem
+  const label = {
+    "l10n-id": matchingSystem
       ? "language-notification-label-system"
       : "language-notification-label",
-    { language }
-  );
+    "l10n-args": { language },
+  };
 
   const buttons = [
     {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1f9f11caba931b5c1ba45c4038d59dbf2d6b2ffa

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1f9f11caba931b5c1ba45c4038d59dbf2d6b2ffa
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/20240527/f0db3050/attachment-0001.htm>


More information about the tbb-commits mailing list