Bug 1078345 - Change references from Firefox WebRTC to Firefox Hello in the standalone UI, as well as fix some strings that weren't being passed the replacement arguments. r=MattN
authorJared Wein <jwein@mozilla.com>
Fri, 10 Oct 2014 01:41:18 -0400
changeset 209735 2aca8cff92dd90bc8459428ad657a84f1163c23c
parent 209734 39efd3ba7468e2cc98754be012a2bc0f48c14210
child 209736 8c3a30acd40fa723434434d9c86b7f8dadf58ce0
child 209754 1c0aefdb71f9b7697915ddeff76ba5f0e96d8a16
push id27625
push usercbook@mozilla.com
push dateFri, 10 Oct 2014 13:01:40 +0000
treeherdermozilla-central@097821fd89ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1078345
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1078345 - Change references from Firefox WebRTC to Firefox Hello in the standalone UI, as well as fix some strings that weren't being passed the replacement arguments. r=MattN
browser/components/loop/standalone/content/js/webapp.js
browser/components/loop/standalone/content/js/webapp.jsx
browser/components/loop/standalone/content/l10n/loop.en-US.properties
browser/components/loop/standalone/content/legal/terms/index.html
--- a/browser/components/loop/standalone/content/js/webapp.js
+++ b/browser/components/loop/standalone/content/js/webapp.js
@@ -20,51 +20,51 @@ loop.webapp = (function($, _, OT, mozL10
   var sharedUtils = loop.shared.utils;
 
   /**
    * Homepage view.
    */
   var HomeView = React.createClass({displayName: 'HomeView',
     render: function() {
       return (
-        React.DOM.p(null, mozL10n.get("welcome"))
+        React.DOM.p(null, mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")}))
       );
     }
   });
 
   /**
    * Unsupported Browsers view.
    */
   var UnsupportedBrowserView = React.createClass({displayName: 'UnsupportedBrowserView',
     render: function() {
       var useLatestFF = mozL10n.get("use_latest_firefox", {
         "firefoxBrandNameLink": React.renderComponentToStaticMarkup(
-          React.DOM.a({target: "_blank", href: "https://www.mozilla.org/firefox/"}, "Firefox")
+          React.DOM.a({target: "_blank", href: mozL10n.get("brand_website")}, mozL10n.get("brandShortname"))
         )
       });
       return (
         React.DOM.div(null, 
           React.DOM.h2(null, mozL10n.get("incompatible_browser")), 
-          React.DOM.p(null, mozL10n.get("powered_by_webrtc")), 
+          React.DOM.p(null, mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})), 
           React.DOM.p({dangerouslySetInnerHTML: {__html: useLatestFF}})
         )
       );
     }
   });
 
   /**
    * Unsupported Device view.
    */
   var UnsupportedDeviceView = React.createClass({displayName: 'UnsupportedDeviceView',
     render: function() {
       return (
         React.DOM.div(null, 
           React.DOM.h2(null, mozL10n.get("incompatible_device")), 
-          React.DOM.p(null, mozL10n.get("sorry_device_unsupported")), 
-          React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux"))
+          React.DOM.p(null, mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})), 
+          React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")}))
         )
       );
     }
   });
 
   /**
    * Firefox promotion interstitial. Will display only to non-Firefox users.
    */
