Bug 1699473: bold first sentence in disk storage infobar r=Gijs,flod
Differential Revision: https://phabricator.services.mozilla.com/D109678
This commit is contained in:
@@ -1021,7 +1021,9 @@ const gStoragePressureObserver = {
|
||||
Services.prefs.getIntPref(
|
||||
"browser.storageManager.pressureNotification.usageThresholdGB"
|
||||
);
|
||||
let msg = "";
|
||||
let messageFragment = document.createDocumentFragment();
|
||||
let message = document.createElement("span");
|
||||
|
||||
let buttons = [{ supportPage: "storage-permissions" }];
|
||||
let usage = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
|
||||
if (usage < USAGE_THRESHOLD_BYTES) {
|
||||
@@ -1029,15 +1031,11 @@ const gStoragePressureObserver = {
|
||||
// This is because this usage is small and not the main cause for space issue.
|
||||
// In order to avoid the bad and wrong impression among users that
|
||||
// firefox eats disk space a lot, indicate users to clean up other disk space.
|
||||
[msg] = await document.l10n.formatValues([
|
||||
{ id: "space-alert-under-5gb-message" },
|
||||
]);
|
||||
document.l10n.setAttributes(message, "space-alert-under-5gb-message2");
|
||||
} else {
|
||||
// The firefox-used space >= 5GB, then guide users to about:preferences
|
||||
// to clear some data stored on firefox by websites.
|
||||
[msg] = await document.l10n.formatValues([
|
||||
{ id: "space-alert-over-5gb-message" },
|
||||
]);
|
||||
document.l10n.setAttributes(message, "space-alert-over-5gb-message2");
|
||||
buttons.push({
|
||||
"l10n-id": "space-alert-over-5gb-pref-button",
|
||||
callback(notificationBar, button) {
|
||||
@@ -1047,9 +1045,10 @@ const gStoragePressureObserver = {
|
||||
},
|
||||
});
|
||||
}
|
||||
messageFragment.appendChild(message);
|
||||
|
||||
gHighPriorityNotificationBox.appendNotification(
|
||||
msg,
|
||||
messageFragment,
|
||||
NOTIFICATION_VALUE,
|
||||
null,
|
||||
gHighPriorityNotificationBox.PRIORITY_WARNING_HIGH,
|
||||
|
||||
@@ -1346,13 +1346,9 @@ space-alert-over-5gb-pref-button =
|
||||
*[other] O
|
||||
}
|
||||
|
||||
space-alert-over-5gb-message =
|
||||
{ PLATFORM() ->
|
||||
[windows] { -brand-short-name } is running out of disk space. Website contents may not display properly. You can clear stored data in Options > Privacy & Security > Cookies and Site Data.
|
||||
*[other] { -brand-short-name } is running out of disk space. Website contents may not display properly. You can clear stored data in Preferences > Privacy & Security > Cookies and Site Data.
|
||||
}
|
||||
space-alert-over-5gb-message2 = <strong>{ -brand-short-name } is running out of disk space.</strong> Website contents may not display properly. You can clear stored data in Settings > Privacy & Security > Cookies and Site Data.
|
||||
|
||||
space-alert-under-5gb-message = { -brand-short-name } is running out of disk space. Website contents may not display properly. Visit “Learn More” to optimize your disk usage for better browsing experience.
|
||||
space-alert-under-5gb-message2 = <strong>{ -brand-short-name } is running out of disk space.</strong> Website contents may not display properly. Visit “Learn More” to optimize your disk usage for better browsing experience.
|
||||
|
||||
## Privacy Section - HTTPS-Only
|
||||
|
||||
|
||||
Reference in New Issue
Block a user