Bug 1163062 - Make e10s strings localizable. r=ttaubert

This commit is contained in:
Felipe Gomes 2015-05-08 15:35:24 -03:00
parent e07a3669ef
commit 03d370a2a9
4 changed files with 62 additions and 16 deletions

View File

@ -2929,11 +2929,14 @@ let E10SUINotification = {
Services.prefs.setIntPref("browser.displayedE10SNotice", this.CURRENT_NOTICE_COUNT);
let nb = win.document.getElementById("high-priority-global-notificationbox");
let message = "You're now helping to test Process Separation (e10s)! Please report problems you find.";
let message = win.gNavigatorBundle.getFormattedString(
"e10s.postActivationInfobar.message",
[gBrandBundle.GetStringFromName("brandShortName")]
);
let buttons = [
{
label: "Learn More",
accessKey: "L",
label: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.label"),
accessKey: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.accesskey"),
callback: function () {
win.openUILinkIn("https://wiki.mozilla.org/Electrolysis", "tab");
}
@ -2951,10 +2954,13 @@ let E10SUINotification = {
let browser = win.gBrowser.selectedBrowser;
let promptMessage = "Multi-process is coming soon to Firefox. You can start using it now to get early access to some of the benefits:";
let promptMessage = win.gNavigatorBundle.getFormattedString(
"e10s.offerPopup.mainMessage",
[gBrandBundle.GetStringFromName("brandShortName")]
);
let mainAction = {
label: "Enable and Restart",
accessKey: "E",
label: win.gNavigatorBundle.getString("e10s.offerPopup.enableAndRestart.label"),
accessKey: win.gNavigatorBundle.getString("e10s.offerPopup.enableAndRestart.accesskey"),
callback: function () {
Services.prefs.setBoolPref("browser.tabs.remote.autostart", true);
Services.prefs.setBoolPref("browser.enabledE10SFromPrompt", true);
@ -2968,8 +2974,8 @@ let E10SUINotification = {
};
let secondaryActions = [
{
label: "No thanks",
accessKey: "N",
label: win.gNavigatorBundle.getString("e10s.offerPopup.noThanks.label"),
accessKey: win.gNavigatorBundle.getString("e10s.offerPopup.noThanks.accesskey"),
callback: function () {
Services.prefs.setIntPref(E10SUINotification.CURRENT_PROMPT_PREF, 5);
}
@ -2984,8 +2990,8 @@ let E10SUINotification = {
win.PopupNotifications.show(browser, "enable-e10s", promptMessage, null, mainAction, secondaryActions, options);
let highlights = [
"Improved responsiveness",
"Fewer crashes"
win.gNavigatorBundle.getString("e10s.offerPopup.highlight1"),
win.gNavigatorBundle.getString("e10s.offerPopup.highlight2")
];
let doorhangerExtraContent = win.document.getElementById("enable-e10s-notification")
@ -3016,10 +3022,13 @@ let E10SUINotification = {
let browser = win.gBrowser.selectedBrowser;
let promptMessage = "Multiprocess Nightly (e10s) does not yet support accessibility features. Multiprocessing will be disabled if you restart Firefox. Would you like to restart?";
let promptMessage = win.gNavigatorBundle.getFormattedString(
"e10s.accessibilityNotice.mainMessage",
[gBrandBundle.GetStringFromName("brandShortName")]
);
let mainAction = {
label: "Disable and Restart",
accessKey: "R",
label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.disableAndRestart.label"),
accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.disableAndRestart.accesskey"),
callback: function () {
// Restart the app
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
@ -3031,8 +3040,8 @@ let E10SUINotification = {
};
let secondaryActions = [
{
label: "Don't Disable",
accessKey: "D",
label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.dontDisable.label"),
accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.dontDisable.accesskey"),
callback: function () {
Services.prefs.setBoolPref("browser.tabs.remote.autostart.disabled-because-using-a11y", false);
}

View File

@ -130,7 +130,7 @@
#ifdef E10S_TESTING_ONLY
<checkbox id="e10sAutoStart"
label="Enable E10S (multi-process)"/>
label="&e10sEnabled.label;"/>
#endif
#ifdef HAVE_SHELL_SERVICE

View File

@ -785,3 +785,38 @@ readingList.prepopulatedArticles.supportReaderView = Enjoy clutter-free Web page
# https://support.mozilla.org/kb/how-do-i-set-up-firefox-sync
# %S is syncBrandShortName
readingList.prepopulatedArticles.supportSync = Access your Reading List anywhere with %S
# LOCALIZATION NOTE (e10s.offerPopup.mainMessage
# e10s.offerPopup.highlight1
# e10s.offerPopup.highlight2
# e10s.offerPopup.enableAndRestart.label
# e10s.offerPopup.enableAndRestart.accesskey
# e10s.offerPopup.noThanks.label
# e10s.offerPopup.noThanks.accesskey
# e10s.postActivationInfobar.message
# e10s.postActivationInfobar.learnMore.label
# e10s.postActivationInfobar.learnMore.accesskey
# e10s.accessibilityNotice.mainMessage
# e10s.accessibilityNotice.disableAndRestart.label
# e10s.accessibilityNotice.disableAndRestart.accesskey
# e10s.accessibilityNotice.dontDisable.label
# e10s.accessibilityNotice.dontDisable.accesskey):
# These strings are related to the messages we display to offer e10s (Multi-process) to users
# on the pre-release channels. They won't be used in release but they will likely be used in
# beta starting from version 41, so it's still useful to have these strings properly localized.
# %S is brandShortName
e10s.offerPopup.mainMessage = Multi-process is coming soon to %S. You can start using it now to get early access to some of the benefits:
e10s.offerPopup.highlight1 = Improved responsiveness
e10s.offerPopup.highlight2 = Fewer crashes
e10s.offerPopup.enableAndRestart.label = Enable and Restart
e10s.offerPopup.enableAndRestart.accesskey = E
e10s.offerPopup.noThanks.label = No, thanks
e10s.offerPopup.noThanks.accesskey = N
e10s.postActivationInfobar.message = You're now helping to test multi-process in %S! Please report problems you find.
e10s.postActivationInfobar.learnMore.label = Learn More
e10s.postActivationInfobar.learnMore.accesskey = L
e10s.accessibilityNotice.mainMessage = Multi-process does not yet support accessibility features. Multi-process will be disabled if you restart %S. Would you like to restart?
e10s.accessibilityNotice.disableAndRestart.label = Disable and Restart
e10s.accessibilityNotice.disableAndRestart.accesskey = R
e10s.accessibilityNotice.dontDisable.label = Don't Disable
e10s.accessibilityNotice.dontDisable.accesskey = D

View File

@ -41,3 +41,5 @@
<!ENTITY separateProfileMode.label "Allow &brandShortName; and Firefox to run at the same time">
<!ENTITY useFirefoxSync.label "Tip: This uses separate profiles. Use Sync to share data between them.">
<!ENTITY getStarted.label "Start using Sync…">
<!ENTITY e10sEnabled.label "Enable multi-process &brandShortName;">