@@ -74,21 +74,21 @@ loop.webapp = (function($, _, OT, mozL10
     },
 
     render: function() {
       if (this.props.helper.isFirefox(navigator.userAgent)) {
         return React.DOM.div(null);
       }
       return (
         React.DOM.div({className: "promote-firefox"}, 
-          React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading")), 
+          React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})), 
           React.DOM.p(null, 
             React.DOM.a({className: "btn btn-large btn-accept", 
-               href: "https://www.mozilla.org/firefox/"}, 
-              mozL10n.get("get_firefox_button")
+               href: mozL10n.get("brand_website")}, 
+              mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})
             )
           )
         )
       );
     }
   });
 
   /**
@@ -227,33 +227,37 @@ loop.webapp = (function($, _, OT, mozL10
 
       var callUrlCreationDateString = mozL10n.get("call_url_creation_date_label", {
         "call_url_creation_date": this.props.urlCreationDateString
       });
 
       return (
         React.DOM.header({className: "standalone-header header-box container-box"}, 
           ConversationBranding(null), 
-          React.DOM.div({className: "loop-logo", title: "Firefox WebRTC! logo"}), 
+          React.DOM.div({className: "loop-logo", 
+               title: mozL10n.get("client_alttext",
+                                  {clientShortname: mozL10n.get("clientShortname2")})}), 
           React.DOM.h3({className: "call-url"}, 
             conversationUrl
           ), 
           React.DOM.h4({className: urlCreationDateClasses}, 
             callUrlCreationDateString
           )
         )
       );
     }
   });
 
   var ConversationFooter = React.createClass({displayName: 'ConversationFooter',
     render: function() {
       return (
         React.DOM.div({className: "standalone-footer container-box"}, 
-          React.DOM.div({title: "Mozilla Logo", className: "footer-logo"})
+          React.DOM.div({title: mozL10n.get("vendor_alttext",
+                                  {vendorShortname: mozL10n.get("vendorShortname")}), 
+               className: "footer-logo"})
         )
       );
     }
   });
 
   var PendingConversationView = React.createClass({displayName: 'PendingConversationView',
     getInitialState: function() {
       return {
@@ -449,20 +453,21 @@ loop.webapp = (function($, _, OT, mozL10
       }
     },
 
     render: function() {
       var tosLinkName = mozL10n.get("terms_of_use_link_text");
       var privacyNoticeName = mozL10n.get("privacy_notice_link_text");
 
       var tosHTML = mozL10n.get("legal_text_and_links", {
-        "terms_of_use_url": "<a target=_blank href='/legal/terms/'>" +
+        "terms_of_use_url": "<a target=_blank href='" +
+          mozL10n.get("legal_website") + "'>" +
           tosLinkName + "</a>",
         "privacy_notice_url": "<a target=_blank href='" +
-          "https://www.mozilla.org/privacy/'>" + privacyNoticeName + "</a>"
+          mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
       });
 
       var tosClasses = React.addons.classSet({
         "terms-service": true,
         hide: (localStorage.getItem("has-seen-tos") === "true")
       });
 
       return (
--- a/browser/components/loop/standalone/content/js/webapp.jsx
+++ b/browser/components/loop/standalone/content/js/webapp.jsx
@@ -20,51 +20,51 @@ loop.webapp = (function($, _, OT, mozL10
   var sharedUtils = loop.shared.utils;
 
   /**
    * Homepage view.
    */
   var HomeView = React.createClass({
     render: function() {
       return (
-        <p>{mozL10n.get("welcome")}</p>
+        <p>{mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")})}</p>
       );
     }
   });
 
   /**
    * Unsupported Browsers view.
    */
   var UnsupportedBrowserView = React.createClass({
     render: function() {
       var useLatestFF = mozL10n.get("use_latest_firefox", {
         "firefoxBrandNameLink": React.renderComponentToStaticMarkup(
-          <a target="_blank" href="https://www.mozilla.org/firefox/">Firefox</a>
+          <a target="_blank" href={mozL10n.get("brand_website")}>{mozL10n.get("brandShortname")}</a>
         )
       });
       return (
         <div>
           <h2>{mozL10n.get("incompatible_browser")}</h2>
-          <p>{mozL10n.get("powered_by_webrtc")}</p>
+          <p>{mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})}</p>
           <p dangerouslySetInnerHTML={{__html: useLatestFF}}></p>
         </div>
       );
     }
   });
 
   /**
    * Unsupported Device view.
    */
   var UnsupportedDeviceView = React.createClass({
     render: function() {
       return (
         <div>
           <h2>{mozL10n.get("incompatible_device")}</h2>
-          <p>{mozL10n.get("sorry_device_unsupported")}</p>
-          <p>{mozL10n.get("use_firefox_windows_mac_linux")}</p>
+          <p>{mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})}</p>
+          <p>{mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")})}</p>
         </div>
       );
     }
   });
 
   /**
    * Firefox promotion interstitial. Will display only to non-Firefox users.
    */
