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


Commits:
75ac830c by Henry Wilkes at 2024-05-08T16:05:56+01: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/75ac830cbf3c25d50a92027ee24cf9a29da46352

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/75ac830cbf3c25d50a92027ee24cf9a29da46352
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to