Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

site wide copy updates #1889

Merged
merged 5 commits into from

2 participants

@lloyd

Per @skinny97214 & @billder - this PR integrates copy updates site wide.

issue #855 is the closes over-arching bug this addresses, but there are many many more that we'll find, close down, and link.

@lloyd lloyd commented on the diff
.gitignore
((5 lines not shown))
+.DS_Store
+/locale
@lloyd
lloyd added a note

this is an orthogonal change to copy updates, made here during testing of l10n of copy updates. we should ignore /locale which is typically svn co'd into a git checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
config/aws.json
@@ -12,6 +12,7 @@
"supported_languages": [
"en-US", "it-CH", "db-LB"
],
+ "debug_lang": "it-CH",
@lloyd
lloyd added a note

again orthogonal, a step towards fixing the debug locale in our dev environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
lib/browserid/prove_template.ejs
@@ -1,10 +0,0 @@
-<%= format(
- gettext('Thanks for verifying your email address. This message is being sent to you to complete your sign-in to %s.'), [site]) %>
-
-<%= gettext('Finish registration by clicking this link:') %> <%= link %>
-
-<%= gettext('If you are NOT trying to sign into this site, just ignore this email.') %>
-
-<%= gettext('Thanks,') %>
-<%= gettext('Persona') %>
-<%= gettext('(A better way to sign in)') %>
@lloyd
lloyd added a note

this email template was removed and broken out into three new templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
lib/browserid/email_templates/reset.ejs
@@ -0,0 +1,9 @@
+<%= gettext('Forgot your password for Persona? It happens to the best of us.') %>
+
+<%= gettext('Click to reset your password:') %>
+<%= link %>
+
+<%= gettext('Note: If you did NOT ask to reset your password, please ignore this email.') %>
+
+<%= gettext('Thank you,') %>
+<%= gettext('The Persona team') %>
@lloyd
lloyd added a note

the reset template is not yet inuse, but will be just as soon as we get to issue #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
lib/email.js
@@ -27,8 +28,35 @@ if (smtp_params && smtp_params.host) {
}
}
-const template = ejs.compile(
- fs.readFileSync(path.join(__dirname, "browserid", "prove_template.ejs")).toString());
+const TEMPLATE_PATH = path.join(__dirname, "browserid", "email_templates");
+
+// the underbar decorator to allow getext to extract strings
+function _(str) { return str; }
+
+// a map of all the different emails we send
+const templates = {
+ "new": {
+ landing: 'verify_email_address',
+ subject: _("Confirm email address for Persona"),
@lloyd
lloyd added a note

confirmed that these strings extract correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
lib/email.js
((6 lines not shown))
};
exports.sendAddAddressEmail = function(email, site, secret, langContext) {
- doSend('add_email_address', email, site, secret, langContext);
+ doSend('add', email, site, secret, langContext);
+};
+
+exports.sendForgotPasswordEmail = function(email, site, secret, langContext) {
+ doSend('reset', email, site, secret, langContext);
};
@lloyd
lloyd added a note

again, this function is not yet in use, in prep for issue #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
resources/static/common/css/style.css
((22 lines not shown))
.submit #cancel {
float: right;
margin-right: 15px;
line-height: 28px;
}
+*/
@lloyd
lloyd added a note

why comment this? Why not delete this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
resources/static/common/css/style.css
((5 lines not shown))
#wait, #delay {
text-align: center;
}
+*/
@lloyd
lloyd added a note