@@ -74,21 +74,21 @@ loop.webapp = (function($, _, OT, mozL10
     },
 
     render: function() {
       if (this.props.helper.isFirefox(navigator.userAgent)) {
         return <div />;
       }
       return (
         <div className="promote-firefox">
-          <h3>{mozL10n.get("promote_firefox_hello_heading")}</h3>
+          <h3>{mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})}</h3>
           <p>
             <a className="btn btn-large btn-accept"
-               href="https://www.mozilla.org/firefox/">
-              {mozL10n.get("get_firefox_button")}
+               href={mozL10n.get("brand_website")}>
+              {mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})}
             </a>
           </p>
         </div>
       );
     }
   });
 
   /**
@@ -227,33 +227,37 @@ loop.webapp = (function($, _, OT, mozL10
 
       var callUrlCreationDateString = mozL10n.get("call_url_creation_date_label", {
         "call_url_creation_date": this.props.urlCreationDateString
       });
 
       return (
         <header className="standalone-header header-box container-box">
           <ConversationBranding />
-          <div className="loop-logo" title="Firefox WebRTC! logo"></div>
+          <div className="loop-logo"
+               title={mozL10n.get("client_alttext",
+                                  {clientShortname: mozL10n.get("clientShortname2")})}></div>
           <h3 className="call-url">
             {conversationUrl}
           </h3>
           <h4 className={urlCreationDateClasses}>
             {callUrlCreationDateString}
           </h4>
         </header>
       );
     }
   });
 
   var ConversationFooter = React.createClass({
     render: function() {
       return (
         <div className="standalone-footer container-box">
-          <div title="Mozilla Logo" className="footer-logo"></div>
+          <div title={mozL10n.get("vendor_alttext",
+                                  {vendorShortname: mozL10n.get("vendorShortname")})}
+               className="footer-logo"></div>
         </div>
       );
     }
   });
 
   var PendingConversationView = React.createClass({
     getInitialState: function() {
       return {
@@ -449,20 +453,21 @@ loop.webapp = (function($, _, OT, mozL10
       }
     },
 
     render: function() {
       var tosLinkName = mozL10n.get("terms_of_use_link_text");
       var privacyNoticeName = mozL10n.get("privacy_notice_link_text");
 
       var tosHTML = mozL10n.get("legal_text_and_links", {
-        "terms_of_use_url": "<a target=_blank href='/legal/terms/'>" +
+        "terms_of_use_url": "<a target=_blank href='" +
+          mozL10n.get("legal_website") + "'>" +
           tosLinkName + "</a>",
         "privacy_notice_url": "<a target=_blank href='" +
-          "https://www.mozilla.org/privacy/'>" + privacyNoticeName + "</a>"
+          mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
       });
 
       var tosClasses = React.addons.classSet({
         "terms-service": true,
         hide: (localStorage.getItem("has-seen-tos") === "true")
       });
 
       return (
--- a/browser/components/loop/standalone/content/l10n/loop.en-US.properties
+++ b/browser/components/loop/standalone/content/l10n/loop.en-US.properties
@@ -44,16 +44,24 @@ 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
 ## LOCALIZATION NOTE(clientShortname2): This should not be localized and
 ## should remain "Firefox Hello" for all locales.
 clientShortname2=Firefox Hello
+## LOCALIZATION NOTE(vendorShortname): This should not be localized and
+## should remain "Mozilla" for all locales.
+vendorShortname=Mozilla
+
+## LOCALIZATION NOTE(client_alttext): {{clientShortname}} will be replaced with the
+## value of the clientShortname2 string above.
+client_alttext={{clientShortname}} logo
+vendor_alttext={{vendorShortname}} logo
 
 ## 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…
 call_progress_ringing_description=Ringing…
 fxos_app_needed=Please install the {{fxosAppName}} app from the Firefox Marketplace.
 
 feedback_call_experience_heading2=How was your conversation?
@@ -102,8 +110,12 @@ rooms_name_this_room_label=Name this con
 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
+
+brand_website=https://www.mozilla.org/firefox/
+privacy_website=https://www.mozilla.org/privacy/
+legal_website=/legal/terms/
--- a/browser/components/loop/standalone/content/legal/terms/index.html
+++ b/browser/components/loop/standalone/content/legal/terms/index.html
@@ -2,31 +2,31 @@
 <!--[if lt IE 7]>      <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
 <!--[if IE 7]>         <html class="no-js lt-ie10 lt-ie9 lt-ie8"> <![endif]-->
 <!--[if IE 8]>         <html class="lt-ie10 lt-ie9"> <![endif]-->
 <!--[if IE 9]>         <html class="lt-ie10"> <![endif]-->
 <!--[if gt IE 9]><!--> <html dir="ltr" lang="en-US"> <!--<![endif]-->
     <head>
         <meta charset="utf-8">
         <meta http-equiv="X-UA-Compatible" content="IE=edge">
-        <title>WebRTC: Terms of Service</title>
+        <title>Firefox Hello: Terms of Service</title>
         <meta name="description" content="">
         <meta name="viewport" content="width=device-width">
 
         <link rel="stylesheet" href="/legal/styles/main.css">
     </head>
     <body>
         <div id="fox-logo" class="static"></div>
         <div id="stage">
           <div id="main-content">
             <!--[if lt IE 10]>
                 <p class="error browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
             <![endif]-->
             <header id="legal-header">
-              <h3>WebRTC</h3>
+              <h3>Firefox Hello</h3>
               <h1 id="webrtc-tos-header">Terms of Service</h1>
             </header>
 
             <section>
               <article id="legal-copy">
                 Loading...
               </article>