Bug 1081189 - Move URLs out of loop.en-us.properties and into the config file and Makefile. r=NiKo`

--HG--
extra : rebase_source : b4c7023c1d70ab81bc353d5237b8be5376ae7502
This commit is contained in:
Jared Wein 2014-10-22 11:00:42 -04:00
parent 4a046f6dfe
commit 08e08ed5db
5 changed files with 27 additions and 14 deletions

View File

@ -15,6 +15,9 @@
LOOP_SERVER_URL := $(shell echo $${LOOP_SERVER_URL-http://localhost:5000})
LOOP_FEEDBACK_API_URL := $(shell echo $${LOOP_FEEDBACK_API_URL-"https://input.allizom.org/api/v1/feedback"})
LOOP_FEEDBACK_PRODUCT_NAME := $(shell echo $${LOOP_FEEDBACK_PRODUCT_NAME-Loop})
LOOP_BRAND_WEBSITE_URL := $(shell echo $${LOOP_BRAND_WEBSITE_URL-"https://www.mozilla.org/firefox/"})
LOOP_PRIVACY_WEBSITE_URL := $(shell echo $${LOOP_PRIVACY_WEBSITE_URL-"https://www.mozilla.org/privacy"})
LOOP_LEGAL_WEBSITE_URL := $(shell echo $${LOOP_LEGAL_WEBSITE_URL-"/legal/terms"})
NODE_LOCAL_BIN=./node_modules/.bin
@ -73,6 +76,9 @@ config:
@echo "loop.config.serverUrl = '`echo $(LOOP_SERVER_URL)`';" >> content/config.js
@echo "loop.config.feedbackApiUrl = '`echo $(LOOP_FEEDBACK_API_URL)`';" >> content/config.js
@echo "loop.config.feedbackProductName = '`echo $(LOOP_FEEDBACK_PRODUCT_NAME)`';" >> content/config.js
@echo "loop.config.brandWebsiteUrl = '`echo $(LOOP_BRAND_WEBSITE_URL)`';" >> content/config.js
@echo "loop.config.privacyWebsiteUrl = '`echo $(LOOP_PRIVACY_WEBSITE_URL)`';" >> content/config.js
@echo "loop.config.legalWebsiteUrl = '`echo $(LOOP_LEGAL_WEBSITE_URL)`';" >> content/config.js
@echo "loop.config.fxosApp = loop.config.fxosApp || {};" >> content/config.js
@echo "loop.config.fxosApp.name = 'Loop';" >> content/config.js
@echo "loop.config.fxosApp.manifestUrl = 'http://fake-market.herokuapp.com/apps/packagedApp/manifest.webapp';" >> content/config.js

View File

@ -37,7 +37,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
var useLatestFF = mozL10n.get("use_latest_firefox", {
"firefoxBrandNameLink": React.renderComponentToStaticMarkup(
React.DOM.a({target: "_blank", href: mozL10n.get("brand_website")}, mozL10n.get("brandShortname"))
React.DOM.a({target: "_blank", href: loop.config.brandWebsiteUrl},
mozL10n.get("brandShortname")
)
)
});
return (
@ -82,8 +84,10 @@ loop.webapp = (function($, _, OT, mozL10n) {
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: mozL10n.get("brand_website")},
mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})
href: loop.config.brandWebsiteUrl},
mozL10n.get("get_firefox_button", {
brandShortname: mozL10n.get("brandShortname")
})
)
)
)
@ -462,10 +466,10 @@ loop.webapp = (function($, _, OT, mozL10n) {
var tosHTML = mozL10n.get("legal_text_and_links", {
"clientShortname": mozL10n.get("clientShortname2"),
"terms_of_use_url": "<a target=_blank href='" +
mozL10n.get("legal_website") + "'>" +
loop.config.legalWebsiteUrl + "'>" +
tosLinkName + "</a>",
"privacy_notice_url": "<a target=_blank href='" +
mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
loop.config.privacyWebsiteUrl + "'>" + privacyNoticeName + "</a>"
});
var tosClasses = React.addons.classSet({

View File

@ -37,7 +37,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
var useLatestFF = mozL10n.get("use_latest_firefox", {
"firefoxBrandNameLink": React.renderComponentToStaticMarkup(
<a target="_blank" href={mozL10n.get("brand_website")}>{mozL10n.get("brandShortname")}</a>
<a target="_blank" href={loop.config.brandWebsiteUrl}>
{mozL10n.get("brandShortname")}
</a>
)
});
return (
@ -82,8 +84,10 @@ loop.webapp = (function($, _, OT, mozL10n) {
<h3>{mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})}</h3>
<p>
<a className="btn btn-large btn-accept"
href={mozL10n.get("brand_website")}>
{mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})}
href={loop.config.brandWebsiteUrl}>
{mozL10n.get("get_firefox_button", {
brandShortname: mozL10n.get("brandShortname")
})}
</a>
</p>
</div>
@ -462,10 +466,10 @@ loop.webapp = (function($, _, OT, mozL10n) {
var tosHTML = mozL10n.get("legal_text_and_links", {
"clientShortname": mozL10n.get("clientShortname2"),
"terms_of_use_url": "<a target=_blank href='" +
mozL10n.get("legal_website") + "'>" +
loop.config.legalWebsiteUrl + "'>" +
tosLinkName + "</a>",
"privacy_notice_url": "<a target=_blank href='" +
mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
loop.config.privacyWebsiteUrl + "'>" + privacyNoticeName + "</a>"
});
var tosClasses = React.addons.classSet({

View File

@ -116,10 +116,6 @@ 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/
## LOCALIZATION_NOTE(standalone_title_with_status): {{clientShortname}} will be
## replaced by the brand name and {{currentStatus}} will be replaced
## by the current call status (Connecting, Ringing, etc.)

View File

@ -24,6 +24,9 @@ function getConfigFile(req, res) {
// XXX Update with the real marketplace url once the FxOS Loop app is
// uploaded to the marketplace bug 1053424
"loop.config.marketplaceUrl = 'http://fake-market.herokuapp.com/iframe-install.html'",
"loop.config.brandWebsiteUrl = 'https://www.mozilla.org/firefox/';",
"loop.config.privacyWebsiteUrl = 'https://www.mozilla.org/privacy';",
"loop.config.legalWebsiteUrl = '/legal/terms';",
"loop.config.fxosApp = loop.config.fxosApp || {};",
"loop.config.fxosApp.name = 'Loop';",
"loop.config.fxosApp.manifestUrl = 'http://fake-market.herokuapp.com/apps/packagedApp/manifest.webapp';"