Bug 1419312 - Expand supported locales and countries on Nightly and Beta. r=lchang
MozReview-Commit-ID: 8MziULBn05l
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1725,17 +1725,23 @@ pref("extensions.formautofill.creditCard
// 2: saw the doorhanger
// 3: submitted an autofill'ed credit card form
pref("extensions.formautofill.creditCards.used", 0);
pref("extensions.formautofill.firstTimeUse", true);
pref("extensions.formautofill.heuristics.enabled", true);
pref("extensions.formautofill.section.enabled", true);
pref("extensions.formautofill.loglevel", "Warn");
// Comma separated list of countries Form Autofill supports
+#ifdef MOZ_UPDATE_CHANNEL == release
+pref("extensions.formautofill.supportedCountries", "US");
+pref("extensions.formautofill.supportRTL", false);
+#else
pref("extensions.formautofill.supportedCountries", "US,CA,DE");
+pref("extensions.formautofill.supportRTL", true);
+#endif
// Whether or not to restore a session with lazy-browser tabs.
pref("browser.sessionstore.restore_tabs_lazily", true);
pref("browser.suppress_first_window_animation", true);
// Preferences for Photon onboarding system extension
pref("browser.onboarding.enabled", true);
--- a/browser/extensions/formautofill/bootstrap.js
+++ b/browser/extensions/formautofill/bootstrap.js
@@ -52,21 +52,24 @@ function addUpgradeListener(instanceID)
});
}
function isAvailable() {
let availablePref = Services.prefs.getCharPref("extensions.formautofill.available");
if (availablePref == "on") {
return true;
} else if (availablePref == "detect") {
- let locale = Services.locale.getRequestedLocale();
let region = Services.prefs.getCharPref("browser.search.region", "");
let supportedCountries = Services.prefs.getCharPref("extensions.formautofill.supportedCountries")
.split(",");
- return locale == "en-US" && supportedCountries.includes(region);
+ if (!Services.prefs.getBoolPref("extensions.formautofill.supportRTL") &&
+ Services.locale.isAppLocaleRTL) {
+ return false;
+ }
+ return supportedCountries.includes(region);
}
return false;
}
function startup(data) {
if (!isAvailable()) {
Services.prefs.clearUserPref("dom.forms.autocomplete.formautofill");
// reset the sync related prefs incase the feature was previously available