[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-115.11.0esr-13.5-1] 3 commits: fixup! Bug 42562: Normalized the Accepted Languages on Android.



Title: GitLab

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

Commits:

  • 00a60291
    by Pier Angelo Vendrame at 2024-05-27T10:08:37+02:00
    fixup! Bug 42562: Normalized the Accepted Languages on Android.
    
    Bug 42582: Use toLanguageTag() instead of toString()
    
  • 623ab54b
    by Henry Wilkes at 2024-05-27T10:08:39+02:00
    fixup! Base Browser strings
    
    Bug 42347: Add a notification for dropped OS version support.
    
  • 68c9e866
    by Henry Wilkes at 2024-05-27T10:08:39+02:00
    Bug 42347: Add a notification for dropped OS version support.
    

5 changed files:

Changes:

  • browser/base/content/browser.xhtml
    ... ... @@ -123,6 +123,7 @@
    123 123
       Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
    
    124 124
       Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
    
    125 125
       Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
    
    126
    +  Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this);
    
    126 127
     
    
    127 128
       window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
    
    128 129
       window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
    

  • browser/base/content/droppedSupportNotification.js
    1
    +"use strict";
    
    2
    +
    
    3
    +// Show a prompt that a user's system will no longer be supported.
    
    4
    +window.addEventListener("load", () => {
    
    5
    +  let labelId;
    
    6
    +  // Expire date is 2024-10-01 (1st October 2024).
    
    7
    +  const isExpired = Date.now() > Date.UTC(2024, 9, 1);
    
    8
    +
    
    9
    +  if (
    
    10
    +    AppConstants.platform === "macosx" &&
    
    11
    +    Services.vc.compare(
    
    12
    +      Services.sysinfo.getProperty("version"),
    
    13
    +      "19.0" // MacOS 10.15 begins with Darwin 19.0
    
    14
    +    ) < 0
    
    15
    +  ) {
    
    16
    +    labelId = isExpired
    
    17
    +      ? "dropped-support-notification-macos-version-less-than-10-15-expired"
    
    18
    +      : "dropped-support-notification-macos-version-less-than-10-15";
    
    19
    +  } else if (
    
    20
    +    AppConstants.platform === "win" &&
    
    21
    +    Services.vc.compare(Services.sysinfo.getProperty("version"), "10.0") < 0
    
    22
    +  ) {
    
    23
    +    labelId = isExpired
    
    24
    +      ? "dropped-support-notification-win-os-version-less-than-10-expired"
    
    25
    +      : "dropped-support-notification-win-os-version-less-than-10";
    
    26
    +  }
    
    27
    +
    
    28
    +  const dismissedPref =
    
    29
    +    "browser.dropped_support_notification_v14.dismiss_version";
    
    30
    +
    
    31
    +  if (!labelId) {
    
    32
    +    // Avoid setting any preferences for supported versions, and clean up any
    
    33
    +    // old values if the user ported their profile.
    
    34
    +    Services.prefs.clearUserPref(dismissedPref);
    
    35
    +    return;
    
    36
    +  }
    
    37
    +
    
    38
    +  if (
    
    39
    +    !isExpired &&
    
    40
    +    Services.prefs.getStringPref(dismissedPref, "") ===
    
    41
    +      AppConstants.BASE_BROWSER_VERSION
    
    42
    +  ) {
    
    43
    +    // Already dismissed since the last update.
    
    44
    +    return;
    
    45
    +  }
    
    46
    +
    
    47
    +  const buttons = isExpired
    
    48
    +    ? undefined
    
    49
    +    : [
    
    50
    +        {
    
    51
    +          "l10n-id": "dropped-support-notification-dismiss-button",
    
    52
    +          callback: () => {
    
    53
    +            Services.prefs.setStringPref(
    
    54
    +              dismissedPref,
    
    55
    +              AppConstants.BASE_BROWSER_VERSION
    
    56
    +            );
    
    57
    +          },
    
    58
    +        },
    
    59
    +      ];
    
    60
    +
    
    61
    +  gNotificationBox.appendNotification(
    
    62
    +    "dropped-support-notification",
    
    63
    +    {
    
    64
    +      label: { "l10n-id": labelId },
    
    65
    +      priority: gNotificationBox.PRIORITY_WARNING_HIGH,
    
    66
    +    },
    
    67
    +    buttons
    
    68
    +  );
    
    69
    +});

  • browser/base/jar.mn
    ... ... @@ -105,4 +105,5 @@ browser.jar:
    105 105
             content/browser/spotlight.js                  (content/spotlight.js)
    
    106 106
     *       content/browser/default-bookmarks.html        (content/default-bookmarks.html)
    
    107 107
     
    
    108
    +        content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js)
    
    108 109
             content/browser/languageNotification.js       (content/languageNotification.js)

  • mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
    ... ... @@ -843,7 +843,7 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
    843 843
             }
    
    844 844
           }
    
    845 845
         }
    
    846
    -    String acceptLanguages = locale != null ? locale.toString().replace('_', '-') : "en-US";
    
    846
    +    String acceptLanguages = locale != null ? locale.toLanguageTag().replace('_', '-') : "en-US";
    
    847 847
         if (acceptLanguages.equals("en-US")) {
    
    848 848
           // For consistency with spoof English.
    
    849 849
           acceptLanguages += ", en";
    

  • toolkit/locales/en-US/toolkit/global/base-browser.ftl
    ... ... @@ -166,3 +166,21 @@ security-level-summary-custom = Your custom browser preferences have resulted in
    166 166
     # Button to undo custom changes to the security level and place the user in one of the standard security levels.
    
    167 167
     # Shown in the security level panel and settings.
    
    168 168
     security-level-restore-defaults-button = Restore defaults
    
    169
    +
    
    170
    +## Notification for dropped operating system support.
    
    171
    +
    
    172
    +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
    
    173
    +# "14.0" refers to the browser versions number: Tor Browser 14.0.
    
    174
    +# "macOS" is a brand name, and 10.15 is the macOS version number.
    
    175
    +dropped-support-notification-macos-version-less-than-10-15 = The next major version of { -brand-short-name } (14.0) will no longer support this version of macOS. Please upgrade to macOS 10.15 or later by October 1st 2024 to continue receiving important security updates.
    
    176
    +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
    
    177
    +# "macOS" is a brand name, and 10.15 is the macOS version number.
    
    178
    +dropped-support-notification-macos-version-less-than-10-15-expired = { -brand-short-name } no longer supports this version of macOS. Please upgrade to macOS 10.15 or later to continue receiving important security updates.
    
    179
    +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
    
    180
    +# "14.0" refers to the browser versions number: Tor Browser 14.0.
    
    181
    +# "Windows" is a brand name, and "Windows 10" is the version.
    
    182
    +dropped-support-notification-win-os-version-less-than-10 = The next major version of { -brand-short-name } (14.0) will no longer support this version of Windows. Please upgrade to Windows 10 or later by October 1st 2024 to continue receiving important security updates.
    
    183
    +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
    
    184
    +# "Windows" is a brand name, and "Windows 10" is the version.
    
    185
    +dropped-support-notification-win-os-version-less-than-10-expired = { -brand-short-name } no longer supports this version of Windows. Please upgrade to Windows 10 or later to continue receiving important security updates.
    
    186
    +dropped-support-notification-dismiss-button = Got it

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