Bug 1340618 - Don't hardcode Firefox in strings for space disk warning in Preferences r=jaws

MozReview-Commit-ID: KyEba2v30rC

--HG--
extra : rebase_source : 871a2a57614725e1157325ab8228775dd785dccf
This commit is contained in:
Fischer.json 2017-02-20 11:57:13 +08:00
Родитель 0da735fe74
Коммит 3ea1b8cd85
2 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -460,6 +460,7 @@ const gStoragePressureObserver = {
let buttons = [];
let usage = parseInt(data);
let prefStrBundle = document.getElementById("bundle_preferences");
let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
let notificationBox = document.getElementById("high-priority-global-notificationbox");
buttons.push({
label: prefStrBundle.getString("spaceAlert.learnMoreButton.label"),
@ -474,7 +475,7 @@ 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 = prefStrBundle.getString("spaceAlert.under5GB.description");
msg = prefStrBundle.getFormattedString("spaceAlert.under5GB.message", [brandShortName]);
buttons.push({
label: prefStrBundle.getString("spaceAlert.under5GB.okButton.label"),
accessKey: prefStrBundle.getString("spaceAlert.under5GB.okButton.accesskey"),
@ -483,15 +484,15 @@ const gStoragePressureObserver = {
} else {
// The firefox-used space >= 5GB, then guide users to about:preferences
// to clear some data stored on firefox by websites.
let descriptionStringID = "spaceAlert.over5GB.description";
let descriptionStringID = "spaceAlert.over5GB.message";
let prefButtonLabelStringID = "spaceAlert.over5GB.prefButton.label";
let prefButtonAccesskeyStringID = "spaceAlert.over5GB.prefButton.accesskey";
if (AppConstants.platform == "win") {
descriptionStringID = "spaceAlert.over5GB.descriptionWin";
descriptionStringID = "spaceAlert.over5GB.messageWin";
prefButtonLabelStringID = "spaceAlert.over5GB.prefButtonWin.label";
prefButtonAccesskeyStringID = "spaceAlert.over5GB.prefButtonWin.accesskey";
}
msg = prefStrBundle.getString(descriptionStringID);
msg = prefStrBundle.getFormattedString(descriptionStringID, [brandShortName]);
buttons.push({
label: prefStrBundle.getString(prefButtonLabelStringID),
accessKey: prefStrBundle.getString(prefButtonAccesskeyStringID),

Просмотреть файл

@ -207,12 +207,16 @@ spaceAlert.over5GB.prefButton.accesskey=O
# LOCALIZATION NOTE (spaceAlert.over5GB.prefButtonWin.label): On Windows Preferences is called Options
spaceAlert.over5GB.prefButtonWin.label=Open Options
spaceAlert.over5GB.prefButtonWin.accesskey=O
spaceAlert.over5GB.description=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Preferences > Advanced > Site Data.
# LOCALIZATION NOTE (spaceAlert.over5GB.descriptionWin): On Windows Preferences is called Options
spaceAlert.over5GB.descriptionWin=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Options > Advanced > Site Data.
# LOCALIZATION NOTE (spaceAlert.over5GB.message): %S = brandShortName
spaceAlert.over5GB.message=%S is running out of disk space. Website contents may not display properly. You can clear stored site data in Preferences > Advanced > Site Data.
# LOCALIZATION NOTE (spaceAlert.over5GB.messageWin):
# - On Windows Preferences is called Options
# - %S = brandShortName
spaceAlert.over5GB.messageWin=%S is running out of disk space. Website contents may not display properly. You can clear stored site data in Options > Advanced > Site Data.
spaceAlert.under5GB.okButton.label=OK, Got it
spaceAlert.under5GB.okButton.accesskey=K
spaceAlert.under5GB.description=Firefox is running out of disk space. Website contents may not display properly. Visit “Learn More” to optimize your disk usage for better browsing experience.
# LOCALIZATION NOTE (spaceAlert.under5GB.message): %S = brandShortName
spaceAlert.under5GB.message=%S is running out of disk space. Website contents may not display properly. Visit “Learn More” to optimize your disk usage for better browsing experience.
# LOCALIZATION NOTE (featureEnableRequiresRestart, featureDisableRequiresRestart, restartTitle): %S = brandShortName
featureEnableRequiresRestart=%S must restart to enable this feature.