From e1f87e340fb372987571e69b359b07de32a16fdc Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Sun, 15 Jul 2012 21:55:39 -0600
Subject: [PATCH] adorn confirmations on main site (like 'd00d, sure you wanna
 cancel') with gettext() for proper extraction and substition

---
 resources/static/pages/js/manage_account.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/resources/static/pages/js/manage_account.js b/resources/static/pages/js/manage_account.js
index 5862120c7..2e650f6a1 100644
--- a/resources/static/pages/js/manage_account.js
+++ b/resources/static/pages/js/manage_account.js
@@ -49,7 +49,8 @@ BrowserID.manageAccount = (function() {
         displayStoredEmails(oncomplete);
       }
       else if (_.size(emails) > 1) {
-        if (confirmAction("Remove " + email + " from your BrowserID?")) {
+        if (confirmAction(format(gettext("Remove %(email) from your BrowserID?"),
+                                 { email: email }))) {
           user.removeEmail(email, function() {
             displayStoredEmails(oncomplete);
           }, pageHelpers.getFailure(errors.removeEmail, oncomplete));
@@ -59,7 +60,7 @@ BrowserID.manageAccount = (function() {
         }
       }
       else {
-        if (confirmAction("Removing the last address will cancel your BrowserID account.\nAre you sure you want to continue?")) {
+        if (confirmAction(gettext("Removing the last address will cancel your BrowserID account.\nAre you sure you want to continue?"))) {
           user.cancelUser(function() {
             doc.location="/";
             complete();
@@ -92,7 +93,7 @@ BrowserID.manageAccount = (function() {
   }
 
   function cancelAccount(oncomplete) {
-    if (confirmAction("Are you sure you want to cancel your BrowserID account?")) {
+    if (confirmAction(gettext("Are you sure you want to cancel your BrowserID account?"))) {
       user.cancelUser(function() {
         doc.location="/";
         oncomplete && oncomplete();
-- 
GitLab