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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] 2 commits: fixup! Base Browser strings



Title: GitLab

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

Commits:

  • 900fb923
    by Henry Wilkes at 2024-05-16T12:56:28+01:00
    fixup! Base Browser strings
    
    Bug 42347: Add a notification for dropped OS version support.
    
  • 4a1e3ba3
    by Henry Wilkes at 2024-05-16T12:56:28+01:00
    Bug 42347: Add a notification for dropped OS version support.
    

4 changed files:

Changes:

  • browser/base/content/browser.xhtml
    ... ... @@ -132,6 +132,7 @@
    132 132
       Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
    
    133 133
       Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
    
    134 134
       Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
    
    135
    +  Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this);
    
    135 136
     
    
    136 137
       window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
    
    137 138
       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
    ... ... @@ -111,4 +111,5 @@ browser.jar:
    111 111
             content/browser/spotlight.js                  (content/spotlight.js)
    
    112 112
     *       content/browser/default-bookmarks.html        (content/default-bookmarks.html)
    
    113 113
     
    
    114
    +        content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js)
    
    114 115
             content/browser/languageNotification.js       (content/languageNotification.js)

  • 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