author | Zibi Braniecki <zbraniecki@mozilla.com> |
Wed, 14 Mar 2018 12:21:14 -0700 | |
changeset 777114 | 663d6301cbc2b8b50b1b782345abce6956b79116 |
parent 776023 | a9b62975ce9f1ee6c636494c278e4a6a4162b9e3 |
push id | 105083 |
push user | bmo:gandalf@aviary.pl |
push date | Wed, 04 Apr 2018 09:33:11 +0000 |
reviewers | markh, flod, stas |
bugs | 1445694 |
milestone | 61.0a1 |
--- a/browser/components/preferences/in-content/preferences.xul +++ b/browser/components/preferences/in-content/preferences.xul @@ -13,18 +13,16 @@ href="chrome://browser/content/preferences/handlers.css"?> <?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?> <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?> <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?> <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/privacy.css"?> <!DOCTYPE page [ <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> -<!ENTITY % preferencesDTD SYSTEM - "chrome://browser/locale/preferences/preferences.dtd"> <!ENTITY % selectBookmarkDTD SYSTEM "chrome://browser/locale/preferences/selectBookmark.dtd"> <!ENTITY % languagesDTD SYSTEM "chrome://browser/locale/preferences/languages.dtd"> <!ENTITY % fontDTD SYSTEM "chrome://browser/locale/preferences/fonts.dtd"> <!ENTITY % colorsDTD SYSTEM "chrome://browser/locale/preferences/colors.dtd"> <!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd"> <!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd"> <!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd"> @@ -40,17 +38,16 @@ <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd"> <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd"> <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd"> <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd"> <!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd"> <!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" > %aboutDialogDTD; %brandDTD; -%preferencesDTD; %selectBookmarkDTD; %languagesDTD; %fontDTD; %colorsDTD; %permissionsDTD; %passwordManagerDTD; %historyDTD; %certManagerDTD;
--- a/browser/components/preferences/in-content/sync.js +++ b/browser/components/preferences/in-content/sync.js @@ -113,17 +113,17 @@ var gSyncPane = { let username = Services.prefs.getCharPref("services.sync.username", ""); if (!username) { this.page = FXA_PAGE_LOGGED_OUT; return; } // Use cached values while we wait for the up-to-date values let cachedComputerName = Services.prefs.getCharPref("services.sync.client.name", ""); - document.querySelector(".fxaEmailAddress").value = username; + document.getElementById("fxaEmailAddress").textContent = username; this._populateComputerName(cachedComputerName); this.page = FXA_PAGE_LOGGED_IN; }, _init() { // Add the observers now and remove them on unload // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling // of `this`. Fix in a followup. (bug 583347) @@ -254,17 +254,17 @@ var gSyncPane = { }, updateWeavePrefs() { let service = Cc["@mozilla.org/weave/service;1"] .getService(Ci.nsISupports) .wrappedJSObject; let displayNameLabel = document.getElementById("fxaDisplayName"); - let fxaEmailAddressLabels = document.querySelectorAll(".fxaEmailAddress"); + let fxaEmailAddressLabels = document.querySelectorAll(".l10nArgsEmailAddress"); displayNameLabel.hidden = true; // determine the fxa status... this._showLoadPage(service); let state = UIState.get(); if (state.status == UIState.STATUS_NOT_CONFIGURED) { this.page = FXA_PAGE_LOGGED_OUT; @@ -283,18 +283,21 @@ var gSyncPane = { fxaLoginStatus.selectedIndex = FXA_LOGIN_UNVERIFIED; } else { // We must be golden (or in an error state we expect to magically // resolve itself) fxaLoginStatus.selectedIndex = FXA_LOGIN_VERIFIED; syncReady = true; } fxaEmailAddressLabels.forEach((label) => { - label.value = state.email; + let l10nAttrs = document.l10n.getAttributes(label); + document.l10n.setAttributes(l10nAttrs.id, {email: state.email}); }); + document.getElementById("fxaEmailAddress").textContent = state.email; + this._populateComputerName(Weave.Service.clientsEngine.localName); let engines = document.getElementById("fxaSyncEngines"); for (let checkbox of engines.querySelectorAll("checkbox")) { checkbox.disabled = !syncReady; } document.getElementById("fxaChangeDeviceName").disabled = !syncReady; // Clear the profile image (if any) of the previously logged in account.
--- a/browser/components/preferences/in-content/sync.xul +++ b/browser/components/preferences/in-content/sync.xul @@ -6,49 +6,48 @@ <script type="application/javascript" src="chrome://browser/content/preferences/in-content/sync.js"/> <hbox id="firefoxAccountCategory" class="subcategory" hidden="true" data-category="paneSync"> - <label class="header-name" flex="1">&paneSync1.title;</label> + <label class="header-name" flex="1" data-l10n-id="pane-sync-title" /> </hbox> <deck id="weavePrefsDeck" data-category="paneSync" hidden="true" data-hidden-from-search="true"> <groupbox id="noFxaAccount"> <hbox> <vbox flex="1"> - <caption><label id="noFxaCaption">&signedOut.caption;</label></caption> - <description id="noFxaDescription" flex="1">&signedOut.description;</description> + <caption><label id="noFxaCaption" data-l10n-id="sync-signedout-caption"/></caption> + <description id="noFxaDescription" flex="1" data-l10n-id="sync-signedout-description"/> </vbox> <vbox> <image class="fxaSyncIllustration"/> </vbox> </hbox> <hbox id="fxaNoLoginStatus" align="center" flex="1"> <vbox> <image class="fxaProfileImage"/> </vbox> <vbox flex="1"> <hbox align="center" flex="1"> <hbox align="center" flex="1"> - <caption><label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label></caption> + <caption><label id="signedOutAccountBoxTitle" data-l10n-id="sync-signedout-account-title"/></caption> </hbox> <button id="noFxaSignIn" class="accessory-button" - label="&signedOut.accountBox.signin2;" - accesskey="&signedOut.accountBox.signin2.accesskey;"/> + data-l10n-id="sync-signedout-account-signin"/> </hbox> <hbox align="center" flex="1"> <html:a id="noFxaSignUp" class="openLink" - accesskey="&signedOut.accountBox.create2.accesskey;">&signedOut.accountBox.create2;</html:a> + data-l10n-id="sync-signedout-account-create" /> </hbox> </vbox> </hbox> <label class="fxaMobilePromo"> &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces --><image class="androidLink"></image><label id="fxaMobilePromo-android" class="text-link"><!-- -->&mobilePromo3.androidLink;</label><!-- @@ -59,166 +58,134 @@ -->&mobilePromo3.end; </label> </groupbox> <vbox id="hasFxaAccount"> <hbox> <vbox id="fxaContentWrapper" flex="1"> <groupbox id="fxaGroup"> - <caption class="search-header" hidden="true"><label>&paneSync1.title;</label></caption> + <caption class="search-header" hidden="true"><label data-l10n-id="pane-sync-title"/></caption> <deck id="fxaLoginStatus" flex="1"> <!-- logged in and verified and all is good --> <hbox id="fxaLoginVerified" align="center" flex="1"> <image class="fxaProfileImage actionable" role="button" onclick="gSyncPane.openChangeProfileImage(event);" onkeypress="gSyncPane.openChangeProfileImage(event);" - tooltiptext="&profilePicture.tooltip;"/> + data-l10n-id="sync-profile-picture"/> <vbox flex="1" pack="center"> <hbox flex="1" align="baseline"> <caption><label id="fxaDisplayName" hidden="true"/></caption> - <label class="fxaEmailAddress" flex="1" crop="end"/> + <label id="fxaEmailAddress" flex="1" crop="end"/> <button id="fxaUnlinkButton" class="accessory-button" - label="&disconnect3.label;" - accesskey="&disconnect3.accesskey;"/> + data-l10n-id="sync-disconnect"/> </hbox> <hbox> <html:a id="verifiedManage" class="openLink" - accesskey="&verifiedManage.accesskey;" - onkeypress="gSyncPane.openManageFirefoxAccount(event);">&verifiedManage.label;</html:a> + data-l10n-id="sync-manage-account" + onkeypress="gSyncPane.openManageFirefoxAccount(event);"/> </hbox> </vbox> </hbox> <!-- logged in to an unverified account --> <hbox id="fxaLoginUnverified"> <vbox> <image class="fxaProfileImage"/> </vbox> <vbox flex="1" pack="center"> <hbox> <image class="fxaLoginRejectedWarning"/> - <description flex="1"> - &signedInUnverified.beforename.label; - <label class="fxaEmailAddress"/> - &signedInUnverified.aftername.label; - </description> + <description flex="1" + class="l10nArgsEmailAddress" + data-l10n-id="sync-signedin-unverified" + data-l10n-args='{"email": ""}'/> </hbox> <hbox class="fxaAccountBoxButtons"> - <button id="verifyFxaAccount" label="&resendVerification.label;" accesskey="&resendVerification.accesskey;"></button> - <button id="unverifiedUnlinkFxaAccount" label="&removeAccount.label;" accesskey="&removeAccount.accesskey;"></button> + <button id="verifyFxaAccount" data-l10n-id="sync-resend-verification"/> + <button id="unverifiedUnlinkFxaAccount" data-l10n-id="sync-remove-account"/> </hbox> </vbox> </hbox> <!-- logged in locally but server rejected credentials --> <hbox id="fxaLoginRejected"> <vbox> <image class="fxaProfileImage"/> </vbox> <vbox flex="1" pack="center"> <hbox> <image class="fxaLoginRejectedWarning"/> - <description flex="1"> - &signedInLoginFailure.beforename.label; - <label class="fxaEmailAddress"/> - &signedInLoginFailure.aftername.label; - </description> + <description flex="1" + class="l10nArgsEmailAddress" + data-l10n-id="sync-signedin-login-failure" + data-l10n-args='{"email": ""}'/> </hbox> <hbox class="fxaAccountBoxButtons"> - <button id="rejectReSignIn" label="&signIn.label;" accesskey="&signIn.accesskey;"></button> - <button id="rejectUnlinkFxaAccount" label="&removeAccount.label;" accesskey="&removeAccount.accesskey;"></button> + <button id="rejectReSignIn" data-l10n-id="sync-sign-in"/> + <button id="rejectUnlinkFxaAccount" data-l10n-id="sync-remove-account"/> </hbox> </vbox> </hbox> </deck> </groupbox> <groupbox id="syncOptions"> - <caption><label>&signedIn.settings.label;</label></caption> - <description>&signedIn.settings.description;</description> + <caption><label data-l10n-id="sync-signedin-settings-header"/></caption> + <description data-l10n-id="sync-signedin-settings-desc"/> <hbox id="fxaSyncEngines"> <vbox flex="1"> <!-- by design, no tooltip for bookmarks or history --> - <checkbox label="&engine.bookmarks.label;" - accesskey="&engine.bookmarks.accesskey;" + <checkbox data-l10n-id="sync-engine-bookmarks" preference="engine.bookmarks"/> - <checkbox label="&engine.history.label;" - accesskey="&engine.history.accesskey;" + <checkbox data-l10n-id="sync-engine-history" preference="engine.history"/> - <checkbox label="&engine.tabs.label2;" - tooltiptext="&engine.tabs.title;" - accesskey="&engine.tabs.accesskey;" + <checkbox data-l10n-id="sync-engine-tabs" preference="engine.tabs"/> - <checkbox label="&engine.logins.label;" - tooltiptext="&engine.logins.title;" - accesskey="&engine.logins.accesskey;" + <checkbox data-l10n-id="sync-engine-logins" preference="engine.passwords"/> </vbox> <vbox flex="1"> - <checkbox label="&engine.addresses.label;" - accesskey="&engine.addresses.accesskey;" - tooltiptext="&engine.addresses.title;" + <checkbox data-l10n-id="sync-engine-addresses" preference="engine.addresses"/> - <checkbox label="&engine.creditcards.label;" - tooltiptext="&engine.creditcards.title;" - accesskey="&engine.creditcards.accesskey;" + <checkbox data-l10n-id="sync-engine-creditcards" preference="engine.creditcards"/> - <checkbox label="&engine.addons.label;" - tooltiptext="&engine.addons.title;" - accesskey="&engine.addons.accesskey;" + <checkbox data-l10n-id="sync-engine-addons" preference="engine.addons"/> - <checkbox -#ifdef XP_WIN - label="&engine.prefsWin.label;" - accesskey="&engine.prefsWin.accesskey;" -#else - label="&engine.prefs.label;" - accesskey="&engine.prefs.accesskey;" -#endif - tooltiptext="&engine.prefs.title;" + <checkbox data-l10n-id="sync-engine-prefs" preference="engine.prefs"/> </vbox> <spacer/> </hbox> </groupbox> </vbox> </hbox> <groupbox> <caption> - <label control="fxaSyncComputerName"> - &fxaSyncDeviceName.label; - </label> + <label control="fxaSyncComputerName" data-l10n-id="sync-device-name-header"/> </caption> <hbox id="fxaDeviceName"> <textbox id="fxaSyncComputerName" flex="1" disabled="true"/> <button id="fxaChangeDeviceName" - label="&changeSyncDeviceName2.label;" - accesskey="&changeSyncDeviceName2.accesskey;"/> + data-l10n-id="sync-device-name-change"/> <button id="fxaCancelChangeDeviceName" - label="&cancelChangeSyncDeviceName.label;" - accesskey="&cancelChangeSyncDeviceName.accesskey;" + data-l10n-id="sync-device-name-cancel" hidden="true"/> <button id="fxaSaveChangeDeviceName" - label="&saveChangeSyncDeviceName.label;" - accesskey="&saveChangeSyncDeviceName.accesskey;" + data-l10n-id="sync-device-name-save" hidden="true"/> </hbox> </groupbox> <vbox align="start"> <label id="mobilePromo-singledevice" - class="text-link fxaMobilePromo">&mobilepromo.singledevice;</label> + class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-single"/> <label id="mobilePromo-multidevice" - class="text-link fxaMobilePromo">&mobilepromo.multidevice;</label> + class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-multi"/> </vbox> <vbox id="tosPP-small" align="start"> - <label id="tosPP-small-ToS" class="text-link"> - &prefs.tosLink.label; - </label> - <label id="tosPP-small-PP" class="text-link"> - &fxaPrivacyNotice.link.label; - </label> + <label id="tosPP-small-ToS" class="text-link" data-l10n-id="sync-tos-link"/> + <label id="tosPP-small-PP" class="text-link" data-l10n-id="sync-fxa-privacy-notice"/> </vbox> </vbox> </deck>
--- a/browser/locales/en-US/browser/branding/sync-brand.ftl +++ b/browser/locales/en-US/browser/branding/sync-brand.ftl @@ -2,8 +2,12 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -sync-brand-short-name = Sync # “Sync” can be localized, “Firefox” must be treated as a brand, # and kept in English. -sync-brand-name = Firefox Sync + +# “Account” can be localized, “Firefox” must be treated as a brand, +# and kept in English. +-fxaccount-brand-name = Firefox Account
--- a/browser/locales/en-US/browser/preferences/preferences.ftl +++ b/browser/locales/en-US/browser/preferences/preferences.ftl @@ -466,16 +466,123 @@ containers-add-button = .label = Add New Container .accesskey = A containers-preferences-button = .label = Preferences containers-remove-button = .label = Remove +## Sync Section - Signed out + +sync-signedout-caption = Take Your Web With You +sync-signedout-description = Synchronize your bookmarks, history, tabs, passwords, add-ons, and preferences across all your devices. + +sync-signedout-account-title = Connect with a { -fxaccount-brand-name } +sync-signedout-account-create = Don’t have an account? Get started + .accesskey = c + +sync-signedout-account-signin = + .label = Sign In… + .accesskey = I + +## Sync Section - Signed in + +sync-profile-picture = + .tooltiptext = Change profile picture + +sync-disconnect = + .label = Disconnect… + .accesskey = D + +sync-manage-account = Manage account + .accesskey = o + +sync-signedin-unverified = { $email } is not verified. +sync-signedin-login-failure = Please sign in to reconnect { $email } + +sync-resend-verification = + .label = Resend Verification + .accesskey = d + +sync-remove-account = + .label = Remove Account + .accesskey = R + +sync-sign-in = + .label = Sign in + .accesskey = g + +sync-signedin-settings-header = Sync Settings +sync-signedin-settings-desc = Choose what to synchronize on your devices using { -brand-short-name } + +sync-engine-bookmarks = + .label = Bookmarks + .accesskey = m + +sync-engine-history = + .label = History + .accesskey = r + +sync-engine-tabs = + .label = Open tabs + .tooltiptext = A list of what’s open on all synced devices + .accesskey = t + +sync-engine-logins = + .label = Logins + .tooltiptext = Usernames and passwords you’ve saved + .accesskey = L + +sync-engine-addresses = + .label = Addresses + .tooltiptext = Postal addresses you’ve saved (desktop only) + .accesskey = e + +sync-engine-creditcards = + .label = Credit cards + .tooltiptext = Names, numbers and expiry dates (desktop only) + .accesskey = C + +sync-engine-addons = + .label = Add-ons + .tooltiptext = Extensions and themes for Firefox desktop + .accesskey = A + +sync-engine-prefs = + .label = + { PLATFORM() -> + [windows] Options + *[other] Preferences + } + .tooltiptext = General, Privacy, and Security settings you’ve changed + .accesskey = s + +sync-device-name-header = Device Name + +sync-device-name-change = + .label = Change Device Name… + .accesskey = h + +sync-device-name-cancel = + .label = Cancel + .accesskey = n + +sync-device-name-save = + .label = Save + .accesskey = v + +sync-mobilepromo-single = Connect another device + +sync-mobilepromo-multi = Manage devices + +sync-tos-link = Terms of Service + +sync-fxa-privacy-notice = Privacy Notice + ## Privacy Section privacy-header = Browser Privacy ## Privacy Section - Forms forms-header = Forms & Passwords forms-remember-logins =
deleted file mode 100644 --- a/browser/locales/en-US/chrome/browser/preferences/preferences.dtd +++ /dev/null @@ -1,6 +0,0 @@ -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<!-- LOCALIZATION NOTE (paneSync1.title): This should match syncBrand.fxAccount.label in ../syncBrand.dtd --> -<!ENTITY paneSync1.title "Firefox Account">
--- a/browser/locales/en-US/chrome/browser/preferences/sync.dtd +++ b/browser/locales/en-US/chrome/browser/preferences/sync.dtd @@ -1,106 +1,19 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<!-- The page shown when logged in... --> - -<!ENTITY engine.bookmarks.label "Bookmarks"> -<!ENTITY engine.bookmarks.accesskey "m"> -<!ENTITY engine.tabs.label2 "Open tabs"> -<!ENTITY engine.tabs.title "A list of what’s open on all synced devices"> -<!ENTITY engine.tabs.accesskey "T"> -<!ENTITY engine.history.label "History"> -<!ENTITY engine.history.accesskey "r"> -<!ENTITY engine.logins.label "Logins"> -<!ENTITY engine.logins.title "Usernames and passwords you’ve saved"> -<!ENTITY engine.logins.accesskey "L"> -<!-- On Windows we use the term "Options" to describe settings, but - on Linux and Mac OS X we use "Preferences" - carry that distinction - over into this string, used as the checkbox which indicates if prefs are synced ---> -<!ENTITY engine.prefsWin.label "Options"> -<!ENTITY engine.prefsWin.accesskey "S"> -<!ENTITY engine.prefs.label "Preferences"> -<!ENTITY engine.prefs.accesskey "S"> -<!ENTITY engine.prefs.title "General, Privacy, and Security settings you’ve changed"> -<!ENTITY engine.addons.label "Add-ons"> -<!ENTITY engine.addons.title "Extensions and themes for Firefox desktop"> -<!ENTITY engine.addons.accesskey "A"> -<!ENTITY engine.addresses.label "Addresses"> -<!ENTITY engine.addresses.title "Postal addresses you’ve saved (desktop only)"> -<!ENTITY engine.addresses.accesskey "e"> -<!ENTITY engine.creditcards.label "Credit cards"> -<!ENTITY engine.creditcards.title "Names, numbers and expiry dates (desktop only)"> -<!ENTITY engine.creditcards.accesskey "C"> - -<!-- Device Settings --> -<!ENTITY fxaSyncDeviceName.label "Device Name"> -<!ENTITY changeSyncDeviceName2.label "Change Device Name…"> -<!ENTITY changeSyncDeviceName2.accesskey "h"> -<!ENTITY cancelChangeSyncDeviceName.label "Cancel"> -<!ENTITY cancelChangeSyncDeviceName.accesskey "n"> -<!ENTITY saveChangeSyncDeviceName.label "Save"> -<!ENTITY saveChangeSyncDeviceName.accesskey "v"> - -<!-- Footer stuff --> -<!ENTITY prefs.tosLink.label "Terms of Service"> -<!ENTITY fxaPrivacyNotice.link.label "Privacy Notice"> - -<!-- LOCALIZATION NOTE (signedInUnverified.beforename.label, -signedInUnverified.aftername.label): these two string are used respectively -before and after the account email address. Localizers can use one of them, or -both, to better adapt this sentence to their language. ---> -<!ENTITY signedInUnverified.beforename.label ""> -<!ENTITY signedInUnverified.aftername.label "is not verified."> - -<!-- LOCALIZATION NOTE (signedInLoginFailure.beforename.label, -signedInLoginFailure.aftername.label): these two string are used respectively -before and after the account email address. Localizers can use one of them, or -both, to better adapt this sentence to their language. ---> -<!ENTITY signedInLoginFailure.beforename.label "Please sign in to reconnect"> -<!ENTITY signedInLoginFailure.aftername.label ""> - -<!ENTITY notSignedIn.label "You are not signed in."> -<!ENTITY signIn.label "Sign in"> -<!ENTITY signIn.accesskey "g"> -<!ENTITY profilePicture.tooltip "Change profile picture"> -<!ENTITY verifiedManage.label "Manage account"> -<!ENTITY verifiedManage.accesskey "o"> -<!ENTITY disconnect3.label "Disconnect…"> -<!ENTITY disconnect3.accesskey "D"> -<!ENTITY resendVerification.label "Resend Verification"> -<!ENTITY resendVerification.accesskey "d"> -<!ENTITY removeAccount.label "Remove Account"> -<!ENTITY removeAccount.accesskey "R"> - -<!ENTITY signedOut.caption "Take Your Web With You"> -<!ENTITY signedOut.description "Synchronize your bookmarks, history, tabs, passwords, add-ons, and preferences across all your devices."> -<!ENTITY signedOut.accountBox.title "Connect with a &syncBrand.fxAccount.label;"> -<!ENTITY signedOut.accountBox.create2 "Don’t have an account? Get started"> -<!ENTITY signedOut.accountBox.create2.accesskey "C"> -<!ENTITY signedOut.accountBox.signin2 "Sign In…"> -<!ENTITY signedOut.accountBox.signin2.accesskey "I"> - -<!ENTITY signedIn.settings.label "Sync Settings"> -<!ENTITY signedIn.settings.description "Choose what to synchronize on your devices using &brandShortName;."> - <!-- LOCALIZATION NOTE (mobilePromo3.*): the following strings will be used to create a single sentence with active links. The resulting sentence in English is: "Download Firefox for Android or iOS to sync with your mobile device." --> <!ENTITY mobilePromo3.start "Download Firefox for "> <!-- LOCALIZATION NOTE (mobilePromo3.androidLink): This is a link title that links to https://www.mozilla.org/firefox/android/ --> <!ENTITY mobilePromo3.androidLink "Android"> <!-- LOCALIZATION NOTE (mobilePromo3.iOSBefore): This is text displayed between mobilePromo3.androidLink and mobilePromo3.iosLink --> <!ENTITY mobilePromo3.iOSBefore " or "> <!-- LOCALIZATION NOTE (mobilePromo3.iOSLink): This is a link title that links to https://www.mozilla.org/firefox/ios/ --> <!ENTITY mobilePromo3.iOSLink "iOS"> <!ENTITY mobilePromo3.end " to sync with your mobile device."> - -<!ENTITY mobilepromo.singledevice "Connect another device"> -<!ENTITY mobilepromo.multidevice "Manage devices">
--- a/browser/locales/jar.mn +++ b/browser/locales/jar.mn @@ -65,17 +65,16 @@ locale/browser/preferences/colors.dtd (%chrome/browser/preferences/colors.dtd) locale/browser/preferences/connection.dtd (%chrome/browser/preferences/connection.dtd) locale/browser/preferences/content.dtd (%chrome/browser/preferences/content.dtd) locale/browser/preferences/cookies.dtd (%chrome/browser/preferences/cookies.dtd) locale/browser/preferences/fonts.dtd (%chrome/browser/preferences/fonts.dtd) locale/browser/preferences/languages.dtd (%chrome/browser/preferences/languages.dtd) locale/browser/preferences/main.dtd (%chrome/browser/preferences/main.dtd) locale/browser/preferences/permissions.dtd (%chrome/browser/preferences/permissions.dtd) - locale/browser/preferences/preferences.dtd (%chrome/browser/preferences/preferences.dtd) locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties) locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd) locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd) locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd) locale/browser/preferences/siteDataSettings.dtd (%chrome/browser/preferences/siteDataSettings.dtd) locale/browser/preferences/sync.dtd (%chrome/browser/preferences/sync.dtd) locale/browser/preferences/translation.dtd (%chrome/browser/preferences/translation.dtd) locale/browser/syncBrand.dtd (%chrome/browser/syncBrand.dtd)
--- a/browser/themes/shared/incontentprefs/preferences.inc.css +++ b/browser/themes/shared/incontentprefs/preferences.inc.css @@ -599,20 +599,16 @@ button > hbox > label { .openLink:visited { color: var(--in-content-link-color); } #fxaDisplayName { margin-inline-end: 10px !important; } -.fxaEmailAddress { - margin-inline-end: 8px !important; -} - .fxaLoginRejectedWarning { list-style-image: url(chrome://browser/skin/warning.svg); margin-inline-start: 4px; margin-inline-end: 8px; } #fxaSyncEngines > vbox > checkbox { max-width: 224px;
new file mode 100644 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1445694_preferences_sync.py @@ -0,0 +1,563 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from __future__ import absolute_import +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import MESSAGE_REFERENCE, EXTERNAL_ARGUMENT +from fluent.migrate import COPY, CONCAT, REPLACE + +# Custom extension of the CONCAT migration tailored to concat +# two strings separated by a placeable. +class CONCAT_BEFORE_AFTER(CONCAT): + def __call__(self, ctx): + assert len(self.elements) == 3 + pattern_before, placeable, pattern_after = self.elements + elem_before = pattern_before.elements[0] + elem_after = pattern_after.elements[0] + + if isinstance(elem_before, FTL.TextElement) and elem_before.value[-1] != " ": + elem_before.value += " " + if isinstance(elem_after, FTL.TextElement) and elem_after.value[0] != " ": + elem_after.value = " " + elem_after.value + return super(CONCAT_BEFORE_AFTER, self).__call__(ctx) + +def migrate(ctx): + """Bug 1445694 - Migrate Preferences::Sync to Fluent, part {index}.""" + + ctx.add_transforms( + 'browser/browser/branding/sync-brand.ftl', + 'browser/browser/branding/sync-brand.ftl', + [ + FTL.Term( + id=FTL.Identifier('-fxaccount-brand-name'), + value=COPY( + 'browser/chrome/browser/syncBrand.dtd', + 'syncBrand.fxAccount.label' + ) + ), + ] + ) + + ctx.add_transforms( + 'browser/browser/preferences/preferences.ftl', + 'browser/browser/preferences/preferences.ftl', + [ + FTL.Message( + id=FTL.Identifier('sync-signedout-caption'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.caption', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-signedout-description'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.description', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-signedout-account-title'), + value=REPLACE( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.accountBox.title', + { + '&syncBrand.fxAccount.label;': MESSAGE_REFERENCE('-fxaccount-brand-name') + }, + ), + ), + FTL.Message( + id=FTL.Identifier('sync-signedout-account-create'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.accountBox.create2', + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.accountBox.create2.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-signedout-account-signin'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.accountBox.signin2', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedOut.accountBox.signin2.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-profile-picture'), + attributes=[ + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'profilePicture.tooltip', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-disconnect'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'disconnect3.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'disconnect3.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-manage-account'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'verifiedManage.label', + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'verifiedManage.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-signedin-unverified'), + value=CONCAT_BEFORE_AFTER( + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedInUnverified.beforename.label', + ), + EXTERNAL_ARGUMENT('email'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedInUnverified.aftername.label', + ), + ), + ), + FTL.Message( + id=FTL.Identifier('sync-signedin-login-failure'), + value=CONCAT_BEFORE_AFTER( + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedInLoginFailure.beforename.label', + ), + EXTERNAL_ARGUMENT('email'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedInLoginFailure.aftername.label', + ), + ) + ), + FTL.Message( + id=FTL.Identifier('sync-resend-verification'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'resendVerification.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'resendVerification.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-remove-account'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'removeAccount.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'removeAccount.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-sign-in'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signIn.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signIn.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-signedin-settings-header'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedIn.settings.label', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-signedin-settings-desc'), + value=REPLACE( + 'browser/chrome/browser/preferences/sync.dtd', + 'signedIn.settings.description', + { + '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') + }, + ), + ), + FTL.Message( + id=FTL.Identifier('sync-engine-bookmarks'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.bookmarks.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.bookmarks.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-history'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.history.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.history.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-tabs'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.tabs.label2', + ), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.tabs.title', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.tabs.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-logins'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.logins.label', + ), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.logins.title', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.logins.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-addresses'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addresses.label', + ), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addresses.title', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addresses.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-creditcards'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.creditcards.label', + ), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.creditcards.title', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.creditcards.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-addons'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addons.label', + ), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addons.title', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.addons.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-engine-prefs'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + FTL.Pattern([ + FTL.Placeable(FTL.SelectExpression( + expression=FTL.CallExpression( + callee=FTL.Identifier('PLATFORM') + ), + variants=[ + FTL.Variant( + key=FTL.VariantName('windows'), + default=False, + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.prefsWin.label' + ) + ), + FTL.Variant( + key=FTL.VariantName('other'), + default=True, + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.prefs.label' + ) + ) + ] + )), + ]), + ), + FTL.Attribute( + FTL.Identifier('tooltiptext'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.prefs.title' + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'engine.prefs.accesskey' + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-device-name-header'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'fxaSyncDeviceName.label', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-device-name-change'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'changeSyncDeviceName2.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'changeSyncDeviceName2.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-device-name-cancel'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'cancelChangeSyncDeviceName.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'cancelChangeSyncDeviceName.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-device-name-save'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'saveChangeSyncDeviceName.label', + ), + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'saveChangeSyncDeviceName.accesskey', + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier('sync-mobilepromo-single'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'mobilepromo.singledevice', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-mobilepromo-multi'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'mobilepromo.multidevice', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-tos-link'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'prefs.tosLink.label', + ), + ), + FTL.Message( + id=FTL.Identifier('sync-fxa-privacy-notice'), + value=COPY( + 'browser/chrome/browser/preferences/sync.dtd', + 'fxaPrivacyNotice.link.label', + ), + ), + ] + )