again, why comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
resources/static/common/js/wait-messages.js
@@ -16,8 +16,8 @@ BrowserID.Wait = (function(){
},
slowXHR: {
- title: gettext("We are sorry, this request is taking a LOOONG time."),
@lloyd
lloyd added a note

so sad to see LOOONG go...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
resources/static/common/js/user.js
@@ -1224,8 +1229,6 @@ BrowserID.User = (function() {
} else {
complete(onFailure, "user is not authenticated");
}
-
- return shouldAsk;
@lloyd
lloyd added a note

via shane - never supposed to have a return value - code cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
resources/static/dialog/js/modules/actions.js
@@ -33,13 +33,11 @@ BrowserID.Modules.Actions = (function() {
}
function startRegCheckService(options, verifier, message, password) {
- var controller = startService("check_registration", {
- email: options.email,
- required: options.required,
+ var controller = startService("check_registration", _.extend(options, {
@lloyd
lloyd added a note

let's keep this explicit, yo. (shane's idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
resources/static/dialog/views/set_password.ejs
((24 lines not shown))
<button id="<%= password_reset ? "password_reset" : "verify_user" %>">
- <%= password_reset ? gettext('reset password') : gettext('verify email') %>
+ <%= gettext(password_reset ? 'reset password' : 'done') %>
@lloyd
lloyd added a note

(shane caught this) this is a no-no! string extraction cannot handle this type of thing. the previous version is superior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
resources/views/dialog.ejs
@@ -12,9 +12,7 @@
<div id="signIn">
<div class="table">
- <div class="vertical">
- <div class="contents">
- </div>
+ <div class="vertical contents">
@lloyd
lloyd added a note

why contract, when the below party involves expansion? so confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd commented on the diff
scripts/awsbox/post_deploy.js
((16 lines not shown))
./locale/compile-mo.sh locale/
+./locale/compile-json.sh locale/ resources/static/i18n/
echo ">> generating production resources"
scripts/compress
@lloyd
lloyd added a note

orthogonal change, improves generation of debug lang for ephemeral deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lloyd lloyd merged commit 7545140 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 30, 2012
  1. @lloyd

    site wide copy updates

    lloyd authored
  2. @lloyd

    remove useless commented style

    lloyd authored
  3. @lloyd
  4. @shane-tomlinson

    Make the options passsed to the check_registration controller more ex…

    shane-tomlinson authored
    …plicit. Uncollapse the signIn divs in dialog.ejs Fix string extraction.
  5. @shane-tomlinson

    Merge branch 'new_copy' of github.com:mozilla/browserid into new_copy

    shane-tomlinson authored
    Conflicts:
    	resources/static/dialog/views/set_password.ejs
This page is out of date. Refresh to see the latest.
Showing with 376 additions and 263 deletions.
  1. +2 −1  .gitignore
  2. +1 −0  config/aws.json
  3. +9 −0 lib/browserid/email_templates/add.ejs
  4. +9 −0 lib/browserid/email_templates/new.ejs
  5. +9 −0 lib/browserid/email_templates/reset.ejs
  6. +0 −10 lib/browserid/prove_template.ejs
  7. +58 −14 lib/email.js
  8. +45 −11 resources/static/common/css/style.css
  9. +5 −2 resources/static/common/js/user.js
  10. +3 −3 resources/static/common/js/wait-messages.js
  11. +1 −5 resources/static/dialog/css/m.css
  12. +22 −12 resources/static/dialog/css/style.css
  13. +21 −4 resources/static/dialog/js/misc/state.js
  14. +3 −4 resources/static/dialog/js/modules/actions.js
  15. +10 −2 resources/static/dialog/js/modules/authenticate.js
  16. +6 −3 resources/static/dialog/js/modules/check_registration.js
  17. +1 −1  resources/static/dialog/js/modules/pick_email.js
  18. +12 −14 resources/static/dialog/js/modules/provision_primary_user.js
  19. +4 −1 resources/static/dialog/js/modules/set_password.js
  20. +4 −2 resources/static/dialog/js/modules/verify_primary_user.js
  21. +7 −9 resources/static/dialog/views/add_email.ejs
  22. +29 −33 resources/static/dialog/views/authenticate.ejs
  23. +3 −12 resources/static/dialog/views/confirm_email.ejs
  24. +7 −6 resources/static/dialog/views/is_this_your_computer.ejs
  25. +12 −10 resources/static/dialog/views/pick_email.ejs
  26. +1 −1  resources/static/dialog/views/required_email.ejs
  27. +37 −26 resources/static/dialog/views/set_password.ejs
  28. +26 −68 resources/static/dialog/views/verify_primary_user.ejs
  29. +1 −0  resources/static/test/cases/common/js/user.js
  30. +10 −5 resources/views/dialog.ejs
  31. +1 −1  resources/views/dialog_layout.ejs
  32. +1 −1  resources/views/forgot.ejs
  33. +2 −1  resources/views/signin.ejs
  34. +1 −1  resources/views/signup.ejs
  35. +13 −0 scripts/awsbox/post_deploy.js
View
3  .gitignore
@@ -7,4 +7,5 @@
/npm-debug.log
/resources/static/build
/resources/static/production
-.DS_Store
+.DS_Store
+/locale
@lloyd
lloyd added a note

this is an orthogonal change to copy updates, made here during testing of l10n of copy updates. we should ignore /locale which is typically svn co'd into a git checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
1  config/aws.json
@@ -12,6 +12,7 @@
"supported_languages": [
"en-US", "it-CH", "db-LB"
],
+ "debug_lang": "it-CH",
@lloyd
lloyd added a note

again orthogonal, a step towards fixing the debug locale in our dev environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
"locale_directory": "/home/app/code/locale",
"var_path": "/home/app/var",
View
9 lib/browserid/email_templates/add.ejs
@@ -0,0 +1,9 @@
+<%= gettext('Thank you for using Persona.') %>
+
+<%= format(gettext('Click to confirm this email address and automatically sign in to %s'), [site]) %>
+<%= link %>
+
+<%= format(gettext('Note: If you are NOT trying to sign into this website, please ignore this email.'), [site]) %>
+
+<%= gettext('Thank you,') %>
+<%= gettext('The Persona team') %>
View
9 lib/browserid/email_templates/new.ejs
@@ -0,0 +1,9 @@
+<%= gettext('Thank you for using Persona.') %>
+
+<%= format(gettext('Click to confirm this email address and automatically sign in to %s'), [site]) %>
+<%= link %>
+
+<%= format(gettext('Note: If you are NOT trying to sign into this website, please ignore this email.'), [site]) %>
+
+<%= gettext('Thank you,') %>
+<%= gettext('The Persona team') %>
View
9 lib/browserid/email_templates/reset.ejs
@@ -0,0 +1,9 @@
+<%= gettext('Forgot your password for Persona? It happens to the best of us.') %>
+
+<%= gettext('Click to reset your password:') %>
+<%= link %>
+
+<%= gettext('Note: If you did NOT ask to reset your password, please ignore this email.') %>
+
+<%= gettext('Thank you,') %>
+<%= gettext('The Persona team') %>
@lloyd
lloyd added a note

the reset template is not yet inuse, but will be just as soon as we get to issue #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
10 lib/browserid/prove_template.ejs
@@ -1,10 +0,0 @@
-<%= format(
- gettext('Thanks for verifying your email address. This message is being sent to you to complete your sign-in to %s.'), [site]) %>
-
-<%= gettext('Finish registration by clicking this link:') %> <%= link %>
-
-<%= gettext('If you are NOT trying to sign into this site, just ignore this email.') %>
-
-<%= gettext('Thanks,') %>
-<%= gettext('Persona') %>
-<%= gettext('(A better way to sign in)') %>
@lloyd
lloyd added a note

this email template was removed and broken out into three new templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
72 lib/email.js
@@ -8,7 +8,8 @@ fs = require('fs'),
path = require('path'),
ejs = require('ejs'),
config = require('./configuration.js'),
-logger = require('./logging.js').logger;
+logger = require('./logging.js').logger,
+url = require('url');
/* if smtp parameters are configured, use them */
try { var smtp_params = config.get('smtp'); } catch(e) {};
@@ -27,8 +28,35 @@ if (smtp_params && smtp_params.host) {
}
}
-const template = ejs.compile(
- fs.readFileSync(path.join(__dirname, "browserid", "prove_template.ejs")).toString());
+const TEMPLATE_PATH = path.join(__dirname, "browserid", "email_templates");
+
+// the underbar decorator to allow getext to extract strings
+function _(str) { return str; }
+
+// a map of all the different emails we send
+const templates = {
+ "new": {
+ landing: 'verify_email_address',
+ subject: _("Confirm email address for Persona"),
@lloyd
lloyd added a note

confirmed that these strings extract correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ template: fs.readFileSync(path.join(TEMPLATE_PATH, 'new.ejs')),
+ },
+ "reset": {
+ landing: 'verify_email_address',
+ subject: _("Reset Persona password"),
+ template: fs.readFileSync(path.join(TEMPLATE_PATH, 'reset.ejs')),
+ },
+ "add": {
+ landing: 'add_email_address',
+ subject: _("Confirm email address for Persona"),
+ template: fs.readFileSync(path.join(TEMPLATE_PATH, 'add.ejs')),
+ }
+};
+
+// now turn file contents into compiled templates
+Object.keys(templates).forEach(function(type) {
+ templates[type].template = ejs.compile(templates[type].template.toString());
+});
+
var interceptor = undefined;
@@ -48,24 +76,36 @@ exports.setInterceptor = function(callback) {
};
//TODO send in localeContext
-function doSend(landing_page, email, site, secret, langContext) {
- var url = config.get('public_url') + "/" + landing_page + "?token=" + encodeURIComponent(secret),
- _ = langContext.gettext,
+function doSend(email_type, email, site, secret, langContext) {
+ if (!templates[email_type]) throw "unknown email type: " + email_type;
+
+ // remove scheme from site to make it more human
+ site = url.parse(site).hostname;
+
+ var email_params = templates[email_type];
+
+ var public_url = config.get('public_url') + "/" + email_params.landing + "?token=" + encodeURIComponent(secret),
+ GETTEXT = langContext.gettext,
format = langContext.format;
if (interceptor) {
interceptor(email, site, secret);
} else if (config.get('email_to_console')) {
// log verification email to console separated by whitespace.
- console.log("\nVERIFICATION URL:\n" + url + "\n");
+ console.log("\nVERIFICATION URL:\n" + public_url + "\n");
} else {
- // TODO(aok) extract_po.sh isn't seeing this string if it's below in object literal
- var subject = format(_("Complete Login to %s using Persona"), [site]);
emailer.send_mail({
- sender: "Persona@persona.org",
+ // XXX: Ideally this would be a live email address and a response to these email
+ // addresses would go into a ticketing system (lloyd/skinny)
+ sender: "Persona <no-reply@persona.org>",
to: email,
- subject: subject,
- body: template({ link: url, site: site, gettext: _, format: format })
+ subject: GETTEXT(email_params.subject),
+ body: email_params.template({
+ link: public_url,
+ site: site,
+ gettext: GETTEXT,
+ format: format
+ })
}, function(err, success){
if (!success) {
logger.error("error sending email to: " + email + " - " + err);
@@ -75,9 +115,13 @@ function doSend(landing_page, email, site, secret, langContext) {
};
exports.sendNewUserEmail = function(email, site, secret, langContext) {
- doSend('verify_email_address', email, site, secret, langContext);
+ doSend('new', email, site, secret, langContext);
};
exports.sendAddAddressEmail = function(email, site, secret, langContext) {
- doSend('add_email_address', email, site, secret, langContext);
+ doSend('add', email, site, secret, langContext);
+};
+
+exports.sendForgotPasswordEmail = function(email, site, secret, langContext) {
+ doSend('reset', email, site, secret, langContext);
};
@lloyd
lloyd added a note

again, this function is not yet in use, in prep for issue #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
56 resources/static/common/css/style.css
@@ -56,8 +56,13 @@ ul, li {
list-style-type: none;
}
-.mono {
- font-family: 'Monaco', monospace;
+strong {
+ font-weight: 700;
+}
+
+.hidden {
+ visibility: hidden;
+ height: 0;
}
.tooltip {
@@ -134,6 +139,18 @@ input[type=password]:disabled {
border-color: #b2b2b2;
}
+label + input[type=text],
+label + input[type=password],
+label + input[type=email] {
+ margin-top: 8px;
+}
+
+label.hidden + input[type=text],
+label.hidden + input[type=password],
+label.hidden + input[type=email] {
+ margin-top: 0;
+}
+
input[type=radio],
input[type=checkbox] {
cursor: pointer;
@@ -282,12 +299,23 @@ button.negative:active,
box-shadow: 0 0 5px #333 inset;
}
-.submit #cancel {
- float: right;
- margin-right: 15px;
+.tospp {
+ line-height: 14px;
+}
+
+.buttonrow {
line-height: 28px;
}
+.buttonrow > .right {
+ margin-right: 15px;
+}
+
+.buttonrow > .right.emphasize {
+ margin-right: 0;
+ margin-top: 8px;
+}
+
a.secondary[disabled], .submit_disabled a.secondary, .submit_disabled a.secondary:focus, .submit_disabled a.secondary:active {
color: #999;
}
@@ -377,14 +405,21 @@ footer .help {
background-image: url("/common/i/grain.png"), linear-gradient(top, #dadee1, #c7ccd0);
}
-#wait, #delay {
- text-align: center;
+#wait .contents, #error .contents, #delay .contents {
+ max-width: 430px;
+ margin: 0 auto;
}
+#wait h2, #delay h2 {
+ font-size: 20px;
+}
-#wait h2, #error h2, #delay h2 {
+#error h2 {
font-size: 22px;
- margin-bottom: 10px;
+}
+
+#wait p, #error p, #delay p {
+ margin-top: 20px;
}
#error .emphasis {
@@ -392,7 +427,7 @@ footer .help {
color: #aa1401;
}
-#error_contents {
+#error .contents, #wait .contents {
max-width: 430px;
margin: 0 auto;
}
@@ -417,7 +452,6 @@ footer .help {
.submit {
margin-top: 10px;
- line-height: 14px;
}
.submit > p {
View
7 resources/static/common/js/user.js
@@ -160,6 +160,10 @@ BrowserID.User = (function() {
throw "invalid email type (should be 'secondary' or 'primary'): " + type;
}
+ function getIdPName(addressInfo) {
+ return addressInfo.email.replace(/.*@/, "");
+ }
+
/**
* Persist an address and key pair locally.
* @method persistEmailKeypair
@@ -825,6 +829,7 @@ BrowserID.User = (function() {
if(info.type === "primary") {
User.isUserAuthenticatedToPrimary(email, info, function(authed) {
info.authed = authed;
+ info.idpName = getIdPName(info);
complete(info);
}, onFailure);
}
@@ -1224,8 +1229,6 @@ BrowserID.User = (function() {
} else {
complete(onFailure, "user is not authenticated");
}
-
- return shouldAsk;
@lloyd
lloyd added a note

via shane - never supposed to have a return value - code cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
};
View
6 resources/static/common/js/wait-messages.js
@@ -7,7 +7,7 @@ BrowserID.Wait = (function(){
var Wait = {
authentication: {
title: gettext("Finishing Sign In..."),
- message: gettext("In just a moment you'll be signed into BrowserID.")
+ message: gettext("In just a moment you'll be signed into Persona.")
},
generateKey: {
@@ -16,8 +16,8 @@ BrowserID.Wait = (function(){
},
slowXHR: {
- title: gettext("We are sorry, this request is taking a LOOONG time."),
@lloyd
lloyd added a note

so sad to see LOOONG go...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- message: gettext("This message will go away when the request completes (hopefully soon). If you wait too long, close this window and try again."),
+ title: gettext("We are sorry, this is taking a longer than it should."),
+ message: gettext("If this doesn't resolve itself within a few seconds, please close the window and try again."),
id: "slowXHR"
}
View
6 resources/static/dialog/css/m.css
@@ -124,7 +124,7 @@
#selectEmail > .inputs > li > label {
margin: 0;
- padding: 15px 0;
+ padding: 8px 0;
}
#signIn .submit > p {
@@ -185,10 +185,6 @@
}
- .forgot {
- font-size: 16px;
- }
-
.inputs > li {
margin-top: 12px;
}
View
34 resources/static/dialog/css/style.css
@@ -12,6 +12,7 @@ body {
background-image: url('/common/i/grain.png'), -ms-linear-gradient(top, rgba(113, 126, 137, 0), rgba(113, 126, 137, 0.2));
background-image: url('/common/i/grain.png'), -o-linear-gradient(top, rgba(113, 126, 137, 0), rgba(113, 126, 137, 0.2));
background-image: url('/common/i/grain.png'), linear-gradient(top, rgba(113, 126, 137, 0), rgba(113, 126, 137, 0.2));
+ line-height: 18px;
}
#signIn {
@@ -65,6 +66,15 @@ header {
background-image: linear-gradient(top, rgba(0,0,0,.05), rgba(0,0,0,0));
}
+h2 {
+ font-size: 20px;
+}
+
+h3 {
+ font-size: 18px;
+}
+
+
.home {
width: 161px;
height: 40px;
@@ -135,6 +145,11 @@ section > .contents {
* otherwise the buttons slide right with the arrow
*/
width: 250px;
+ font-size: 13px;
+}
+
+.form_section p {
+ margin-top: 8px;
}
@@ -241,7 +256,7 @@ section > .contents {
#signIn .table {
background-color: #eff0f2;
- padding: 20px;
+ padding: 0 20px;
}
.arrowContainer {
@@ -298,7 +313,6 @@ section > .contents {
#favicon h2 {
margin: 10px 0 0 0;
- font-size: 20px;
}
#favicon h3 {
@@ -342,16 +356,8 @@ div#required_email {
padding-right: 1px;
}
-.inputs {
- line-height: 18px;
-}
-
.inputs > li {
- margin-top: 10px;
-}
-
-.inputs > li:first-child {
- margin-top: 0;
+ margin-top: 8px;
}
.inputs > li > label {
@@ -364,7 +370,7 @@ div#required_email {
}
#selectEmail > .inputs > li > label {
- padding: 6px 1px;
+ padding: 3px 1px;
white-space: nowrap;
}
@@ -381,10 +387,14 @@ div#required_email {
}
.submit {
+ margin-top: 8px;
color: #333;
font-size: 11px;
}
+.submit > p {
+ margin-top: 8px;
+}
.tospp {
font-size: 11px;
View
25 resources/static/dialog/js/misc/state.js
@@ -21,6 +21,7 @@ BrowserID.State = (function() {
primaryVerificationInfo;
function startStateMachine() {
+ /*jshint validthis: true*/
var self = this,
handleState = function(msg, callback) {
self.subscribe(msg, function(msg, info) {
@@ -44,7 +45,9 @@ BrowserID.State = (function() {
handleState("start", function(msg, info) {
self.hostname = info.hostname;
+ self.siteName = info.siteName || info.hostname;
self.siteTOSPP = !!(info.privacyPolicy && info.termsOfService);
+
requiredEmail = info.requiredEmail;
startAction(false, "doRPInfo", info);
@@ -95,7 +98,11 @@ BrowserID.State = (function() {
});
handleState("authenticate", function(msg, info) {
- info.siteTOSPP = self.siteTOSPP;
+ _.extend(info, {
+ siteName: self.siteName,
+ siteTOSPP: self.siteTOSPP
+ });
+
startAction("doAuthenticate", info);
});
@@ -151,7 +158,12 @@ BrowserID.State = (function() {
handleState("user_staged", function(msg, info) {
self.stagedEmail = info.email;
- info.required = !!requiredEmail;
+
+ _.extend(info, {
+ required: !!requiredEmail,
+ siteName: self.siteName
+ });
+
startAction("doConfirmUser", info);
});
@@ -209,7 +221,9 @@ BrowserID.State = (function() {
// Show the persona TOS/PP only to requiredEmail users who are creating
// a new account.
- personaTOSPP: requiredEmail && !addPrimaryUser
+ personaTOSPP: requiredEmail && !addPrimaryUser,
+ siteName: self.siteName,
+ idpName: info.idpName || URLParse(info.auth_url).host
});
if (primaryVerificationInfo) {
@@ -449,7 +463,10 @@ BrowserID.State = (function() {
handleState("email_staged", function(msg, info) {
self.stagedEmail = info.email;
- info.required = !!requiredEmail;
+ _.extend(info, {
+ required: !!requiredEmail,
+ siteName: self.siteName
+ });
startAction("doConfirmEmail", info);
});
View
7 resources/static/dialog/js/modules/actions.js
@@ -1,4 +1,4 @@
-/*jshint browser:true, jQuery: true, forin: true, laxbreak:true */
+/*jshint browser:true, jquery: true, forin: true, laxbreak:true */
/*global _: true, BrowserID: true, PageController: true */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,11 +34,10 @@ BrowserID.Modules.Actions = (function() {
function startRegCheckService(options, verifier, message, password) {
var controller = startService("check_registration", {
- email: options.email,
- required: options.required,
verifier: verifier,
verificationMessage: message,
- password: password
+ password: password,
+ siteName: options.siteName
});
controller.startCheck();
}
View
12 resources/static/dialog/js/modules/authenticate.js
@@ -1,4 +1,4 @@
-/*jshint browser:true, jQuery: true, forin: true, laxbreak:true */
+/*jshint browser:true, jquery: true, forin: true, laxbreak:true */
/*global BrowserID:true, PageController: true */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -25,6 +25,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function initialState(info) {
+ /*jshint validthis: true*/
var self=this;
self.submit = checkEmail;
@@ -39,6 +40,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function checkEmail(info) {
+ /*jshint validthis: true*/
var email = getEmail(),
self = this;
@@ -70,6 +72,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function createSecondaryUser(callback) {
+ /*jshint validthis: true*/
var self=this,
email = getEmail();
@@ -81,6 +84,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function authenticate() {
+ /*jshint validthis: true*/
var email = getEmail(),
pass = helpers.getAndValidatePassword("#password"),
self = this;
@@ -114,6 +118,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function enterEmailState() {
+ /*jshint validthis: true*/
if (!dom.is("#email", ":disabled")) {
this.submit = checkEmail;
showHint("start");
@@ -121,6 +126,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function enterPasswordState(callback) {
+ /*jshint validthis: true*/
var self=this;
dom.setInner("#password", "");
@@ -136,6 +142,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function forgotPassword() {
+ /*jshint validthis: true*/
var email = getEmail();
if (email) {
var info = addressInfo || { email: email };
@@ -144,6 +151,7 @@ BrowserID.Modules.Authenticate = (function() {
}
function emailKeyUp() {
+ /*jshint validthis: true*/
var newEmail = dom.getInner("#email");
if (newEmail !== lastEmail) {
lastEmail = newEmail;
@@ -160,7 +168,7 @@ BrowserID.Modules.Authenticate = (function() {
var self=this;
self.renderDialog("authenticate", {
- sitename: user.getHostname(),
+ siteName: options.siteName,
email: lastEmail
});
View
9 resources/static/dialog/js/modules/check_registration.js
@@ -15,9 +15,12 @@ BrowserID.Modules.CheckRegistration = (function() {
start: function(options) {
var self=this;
options = options || {};
- options.required = !!options.required;
-
- self.renderWait("confirm_email", options);
+ var templateData = {
+ email: options.email,
+ required: options.required,
+ siteName: options.siteName
+ };
+ self.renderWait("confirm_email", templateData);
self.email = options.email;
self.verifier = options.verifier;
View
2  resources/static/dialog/js/modules/pick_email.js
@@ -93,7 +93,7 @@ BrowserID.Modules.PickEmail = (function() {
self.renderDialog("pick_email", {
identities: identities,
- siteemail: user.getOriginEmail()
+ siteEmail: user.getOriginEmail()
});
if (options.siteTOSPP) {
View
26 resources/static/dialog/js/modules/provision_primary_user.js
@@ -29,7 +29,9 @@ BrowserID.Modules.ProvisionPrimaryUser = (function() {
case "primary.verify":
self.close("primary_user_unauthenticated", {
email: email,
- auth_url: auth
+ auth_url: auth,
+ // XXX use self.addressInfo universally.
+ idpName: self.addressInfo.idpName
});
complete(true);
break;
@@ -55,19 +57,15 @@ BrowserID.Modules.ProvisionPrimaryUser = (function() {
throw "missing config option: email";
}
- if(!(auth && prov)) {
- user.addressInfo(email, function(status) {
- if(status.type === "primary") {
- provisionPrimaryUser.call(self, email, status.auth, status.prov);
- }
- else {
- self.renderError("error", { action: errors.provisioningBadPrimary });
- }
- }, self.getErrorDialog(errors.isEmailRegistered));
- }
- else {
- provisionPrimaryUser.call(self, email, auth, prov);
- }
+ user.addressInfo(email, function(status) {
+ self.addressInfo = status;
+ if(status.type === "primary") {
+ provisionPrimaryUser.call(self, email, status.auth, status.prov);
+ }
+ else {
+ self.renderError("error", { action: errors.provisioningBadPrimary });
+ }
+ }, self.getErrorDialog(errors.isEmailRegistered));
ProvisionPrimaryUser.sc.start.call(self, options);
View
5 resources/static/dialog/js/modules/set_password.js
@@ -1,4 +1,4 @@
-/*jshint browser:true, jQuery: true, forin: true, laxbreak:true */
+/*jshint browser:true, jquery: true, forin: true, laxbreak:true */
/*global _: true, BrowserID: true, PageController: true */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,7 @@ BrowserID.Modules.SetPassword = (function() {
sc;
function submit(callback) {
+ /*jshint validthis: true*/
var pass = dom.getInner("#password"),
vpass = dom.getInner("#vpassword"),
options = this.options;
@@ -26,6 +27,7 @@ BrowserID.Modules.SetPassword = (function() {
}
function cancel() {
+ /*jshint validthis: true*/
this.close("cancel_state");
}
@@ -35,6 +37,7 @@ BrowserID.Modules.SetPassword = (function() {
options = options || {};
self.renderDialog("set_password", {
+ email: options.email,
password_reset: !!options.password_reset,
cancelable: options.cancelable !== false,
personaTOSPP: options.personaTOSPP
View
6 resources/static/dialog/js/modules/verify_primary_user.js
@@ -27,7 +27,7 @@ BrowserID.Modules.VerifyPrimaryUser = (function() {
});
var url = helpers.toURL(auth_url, {email: email});
-
+
win.document.location = url;
complete(callback);
@@ -52,7 +52,9 @@ BrowserID.Modules.VerifyPrimaryUser = (function() {
email: data.email,
auth_url: data.auth_url,
requiredEmail: data.requiredEmail || false,
- personaTOSPP: data.personaTOSPP
+ personaTOSPP: data.personaTOSPP,
+ siteName: data.siteName,
+ idpName: data.idpName
});
if (data.siteTOSPP) {
View
16 resources/static/dialog/views/add_email.ejs
@@ -2,14 +2,12 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
- <strong><%= gettext('Sign in using') %></strong>
-
<div id="addEmail" class="cf form_section">
<ul class="inputs">
<li>
- <label for="newEmail"><%= gettext('New email address') %></label>
- <input id="newEmail" name="newEmail" type="email" autocapitalize="off" autocorrect="off" maxlength="254" <% if (typeof email !== "undefined") { %> value="<%= email %>" <% } %>/>
+ <label for="newEmail"><%= gettext('Add another email address to your Persona password.') %></label>
+ <input id="newEmail" name="newEmail" type="email" autocapitalize="off" autocorrect="off" maxlength="254" <% if (typeof email !== "undefined") { %> value="<%= email %>" <% } %> placeholder="<%= gettext("email address") %>"/>
<div id="email_format" class="tooltip" for="newEmail">
<%= gettext('This field must be an email address.') %>
@@ -29,14 +27,14 @@
</li>
<li id="hint_section" class="addressInfo">
- <%= gettext("Please hold on while we get information about your email provider.") %>
+ <%= gettext("Checking with your email provider.") %>
</li>
</ul>
- <div class="submit cf">
- <button id="addNewEmail"><%= gettext('add') %></button>
- <a href="#" id="cancel" class="action"><%= gettext('cancel') %></a>
- </div>
+ <p class="submit cf buttonrow">
+ <button id="addNewEmail"><%= gettext('add') %></button>
+ <a href="#" id="cancel" class="right"><%= gettext('cancel') %></a>
+ </p>
</div>
View
62 resources/static/dialog/views/authenticate.ejs
@@ -1,13 +1,18 @@
<% /* This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */ %>
- <strong><%= gettext('Sign in using') %></strong>
+
<div class="form_section">
+ <p class="start">
+ <%= format(gettext('%s uses Persona instead of usernames to sign you in.'), ["<strong>" + siteName +"</strong>"]) %>
+
+ </p>
+
<ul class="inputs">
<li>
- <label for="email"><%= gettext('Email') %></label>
- <input id="email" type="email" autocapitalize="off" autocorrect="off" value="<%= email %>" maxlength="254" tabindex="1"/>
+ <label for="email"><%= gettext('To sign in with Persona, please enter your email address.') %></label>
+ <input id="email" type="email" autocapitalize="off" autocorrect="off" value="<%= email %>" maxlength="254" tabindex="1" placeholder="<%= gettext('enter email address') %>"/>
<div id="email_format" class="tooltip" for="email">
<%= gettext('This field must be an email address.') %>
@@ -20,53 +25,44 @@
<div id="could_not_add" class="tooltip" for="email">
<%= gettext('We just sent an email to that address! If you really want to send another, wait a minute or two and try again.') %>
</div>
-
- <div id="already_registered" class="tooltip" for="email">
- That email address is already registered! You should try again.
- </div>
</li>
- <li id="hint_section" class="start">
- <%= format(gettext('Enter your email address to sign in to <strong>%s</strong>'), [sitename]) %>
- </li>
-
- <li id="hint_section" class="addressInfo">
- <%= gettext("Please hold on while we get information about your email provider.") %>
+ <li id="hint_section" class="addressInfo submit">
+ <%= gettext("Checking with your email provider.") %>
</li>
<li class="returning">
- <a id="forgotPassword" class="forgot right" href="#" tabindex="4"><%= gettext('forgot your password?') %></a>
- <label for="password"><%= gettext('Password') %></label>
+ <label for="password" class="hidden"><%= gettext('Password') %></label>
- <input id="password" type="password" maxlength="80" tabindex="2" />
+ <input id="password" type="password" maxlength="80" tabindex="2" placeholder="<%= gettext('password') %>" />
<div id="password_required" class="tooltip" for="password">
<%= gettext('The password field is required.') %>
</div>
<div id="cannot_authenticate" class="tooltip" for="password">
- <%= gettext('The account cannot be logged in with this username and password.') %>
+ <%= gettext('This email address and password do not match.') %>
</div>
</li>
</ul>
- <div class="submit cf">
- <p class="cf">
- <button class="start addressInfo" tabindex="3"><%= gettext('next') %></button>
- <button class="returning" tabindex="3"><%= gettext('sign in') %></button>
- </p>
-
- <p class="tospp">
- <%= format(
- gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
- [ "Persona",
- ' href="https://login.persona.org/tos" target="_new"',
- ' href="https://login.persona.org/privacy" target="_new"',
- ]) %>
- </p>
-
- </div>
+ <p class="submit cf buttonrow">
+ <button class="start addressInfo"><%= gettext('next') %></button>
+ <button class="returning"><%= gettext('sign in') %></button>
+ <a id="forgotPassword" class="returning" href="#"><%= gettext('Forgot your password?') %></a>
+ </p>
+
+
+ <p class="submit tospp">
+ <%= format(
+ gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
+ [ "Persona",
+ ' href="https://login.persona.org/tos" target="_new"',
+ ' href="https://login.persona.org/privacy" target="_new"',
+ ]) %>
+ </p>
+
</div>
View
15 resources/static/dialog/views/confirm_email.ejs
@@ -2,22 +2,13 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */ %>
- <h2><%= gettext('Check your email!') %></h2>
+ <h2><%= gettext('Confirm your email address') %></h2>
<p>
- <%= format(gettext('We sent a confirmation email to <strong>%s</strong>'), [email]) %>
+ <%= format(gettext('Check your email at %s.'), ["<strong>" + email + "</strong>"]) %>
</p>
<p>
- <%= gettext('To finish signing in just click the verify link we sent to your email address.') %>
- </p>
- <br />
-
- <p>
- <% if(required) { %>
- <%= format(gettext('If this is a mistake, just ignore the sent email and <a %s>cancel</a>.'), [' href="#" id="back"']) %>
- <% } else { %>
- <%= format(gettext('If this is a mistake, just ignore the sent email and <a %s>use another email address</a>.'), [' href="#" id="back"']) %>
- <% } %>
+ <%= format(gettext('Click the link in the confirmation email. You\'ll then immediately be signed in to %s.'), ["<strong>" + siteName + "</strong>"]) %>
</p>
View
13 resources/static/dialog/views/is_this_your_computer.ejs
@@ -3,19 +3,20 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/. */ %>
<div id="your_computer_content">
- <h2><%= gettext('If you don\'t mind me asking, is this your computer?') %></h2>
-
+ <h2><%= gettext('Remember You?') %></h2>
+ <p><%= gettext('How long would you like to remain signed in with Persona?') %></p>
<ul>
<li>
- <button id="this_is_my_computer" tabindex="3"><%= gettext('yes') %></button>
- <%= gettext('If so, we\'ll keep you logged in for two weeks.') %>
+ <button id="this_is_my_computer" tabindex="3"><%= gettext('One month') %></button>
+ <%= gettext('I trust this computer.') %>
</li>
<li>
- <button id="this_is_not_my_computer" class="negative" tabindex="3"><%= gettext('no') %></button>
- <%= gettext('If you\'re at a public computer such as a library or internet cafe, choose this. We\'ll prompt you for your password in an hour for greater security.') %>
+ <button id="this_is_not_my_computer" class="negative" tabindex="3"><%= gettext('This session only') %></button>
+ <%= gettext('This is not my computer.') %>
</li>
</ul>
+ <p><%= gettext('Note: You can of course sign out of Persona at any time.') %></p>
</div>
View
22 resources/static/dialog/views/pick_email.ejs
@@ -3,28 +3,30 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
- <strong><%= gettext('Sign in using') %></strong>
+
+ <p>
+ <%= gettext('Sign in as...') %>
+ </p>
<div id="selectEmail" class="form_section">
<ul class="inputs">
<% _.each(identities, function(item, index) { var emailAddress = item.address, id = "email_" + index; %>
<li>
- <label for="<%= id %>" class="serif<% if (emailAddress === siteemail) { %> preselected<% } %> selectable" title="<%= emailAddress %>" >
+ <label for="<%= id %>" class="<% if (emailAddress === siteEmail) { %> preselected<% } %> selectable" title="<%= emailAddress %>" >
<input type="radio" name="email" id="<%= id %>" value="<%= emailAddress %>"
- <% if (emailAddress === siteemail) { %> checked="checked" <% } %>
+ <% if (emailAddress === siteEmail) { %> checked="checked" <% } %>
/>
<%= emailAddress %>
</label>
</li>
<% }); %>
</ul>
- <a id="useNewEmail" class="emphasize" href="#"><%= gettext('Add another email') %></a>
- <a id="thisIsNotMe" class="emphasize" href="#"><%= gettext('This is not me...') %></a>
+
+ <a id="useNewEmail" class="emphasize" href="#"><%= gettext('Add another email address') %></a>
+ <a id="thisIsNotMe" class="emphasize" href="#"><%= gettext('This is not me') %></a>
- <div class="submit add cf">
- <p class="cf">
- <button id="signInButton"><%= gettext('sign in') %></button>
- </p>
- </div>
+ <p class="submit add cf">
+ <button id="signInButton"><%= gettext('sign in') %></button>
+ </p>
</div>
View
2  resources/static/dialog/views/required_email.ejs
@@ -41,7 +41,7 @@
</div>
<div id="cannot_authenticate" class="tooltip" for="password">
- <%= gettext("The account cannot be logged in with this username and password.") %>
+ <%= gettext('This email address and password do not match.') %>
</div>
</li>
View
63 resources/static/dialog/views/set_password.ejs
@@ -2,22 +2,27 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
- <strong><%= gettext('Welcome to Persona!') %></strong>
-
<div class="form_section" id="set_password">
+ <% if (password_reset) { %>
+ <strong><%= gettext("Reset your password") %></strong>
+ <% } %>
+
<ul class="inputs">
<li>
- <% if(password_reset || !cancelable) { %>
- <%= gettext("Choose a new password you'll use when you sign in with Persona.") %>
- <% } else { %>
- <%= gettext("Next, choose a new password you'll use when you sign in with Persona.") %>
+ <% if (!password_reset) { %>
+ <%= gettext("Your email address is new to us. Please create a password to use with Persona.") %>
<% } %>
</li>
<li>
- <label for="password"><%= gettext('Password') %></label>
- <input id="password" type="password" maxlength="80" />
+ <% if (password_reset) { %>
+ <label for="password"><%= format(gettext("Create a new password to use with %s."), ["Persona"]) %></label>
+ <% } else { %>
+ <label for="password"><%= format(gettext("%s"), ["<strong>" + email + "</strong>"]) %></label>
+ <% } %>
+
+ <input id="password" type="password" maxlength="80" placeholder="<%= gettext("create password") %>"/>
<div class="tooltip" id="password_required" for="password">
<%= gettext('Password is required.') %>
@@ -33,38 +38,44 @@
</li>
<li>
- <label for="vpassword"><%= gettext('Verify Password') %></label>
- <input id="vpassword" placeholder="<%= gettext('Repeat Password') %>" type="password" maxlength=80 />
+ <label for="vpassword" class="hidden"><%= gettext('Verify Password') %></label>
+ <input id="vpassword" placeholder="<%= gettext('verify password') %>" type="password" maxlength="80" />
<div class="tooltip" id="vpassword_required" for="vpassword">
<%= gettext('Verification password is required.') %>
</div>
<div class="tooltip" id="passwords_no_match" for="vpassword">
- <%= gettext('Passwords do not match.') %>
+ <%= gettext('These passwords don\'t match!') %>
</div>
</li>
</ul>
- <div class="submit cf">
- <p class="cf">
+ <p class="submit cf buttonrow">
<button id="<%= password_reset ? "password_reset" : "verify_user" %>">
- <%= password_reset ? gettext('reset password') : gettext('verify email') %>
+ <%= (password_reset ? gettext('reset password') : gettext('done')) %>
</button>
+
<% if(cancelable) { %>
- <a id="cancel" class="action" href="#"><%= gettext('cancel') %></a>
+ <a id="cancel" class="right" href="#"><%= gettext('cancel') %></a>
<% } %>
+ </p>
+
+ <% if (password_reset) { %>
+ <p class="submit">
+ <%= gettext("Note: This password will be used with all of your Persona email addresses.") %>
+ </p>
+ <% } %>
+
+ <% if (personaTOSPP) { %>
+ <p id="persona_tospp" class="submit tospp">
+ <%= format(
+ gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
+ [ "Persona",
+ ' href="https://login.persona.org/tos" target="_new"',
+ ' href="https://login.persona.org/privacy" target="_new"',
+ ]) %>
</p>
- <% if (personaTOSPP) { %>
- <p id="persona_tospp" class="tospp">
- <%= format(
- gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
- [ "Persona",
- ' href="https://login.persona.org/tos" target="_new"',
- ' href="https://login.persona.org/privacy" target="_new"',
- ]) %>
- </p>
- <% } %>
- </div>
+ <% } %>
</div>
View
94 resources/static/dialog/views/verify_primary_user.ejs
@@ -2,73 +2,31 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<% if (requiredEmail) { %>
- <strong><%= gettext('The site requested you sign in using') %></strong>
- <div id="verify_primary_user" class="cf form_section">
- <ul class="inputs">
-
- <li>
- <label for="email"><%= gettext('Email') %></label>
- <input id="required_email" type="email" value="<%= email %>" disabled />
- <div id="could_not_add" class="tooltip" for="required_email">
- <%= gettext("We just sent an email to that address! If you really want to send another, wait a minute or two and try again.") %>
- </div>
- </li>
-
- <li class="small">
- <%= gettext("You must sign in with your email provider to verify ownership of this address. This window will be redirected to") %>
- <p>
- <strong><%= auth_url %></strong>.
- </p>
- </li>
- </ul>
-
- <div class="submit cf">
- <p class="cf">
- <button id="verifyWithPrimary"><%= gettext("verify") %></button>
- </p>
-
- <% if (personaTOSPP) { %>
- <p id="persona_tospp" class="tospp">
- <%= format(
- gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
- [ "Persona",
- ' href="https://login.persona.org/tos" target="_new"',
- ' href="https://login.persona.org/privacy" target="_new"',
- ]) %>
- </p>
- <% } %>
- </div>
- </div>
-
-<% } else { %>
- <strong><%= gettext("Verify With Email Provider") %></strong>
-
- <div id="verify_primary_user" class="cf form_section">
- <div class="small">
- <%= gettext("You must sign in with your email provider to verify ownership of this address. This window will be redirected to") %>
- <p>
- <strong><%= auth_url %></strong>.
+<div class="cf form_section">
+ <h3>
+ <%= format(gettext("%s makes this easy"), [idpName]) %>
+ </h3>
+
+ <p>
+ <%= format(gettext("Persona lets you use your %s account to sign into sites like %s."), [idpName, siteName]) %>
+ </p>
+ <p>
+ <%= format(gettext("Once you verify your account there, you will be signed in to %s."), [siteName]) %>
+ </p>
+ <p class="submit cf buttonrow">
+ <button id="verifyWithPrimary"><%= format(gettext("sign in with %s"), [idpName]) %></button>
+ <a href="#" id="cancel" class="emphasize right"><%= gettext("Use a different email address") %></a>
+ </p>
+
+ <% if (personaTOSPP) { %>
+ <p id="persona_tospp" class="submit tospp">
+ <%= format(
+ gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
+ [ "Persona",
+ ' href="https://login.persona.org/tos" target="_new"',
+ ' href="https://login.persona.org/privacy" target="_new"',
+ ]) %>
</p>
- </div>
-
- <div class="submit cf">
- <p class="cf">
- <button id="verifyWithPrimary"><%= gettext("verify") %></button>
- <a href="#" id="cancel" class="action"><%= gettext("cancel") %></a>
- </p>
- <% if (personaTOSPP) { %>
- <p id="persona_tospp" class="tospp">
- <%= format(
- gettext('By proceeding, you agree to %s\'s <a %s>Terms</a> and <a %s>Privacy Policy</a>.'),
- [ "Persona",
- ' href="https://login.persona.org/tos" target="_new"',
- ' href="https://login.persona.org/privacy" target="_new"',
- ]) %>
- </p>
- <% } %>
- </div>
-
- </div>
-<% } %>
+ <% } %>
+</div>
View
1  resources/static/test/cases/common/js/user.js
@@ -1152,6 +1152,7 @@ var jwcrypto = require("./lib/jwcrypto");
equal(info.type, "primary", "correct type");
equal(info.email, "registered@testuser.com", "correct email");
equal(info.authed, true, "user is authenticated with IdP");
+ equal(info.idpName, "testuser.com", "unknown IdP, use email host portion for name");
start();
},
testHelpers.unexpectedFailure
View
15 resources/views/dialog.ejs
@@ -28,23 +28,28 @@
<section id="wait">
<!-- because each section is an absolutely positioned element, we have to use the inner table container element to be able to vertically/horizontally center correctly. Without the table element, the layout gets all messed up. -->
<div class="table">
- <div class="vertical contents">
- <h2><%= gettext('Communicating with server') %></h2>
- <p><%= gettext('Just a moment while we talk with the server.') %></p>
+ <div class="vertical">
+ <div class="contents">
+ <h2 class="center"><%= gettext('Connecting to Persona...') %></h2>
+ </div>
</div>
</div>
</section>
<section id="error">
<div class="table">
- <div class="vertical contents">
+ <div class="vertical">
+ <div class="contents">
+ </div>
</div>
</div>
</section>
<section id="delay">
<div class="table">
- <div class="vertical contents">
+ <div class="vertical">
+ <div class="contents">
+ </div>
</div>
</div>
</section>
View
2  resources/views/dialog_layout.ejs
@@ -31,7 +31,7 @@
</div>
<footer>
-<%- format(gettext('Mozilla Persona is the fast and secure way to sign in. <a %s>Learn more &rarr;</a>'), [" href='/about' target='_blank'"]) %>
+<%- format(gettext('<strong>Persona.</strong> Simplified sign-in, built by a non-profit. <a %s>Learn more&rarr;</a>'), [" href='/about' target='_blank'"]) %>
</footer>
View
2  resources/views/forgot.ejs
@@ -72,7 +72,7 @@
</div>
<div class="tooltip" id="passwords_no_match" for="vpassword">
- Passwords do not match.
+ These passwords don't match!
</div>
</li>
View
3  resources/views/signin.ejs
@@ -42,7 +42,8 @@
</div>
<div id="cannot_authenticate" class="tooltip" for="password">
- The account cannot be logged in with this username and password.
+ This email address and password do not match.
+ </div>
</li>
</ul>
View
2  resources/views/signup.ejs
@@ -75,7 +75,7 @@
</div>
<div class="tooltip" id="passwords_no_match" for="vpassword">
- Passwords do not match.
+ These passwords don't match!
</div>
</li>
View
13 scripts/awsbox/post_deploy.js
@@ -10,7 +10,20 @@ fi
echo ">> updating strings"
svn co -q http://svn.mozilla.org/projects/l10n-misc/trunk/browserid/locale
+cd locale
+svn up
+cd ..
+./scripts/extract_po.sh locale/
+# yuck! our debug language breaks if this is not present
+for file in locale/templates/LC_MESSAGES/*.pot ; do
+ mv $file $file.old
+ sed 's/CHARSET/UTF-8/g' $file.old > $file
+ rm -f $file.old
+done
+
+./scripts/merge_po.sh locale/
./locale/compile-mo.sh locale/
+./locale/compile-json.sh locale/ resources/static/i18n/
echo ">> generating production resources"
scripts/compress
@lloyd
lloyd added a note

orthogonal change, improves generation of debug lang for ephemeral deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.