mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1213906-Change email invitation to fit new user journey, r=dmose
This commit is contained in:
parent
7961821d7c
commit
3249757e08
@ -356,11 +356,11 @@ loop.store = loop.store || {};
|
||||
|
||||
switch (providerOrigin) {
|
||||
case "mail.google.com":
|
||||
shareTitle = mozL10n.get("share_email_subject6");
|
||||
shareBody = mozL10n.get("share_email_body6", {
|
||||
shareTitle = mozL10n.get("share_email_subject7");
|
||||
shareBody = mozL10n.get("share_email_body7", {
|
||||
callUrl: actionData.roomUrl
|
||||
});
|
||||
shareBody += mozL10n.get("share_email_footer");
|
||||
shareBody += mozL10n.get("share_email_footer2");
|
||||
break;
|
||||
case "twitter.com":
|
||||
default:
|
||||
|
@ -268,10 +268,18 @@ loop.roomViews = (function(mozL10n) {
|
||||
|
||||
var roomData = this.props.roomData;
|
||||
var contextURL = roomData.roomContextUrls && roomData.roomContextUrls[0];
|
||||
if (contextURL) {
|
||||
if (contextURL.location === null) {
|
||||
contextURL = undefined;
|
||||
} else {
|
||||
contextURL = sharedUtils.formatURL(contextURL.location).hostname;
|
||||
}
|
||||
}
|
||||
|
||||
this.props.dispatcher.dispatch(
|
||||
new sharedActions.EmailRoomUrl({
|
||||
roomUrl: roomData.roomUrl,
|
||||
roomDescription: contextURL && contextURL.description,
|
||||
roomDescription: contextURL,
|
||||
from: "conversation"
|
||||
}));
|
||||
},
|
||||
|
@ -268,10 +268,18 @@ loop.roomViews = (function(mozL10n) {
|
||||
|
||||
var roomData = this.props.roomData;
|
||||
var contextURL = roomData.roomContextUrls && roomData.roomContextUrls[0];
|
||||
if (contextURL) {
|
||||
if (contextURL.location === null) {
|
||||
contextURL = undefined;
|
||||
} else {
|
||||
contextURL = sharedUtils.formatURL(contextURL.location).hostname;
|
||||
}
|
||||
}
|
||||
|
||||
this.props.dispatcher.dispatch(
|
||||
new sharedActions.EmailRoomUrl({
|
||||
roomUrl: roomData.roomUrl,
|
||||
roomDescription: contextURL && contextURL.description,
|
||||
roomDescription: contextURL,
|
||||
from: "conversation"
|
||||
}));
|
||||
},
|
||||
|
@ -391,17 +391,16 @@ var inChrome = typeof Components != "undefined" && "utils" in Components;
|
||||
}
|
||||
|
||||
var subject, body;
|
||||
var footer = mozL10n.get("share_email_footer");
|
||||
|
||||
var footer = mozL10n.get("share_email_footer2");
|
||||
if (contextDescription) {
|
||||
subject = mozL10n.get("share_email_subject6");
|
||||
body = mozL10n.get("share_email_body_context2", {
|
||||
subject = mozL10n.get("share_email_subject7");
|
||||
body = mozL10n.get("share_email_body_context3", {
|
||||
callUrl: callUrl,
|
||||
title: contextDescription
|
||||
});
|
||||
} else {
|
||||
subject = mozL10n.get("share_email_subject6");
|
||||
body = mozL10n.get("share_email_body6", {
|
||||
subject = mozL10n.get("share_email_subject7");
|
||||
body = mozL10n.get("share_email_body7", {
|
||||
callUrl: callUrl
|
||||
});
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ describe("loop.store.RoomStore", function() {
|
||||
|
||||
sinon.assert.calledOnce(fakeMozLoop.socialShareRoom);
|
||||
sinon.assert.calledWithExactly(fakeMozLoop.socialShareRoom, origin,
|
||||
roomUrl, "share_email_subject6", "share_email_body6" + "share_email_footer");
|
||||
roomUrl, "share_email_subject7", "share_email_body7" + "share_email_footer2");
|
||||
});
|
||||
|
||||
it("should pass the correct data for all other Social Providers", function() {
|
||||
|
@ -212,7 +212,8 @@ describe("loop.roomViews", function() {
|
||||
React.createElement(loop.roomViews.DesktopRoomInvitationView, props));
|
||||
}
|
||||
|
||||
it("should dispatch an EmailRoomUrl action when the email button is pressed",
|
||||
it("should dispatch an EmailRoomUrl with no description" +
|
||||
" for rooms without context when the email button is pressed",
|
||||
function() {
|
||||
view = mountTestComponent({
|
||||
roomData: { roomUrl: "http://invalid" }
|
||||
@ -231,14 +232,13 @@ describe("loop.roomViews", function() {
|
||||
}));
|
||||
});
|
||||
|
||||
it("should dispatch a different EmailRoomUrl action for rooms with context",
|
||||
it("should dispatch an EmailRoomUrl with a domain name description for rooms with context",
|
||||
function() {
|
||||
var url = "http://invalid";
|
||||
var description = "Hello, is it me you're looking for?";
|
||||
view = mountTestComponent({
|
||||
roomData: {
|
||||
roomUrl: url,
|
||||
roomContextUrls: [{ description: description }]
|
||||
roomContextUrls: [{ location: "http://www.mozilla.com/" }]
|
||||
}
|
||||
});
|
||||
|
||||
@ -250,7 +250,7 @@ describe("loop.roomViews", function() {
|
||||
sinon.assert.calledWith(dispatcher.dispatch,
|
||||
new sharedActions.EmailRoomUrl({
|
||||
roomUrl: url,
|
||||
roomDescription: description,
|
||||
roomDescription: "www.mozilla.com",
|
||||
from: "conversation"
|
||||
}));
|
||||
});
|
||||
|
@ -322,13 +322,13 @@ describe("loop.shared.utils", function() {
|
||||
// fake mozL10n
|
||||
sandbox.stub(navigator.mozL10n, "get", function(id) {
|
||||
switch (id) {
|
||||
case "share_email_subject6":
|
||||
case "share_email_subject7":
|
||||
return "subject";
|
||||
case "share_email_body6":
|
||||
case "share_email_body7":
|
||||
return "body";
|
||||
case "share_email_body_context2":
|
||||
case "share_email_body_context3":
|
||||
return "body_context";
|
||||
case "share_email_footer":
|
||||
case "share_email_footer2":
|
||||
return "footer";
|
||||
}
|
||||
});
|
||||
|
@ -59,15 +59,15 @@ problem_accessing_account=There Was A Problem Accessing Your Account
|
||||
## the appropriate action.
|
||||
retry_button=Retry
|
||||
|
||||
share_email_subject6=Join me for a video conversation
|
||||
## LOCALIZATION NOTE (share_email_body6): In this item, don't translate the
|
||||
share_email_subject7=Your invitation to browse the Web together
|
||||
## LOCALIZATION NOTE (share_email_body7): In this item, don't translate the
|
||||
## part between {{..}} and leave the \n\n part alone
|
||||
share_email_body6=Click the Firefox Hello link to connect to the conversation now: {{callUrl}}
|
||||
## LOCALIZATION NOTE (share_email_body_context2): In this item, don't translate
|
||||
share_email_body7=A friend is waiting for you on Firefox Hello. Click the link to connect and browse the Web together: {{callUrl}}
|
||||
## LOCALIZATION NOTE (share_email_body_context3): In this item, don't translate
|
||||
## the part between {{..}} and leave the \n\n part alone.
|
||||
share_email_body_context2=Join me for a video conversation. Click the Firefox Hello link to connect now: {{callUrl}}\n\nLet’s talk about this during our conversation: {{title}}
|
||||
## LOCALIZATION NOTE (share_email_footer): Common footer content for both email types
|
||||
share_email_footer=\n\n________\nJoin and create video conversations free with Firefox Hello. Connect easily over video with anyone, anywhere. No downloads or registration. Learn more at http://www.firefox.com/hello
|
||||
share_email_body_context3=A friend is waiting for you on Firefox Hello. Click the link to connect and browse {{title}} together: {{callUrl}}
|
||||
## LOCALIZATION NOTE (share_email_footer2): Common footer content for both email types
|
||||
share_email_footer2=\n\n____________\nFirefox Hello lets you browse the Web with your friends. Use it when you want to get things done: plan together, work together, laugh together. Learn more at http://www.firefox.com/hello
|
||||
## LOCALIZATION NOTE (share_tweeet): In this item, don't translate the part
|
||||
## between {{..}}. Please keep the text below 117 characters to make sure it fits
|
||||
## in a tweet.
|
||||
@ -216,6 +216,11 @@ no_conversations_start_message2=Start a new one!
|
||||
# conversation window when the user edits context. It is a header to the edit
|
||||
# section.
|
||||
context_inroom_header=Let's Talk About…
|
||||
# LOCALIZATION NOTE (context_inroom_label2): this string is followed by the
|
||||
# title and domain of the website you are having a conversation about, displayed on a
|
||||
# separate line. If this structure doesn't work for your locale, you might want
|
||||
# to consider this as a stand-alone title. See example screenshot:
|
||||
# https://bug1115342.bugzilla.mozilla.org/attachment.cgi?id=8563677
|
||||
context_edit_name_placeholder=Conversation Name
|
||||
context_edit_comments_placeholder=Comments
|
||||
context_cancel_label=Cancel
|
||||
|
Loading…
Reference in New Issue
Block a user