Bug 1580906 p1 - Update page action menu Send Tab copy. r=vbudhram

Differential Revision: https://phabricator.services.mozilla.com/D45728

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Edouard Oger 2019-09-18 18:36:51 +00:00
Родитель 27c798ba32
Коммит 79295df67b
4 изменённых файлов: 24 добавлений и 17 удалений

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

@ -944,8 +944,12 @@ var gSync = {
},
_appendSendTabUnconfigured(fragment, createDeviceNodeFn) {
const notConnected = this.fxaStrings.GetStringFromName(
"sendTabToDevice.unconfigured.status"
const brandProductName = this.brandStrings.GetStringFromName(
"brandProductName"
);
const notConnected = this.fxaStrings.formatStringFromName(
"sendTabToDevice.unconfigured.label",
[brandProductName]
);
const learnMore = this.fxaStrings.GetStringFromName(
"sendTabToDevice.unconfigured"
@ -960,13 +964,14 @@ var gSync = {
actions
);
// Now add a 'sign in to sync' item above the 'learn more' item.
const signInToSync = this.fxaStrings.GetStringFromName(
"sendTabToDevice.signintosync"
// Now add a 'sign in to Firefox' item above the 'learn more' item.
const signInToFxA = this.fxaStrings.formatStringFromName(
"sendTabToDevice.signintofxa",
[brandProductName]
);
let signInItem = createDeviceNodeFn(null, signInToSync, null);
let signInItem = createDeviceNodeFn(null, signInToFxA, null);
signInItem.classList.add("sync-menuitem");
signInItem.setAttribute("label", signInToSync);
signInItem.setAttribute("label", signInToFxA);
// Show an icon if opened in the page action panel:
if (signInItem.classList.contains("subviewbutton")) {
signInItem.classList.add("subviewbutton-iconic", "signintosync");

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

@ -491,14 +491,14 @@ add_task(async function sendToDevice_notSignedIn() {
},
{
attrs: {
label: "Not Connected to Sync",
label: "Not Connected to Firefox",
},
disabled: true,
},
null,
{
attrs: {
label: "Sign in to Sync...",
label: "Sign in to Firefox...",
},
},
{

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

@ -249,9 +249,9 @@ add_task(async function test_page_contextmenu_unconfigured() {
"Send tab to device is enabled"
);
checkPopup([
{ label: "Not Connected to Sync", disabled: true },
{ label: "Not Connected to Firefox", disabled: true },
"----",
{ label: "Sign in to Sync..." },
{ label: "Sign in to Firefox..." },
{ label: "Learn About Sending Tabs..." },
]);

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

@ -39,16 +39,18 @@ deviceDisconnectedNotification.body = This computer has been successfully discon
# Displayed in the Send Tab/Page/Link to Device context menu when right clicking a tab, a page or a link.
sendToAllDevices.menuitem = Send to All Devices
# LOCALIZATION NOTE (sendTabToDevice.unconfigured, sendTabToDevice.unconfigured.status)
# LOCALIZATION NOTE (sendTabToDevice.unconfigured, sendTabToDevice.unconfigured.label)
# Displayed in the Send Tabs context menu when right clicking a tab, a page or a link
# and the Sync account is unconfigured. Redirects to a marketing page.
sendTabToDevice.unconfigured.status = Not Connected to Sync
# %S is replaced by brandProductName.
sendTabToDevice.unconfigured.label = Not Connected to %S
sendTabToDevice.unconfigured = Learn About Sending Tabs…
# LOCALIZATION NOTE (sendTabToDevice.signintosync)
# Displayed in the Send Tabs context menu and the page action panel when sync is not
# configured. Allows users to immediately sign into sync via the preferences.
sendTabToDevice.signintosync = Sign in to Sync…
# LOCALIZATION NOTE (sendTabToDevice.signintofxa)
# Displayed in the Send Tabs context menu and the page action panel when FxA is not
# configured. Allows users to immediately sign into FxA via the preferences.
# %S is replaced by brandProductName.
sendTabToDevice.signintofxa = Sign in to %S…
# LOCALIZATION NOTE (sendTabToDevice.singledevice, sendTabToDevice.connectdevice,
# sendTabToDevice.singledevice.status)