From d424f255510366ce4900449dd35bb8016af5a97c Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Thu, 9 Oct 2014 11:45:04 -0400 Subject: [PATCH] Bug 1079430 - Land the new Loop strings for Firefox 35. r=Standard8 --- browser/app/profile/firefox.js | 1 + .../customizableui/CustomizableWidgets.jsm | 5 +- browser/components/loop/MozLoopService.jsm | 2 +- browser/components/loop/content/js/panel.js | 9 ++-- browser/components/loop/content/js/panel.jsx | 9 ++-- .../loop/standalone/content/js/webapp.js | 2 +- .../loop/standalone/content/js/webapp.jsx | 2 +- .../content/l10n/loop.en-US.properties | 32 ++++++++++++- .../loop/test/desktop-local/panel_test.js | 4 +- .../customizableWidgets.properties | 4 +- .../en-US/chrome/browser/loop/loop.properties | 46 +++++++++++++++++-- 11 files changed, 94 insertions(+), 22 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 9adbd75e47aa..f91abd13d5ae 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1607,6 +1607,7 @@ pref("loop.soft_start_hostname", "soft-start.loop.services.mozilla.com"); pref("loop.server", "https://loop.services.mozilla.com"); pref("loop.seenToS", "unseen"); +pref("loop.learnMoreUrl", "https://www.firefox.com/hello/"); pref("loop.legal.ToS_url", "https://call.mozilla.com/legal/terms/"); pref("loop.legal.privacy_url", "https://www.mozilla.org/privacy/"); pref("loop.do_not_disturb", false); diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 07bae5e6ca2f..0f64994265b4 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -905,9 +905,8 @@ const CustomizableWidgets = [ }, { id: "loop-call-button", type: "custom", - // XXX Bug 1013989 will provide a label for the button - label: "loop-call-button.label", - tooltiptext: "loop-call-button.tooltiptext", + label: "loop-call-button2.label", + tooltiptext: "loop-call-button2.tooltiptext", defaultArea: CustomizableUI.AREA_NAVBAR, introducedInVersion: 1, onBuild: function(aDocument) { diff --git a/browser/components/loop/MozLoopService.jsm b/browser/components/loop/MozLoopService.jsm index 3a19143bfd63..389079b2cce8 100644 --- a/browser/components/loop/MozLoopService.jsm +++ b/browser/components/loop/MozLoopService.jsm @@ -1353,7 +1353,7 @@ this.MozLoopService = { getStrings: function(key) { var stringData = MozLoopServiceInternal.localizedStrings; if (!(key in stringData)) { - Cu.reportError('No string for key: ' + key + 'found'); + log.error("No string found for key: ", key); return ""; } diff --git a/browser/components/loop/content/js/panel.js b/browser/components/loop/content/js/panel.js index e32819d7cb3e..2a8a96deb592 100644 --- a/browser/components/loop/content/js/panel.js +++ b/browser/components/loop/content/js/panel.js @@ -168,7 +168,7 @@ loop.panel = (function(_, mozL10n) { var terms_of_use_url = navigator.mozLoop.getLoopCharPref('legal.ToS_url'); var privacy_notice_url = navigator.mozLoop.getLoopCharPref('legal.privacy_url'); var tosHTML = __("legal_text_and_links3", { - "clientShortname": __("client_shortname_fallback"), + "clientShortname": __("clientShortname2"), "terms_of_use": React.renderComponentToStaticMarkup( React.DOM.a({href: terms_of_use_url, target: "_blank"}, __("legal_text_tos") @@ -366,8 +366,11 @@ loop.panel = (function(_, mozL10n) { handleEmailButtonClick: function(event) { this.handleLinkExfiltration(event); - navigator.mozLoop.composeEmail(__("share_email_subject3"), - __("share_email_body3", { callUrl: this.state.callUrl })); + navigator.mozLoop.composeEmail( + __("share_email_subject4", { clientShortname: __("clientShortname2")}), + __("share_email_body4", { callUrl: this.state.callUrl, + clientShortname: __("clientShortname2"), + learnMoreUrl: navigator.mozLoop.getLoopCharPref("learnMoreUrl") })); }, handleCopyButtonClick: function(event) { diff --git a/browser/components/loop/content/js/panel.jsx b/browser/components/loop/content/js/panel.jsx index 28823439c5f8..2a4b63ec9801 100644 --- a/browser/components/loop/content/js/panel.jsx +++ b/browser/components/loop/content/js/panel.jsx @@ -168,7 +168,7 @@ loop.panel = (function(_, mozL10n) { var terms_of_use_url = navigator.mozLoop.getLoopCharPref('legal.ToS_url'); var privacy_notice_url = navigator.mozLoop.getLoopCharPref('legal.privacy_url'); var tosHTML = __("legal_text_and_links3", { - "clientShortname": __("client_shortname_fallback"), + "clientShortname": __("clientShortname2"), "terms_of_use": React.renderComponentToStaticMarkup( {__("legal_text_tos")} @@ -366,8 +366,11 @@ loop.panel = (function(_, mozL10n) { handleEmailButtonClick: function(event) { this.handleLinkExfiltration(event); - navigator.mozLoop.composeEmail(__("share_email_subject3"), - __("share_email_body3", { callUrl: this.state.callUrl })); + navigator.mozLoop.composeEmail( + __("share_email_subject4", { clientShortname: __("clientShortname2")}), + __("share_email_body4", { callUrl: this.state.callUrl, + clientShortname: __("clientShortname2"), + learnMoreUrl: navigator.mozLoop.getLoopCharPref("learnMoreUrl") })); }, handleCopyButtonClick: function(event) { diff --git a/browser/components/loop/standalone/content/js/webapp.js b/browser/components/loop/standalone/content/js/webapp.js index 2d683325a439..a3c2206d350a 100644 --- a/browser/components/loop/standalone/content/js/webapp.js +++ b/browser/components/loop/standalone/content/js/webapp.js @@ -118,7 +118,7 @@ loop.webapp = (function($, _, OT, mozL10n) { return ( React.DOM.h1({className: "standalone-header-title"}, React.DOM.strong(null, mozL10n.get("brandShortname")), - mozL10n.get("clientShortname") + mozL10n.get("clientShortname2") ) ); } diff --git a/browser/components/loop/standalone/content/js/webapp.jsx b/browser/components/loop/standalone/content/js/webapp.jsx index e80e79d61365..3137dc481175 100644 --- a/browser/components/loop/standalone/content/js/webapp.jsx +++ b/browser/components/loop/standalone/content/js/webapp.jsx @@ -118,7 +118,7 @@ loop.webapp = (function($, _, OT, mozL10n) { return (

{mozL10n.get("brandShortname")} - {mozL10n.get("clientShortname")} + {mozL10n.get("clientShortname2")}

); } diff --git a/browser/components/loop/standalone/content/l10n/loop.en-US.properties b/browser/components/loop/standalone/content/l10n/loop.en-US.properties index 2a319ee85fa0..e3d221ee95bd 100644 --- a/browser/components/loop/standalone/content/l10n/loop.en-US.properties +++ b/browser/components/loop/standalone/content/l10n/loop.en-US.properties @@ -41,8 +41,15 @@ initiate_call_cancel_button=Cancel legal_text_and_links=By using this product you agree to the {{terms_of_use_url}} and {{privacy_notice_url}} terms_of_use_link_text=Terms of use privacy_notice_link_text=Privacy notice +invite_header_text=Invite someone to join you. + +## LOCALIZATION NOTE(brandShortname): This should not be localized and +## should remain "Firefox" for all locales. brandShortname=Firefox -clientShortname=WebRTC! +## LOCALIZATION NOTE(clientShortname2): This should not be localized and +## should remain "Firefox Hello" for all locales. +clientShortname2=Firefox Hello + ## LOCALIZATION NOTE (call_url_creation_date_label): Example output: (from May 26, 2014) call_url_creation_date_label=(from {{call_url_creation_date}}) call_progress_connecting_description=Connecting… @@ -77,3 +84,26 @@ feedback_rejoin_button=Rejoin ## LOCALIZATION NOTE (feedback_report_user_button): Used to report a user in the case of ## an abusive user. feedback_report_user_button=Report User + +## LOCALIZATION_NOTE(first_time_experience.title): clientShortname will be +## replaced by the brand name +first_time_experience_title={{clientShortname}} — Join the conversation +first_time_experience_button_label=Get Started + +help_label=Help +tour_label=Tour + +rooms_default_room_name_template=Conversation {{conversationLabel}} +rooms_leave_button_label=Leave +rooms_list_copy_url_tooltip=Copy Link +rooms_list_delete_tooltip=Delete conversation +rooms_list_deleteConfirmation_label=Are you sure? +rooms_name_this_room_label=Name this conversation +rooms_new_room_button_label=Start a conversation +rooms_only_occupant_label=You're the first one here. +rooms_panel_title=Choose a conversation or start a new one +rooms_room_full_label=There are already two people in this conversation. +rooms_room_full_call_to_action_nonFx_label=Download {{brandShortname}} to start your own +rooms_room_full_call_to_action_label=Learn more about {{clientShortname}} » +rooms_room_joined_label=Someone has joined the conversation! +rooms_room_join_label=Join the conversation diff --git a/browser/components/loop/test/desktop-local/panel_test.js b/browser/components/loop/test/desktop-local/panel_test.js index d37dc1f28211..c86baeafab26 100644 --- a/browser/components/loop/test/desktop-local/panel_test.js +++ b/browser/components/loop/test/desktop-local/panel_test.js @@ -394,9 +394,9 @@ describe("loop.panel", function() { getStrings: function(key) { var text; - if (key === "share_email_subject3") + if (key === "share_email_subject4") text = "email-subject"; - else if (key === "share_email_body3") + else if (key === "share_email_body4") text = "{{callUrl}}"; return JSON.stringify({textContent: text}); diff --git a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties index da49dc4ad5d4..11554f9c616d 100644 --- a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties +++ b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties @@ -97,8 +97,8 @@ quit-button.tooltiptext.linux2 = Quit %1$S (%2$S) # %2$S is the keyboard shortcut quit-button.tooltiptext.mac = Quit %1$S (%2$S) -loop-call-button.label = Invite someone to talk -loop-call-button.tooltiptext = Invite someone to talk +loop-call-button2.label = Start a conversation +loop-call-button2.tooltiptext = Start a conversation panic-button.label = Forget panic-button.tooltiptext = Forget about some browsing history diff --git a/browser/locales/en-US/chrome/browser/loop/loop.properties b/browser/locales/en-US/chrome/browser/loop/loop.properties index 4dc621ff1892..2f23c6772803 100644 --- a/browser/locales/en-US/chrome/browser/loop/loop.properties +++ b/browser/locales/en-US/chrome/browser/loop/loop.properties @@ -4,7 +4,17 @@ # Panel Strings +## LOCALIZATION NOTE(clientShortname2): This should not be localized and +## should remain "Firefox Hello" for all locales. +clientShortname2=Firefox Hello + +## LOCALIZATION_NOTE(first_time_experience.title): clientShortname will be +## replaced by the brand name +first_time_experience_title={{clientShortname}} — Join the conversation +first_time_experience_button_label=Get Started + share_link_header_text=Share this link to invite someone to talk: +invite_header_text=Invite someone to join you. ## LOCALIZATION NOTE(invitee_name_label): Displayed when obtaining a url. ## See https://people.mozilla.org/~dhenein/labs/loop-mvp-spec/#precall-firstrun @@ -52,12 +62,14 @@ problem_accessing_account=There Was A Problem Accessing Your Account ## See https://people.mozilla.org/~dhenein/labs/loop-mvp-spec/#error for location retry_button=Retry -share_email_subject3=You have been invited to a conversation -## LOCALIZATION NOTE (share_email_body3): In this item, don't translate the +share_email_subject4={{clientShortname}} — Join the conversation +## LOCALIZATION NOTE (share_email_body4): In this item, don't translate the ## part between {{..}} and leave the \r\n\r\n part alone -share_email_body3=To accept this invitation, just copy or click this link to start your conversation:\r\n\r\n{{callUrl}} +share_email_body4=Hello!\r\n\r\nJoin me for a video conversation using {{clientShortname}}:\r\n\r\nYou don't have to download or install anything. Just copy and paste this URL into your browser:\r\n\r\n{{callUrl}}\r\n\r\nIf you want, you can also learn more about {{clientShortname}} at {{learnMoreUrl}}\r\n\r\nTalk to you soon! share_button=Email +share_button2=Email Link copy_url_button=Copy +copy_url_button2=Copy Link copied_url_button=Copied! panel_footer_signin_or_signup_link=Sign In or Sign Up @@ -242,12 +254,17 @@ connection_error_see_console_notification=Call failed; see console for details. ## LOCALIZATION NOTE (legal_text_and_links3): In this item, don't translate the ## parts between {{..}} because these will be replaced with links with the labels ## from legal_text_tos and legal_text_privacy. clientShortname will be replaced -## by the brand name, or fall back to client_shortname_fallback +## by the brand name. legal_text_and_links3=By using {{clientShortname}} you agree to the {{terms_of_use}} \ and {{privacy_notice}}. legal_text_tos = Terms of Use legal_text_privacy = Privacy Notice -client_shortname_fallback=this product + +## LOCALIZATION NOTE (powered_by_beforeLogo, powered_by_afterLogo): +## These 2 strings are displayed before and after a 'Telefonica' +## logo. +powered_by_beforeLogo=Powered by +powered_by_afterLogo= feedback_call_experience_heading2=How was your conversation? feedback_what_makes_you_sad=What makes you sad? @@ -273,7 +290,26 @@ feedback_rejoin_button=Rejoin ## an abusive user. feedback_report_user_button=Report User +help_label=Help +tour_label=Tour + +## LOCALIZATION NOTE(rooms_default_room_name_template): {{conversationLabel}} +## will be replaced by a number. For example "Conversation 1" or "Conversation 12". +rooms_default_room_name_template=Conversation {{conversationLabel}} +rooms_leave_button_label=Leave +rooms_list_copy_url_tooltip=Copy Link ## LOCALIZATION NOTE (rooms_list_current_conversations): We prefer to have no ## number in the string, but if you need it for your language please use {{num}}. rooms_list_current_conversations=Current conversation;Current conversations +rooms_list_delete_tooltip=Delete conversation +rooms_list_deleteConfirmation_label=Are you sure? rooms_list_no_current_conversations=No current conversations +rooms_name_this_room_label=Name this conversation +rooms_new_room_button_label=Start a conversation +rooms_only_occupant_label=You're the first one here. +rooms_panel_title=Choose a conversation or start a new one +rooms_room_full_label=There are already two people in this conversation. +rooms_room_full_call_to_action_nonFx_label=Download {{brandShortname}} to start your own +rooms_room_full_call_to_action_label=Learn more about {{clientShortname}} » +rooms_room_joined_label=Someone has joined the conversation! +rooms_room_join_label=Join the conversation