From 21dbcb7c7708c81b9a743ba00a48fe9df8f55587 Mon Sep 17 00:00:00 2001
From: Peter Smit <peter@smitmail.eu>
Date: Mon, 22 Dec 2014 09:11:30 +0200
Subject: [PATCH 1/2] Create English locale keys for multiple e-mails feature

Also, change all current 'emails' to 'e-mails'.
Still todo: some CSS for the user/settings/email page, but that is not my specialty
---
 conf/locale/locale_en-US.ini       | 18 +++++++++++++-----
 templates/user/settings/email.tmpl |  4 ++--
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini
index 36430af75..a07f2c798 100644
--- a/conf/locale/locale_en-US.ini
+++ b/conf/locale/locale_en-US.ini
@@ -61,7 +61,7 @@ domain = Domain
 domain_helper = This affects SSH clone URLs.
 app_url = Application URL
 app_url_helper = This affects HTTP/HTTPS clone URL and somewhere in e-mail.
-email_title = Email Service Settings(Optional)
+email_title = E-mail Service Settings(Optional)
 smtp_host = SMTP Host
 mailer_user = Sender E-mail
 mailer_password = Sender Password 
@@ -109,7 +109,7 @@ confirmation_mail_sent_prompt = A new confirmation e-mail has been sent to <b>%s
 sign_in_email = Sign in to your e-mail
 active_your_account = Activate Your Account
 resent_limit_prompt = Sorry, you are sending an activation e-mail too frequently. Please wait 3 minutes.
-has_unconfirmed_mail = Hi %s, you have an unconfirmed email address(<b>%s</b>). If you haven't received a confirmation e-mail or need to resend a new one, please click on the button below.
+has_unconfirmed_mail = Hi %s, you have an unconfirmed e-mail address(<b>%s</b>). If you haven't received a confirmation e-mail or need to resend a new one, please click on the button below.
 resend_mail = Click here to resend your activation e-mail
 email_not_associate = This e-mail address does not associate to any account.
 send_reset_mail = Click here to (re)send your password reset e-mail
@@ -192,7 +192,7 @@ delete = Delete Account
 uid = Uid
 
 public_profile = Public Profile
-profile_desc = Your Email address is public and will be used for any account related notifications, and any web based operations made via the site.
+profile_desc = Your E-mail address is public and will be used for any account related notifications, and any web based operations made via the site.
 full_name = Full Name
 website = Website
 location = Location
@@ -217,6 +217,14 @@ new_password = New Password
 password_incorrect = Current password is not correct.
 change_password_success = Password is changed successfully. You can now sign in via new password.
 
+emails = E-mail Addresses
+manage_emails = Manage e-mail addresses
+email_desc = Current e-mail addresses
+primary_email = Make primary
+delete_email = Delete
+add_new_email = Add new e-mail address
+add_email = Add e-mail
+
 manage_ssh_keys = Manage SSH Keys
 add_key = Add Key
 ssh_desc = This is a list of SSH keys associated with your account. Remove any keys that you do not recognize.
@@ -404,7 +412,7 @@ release.tag_name_already_exist = Release with this tag name has already existed.
 [org]
 org_name_holder = Organization Name
 org_name_helper = Great organization names are short and memorable.
-org_email_helper = Organization's Email receives all notifications and confirmations.
+org_email_helper = Organization's E-mail receives all notifications and confirmations.
 create_org = Create Organization
 repo_updated = Updated
 people = People
@@ -619,7 +627,7 @@ config.db_ssl_mode_helper = (for "postgres" only)
 config.db_path = Path
 config.db_path_helper = (for "sqlite3" only)
 config.service_config = Service Configuration
-config.register_email_confirm = Register Email Confirmation
+config.register_email_confirm = Register E-mail Confirmation
 config.disable_register = Disable Registration
 config.require_sign_in_view = Require Sign In View
 config.mail_notify = Mail Notification
diff --git a/templates/user/settings/email.tmpl b/templates/user/settings/email.tmpl
index 6f2a85a3c..113c646e5 100644
--- a/templates/user/settings/email.tmpl
+++ b/templates/user/settings/email.tmpl
@@ -16,7 +16,7 @@
                             {{range .Emails}}
                             <li class="email clear">
                                 <div class="email-content left">
-									<p><strong>{{.Email}}</strong></p>
+									<p><strong>{{.Email}}</strong> {{if .IsPrimary}} <span class="email-primary">Primary</span> {{end}}</p>
 							   </div>
 							   {{if not .IsPrimary}}
 							   {{if .IsActivated}}
@@ -40,7 +40,7 @@
 							{{.CsrfTokenHtml}}
 							<p class="panel-header"><strong>{{.i18n.Tr "settings.add_new_email"}}</strong></p>
 							<p class="field">
-                                <label class="req" for="email">{{.i18n.Tr "settings.email"}}</label>
+                                <label class="req" for="email">{{.i18n.Tr "email"}}</label>
                                 <input class="ipt ipt-radius" id="email" name="email" type="text" required />
                             </p>
                             <p class="field">

From 8b31be43c6c6dd66d82d646b2a761d0836571e75 Mon Sep 17 00:00:00 2001
From: Peter Smit <peter@smitmail.eu>
Date: Mon, 22 Dec 2014 09:41:29 +0200
Subject: [PATCH 2/2] Forgot to i18n "Primary"

---
 conf/locale/locale_en-US.ini       | 1 +
 templates/user/settings/email.tmpl | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini
index a07f2c798..34f9febc1 100644
--- a/conf/locale/locale_en-US.ini
+++ b/conf/locale/locale_en-US.ini
@@ -220,6 +220,7 @@ change_password_success = Password is changed successfully. You can now sign in
 emails = E-mail Addresses
 manage_emails = Manage e-mail addresses
 email_desc = Current e-mail addresses
+primary = Primary
 primary_email = Make primary
 delete_email = Delete
 add_new_email = Add new e-mail address
diff --git a/templates/user/settings/email.tmpl b/templates/user/settings/email.tmpl
index 113c646e5..fc8bcbbcf 100644
--- a/templates/user/settings/email.tmpl
+++ b/templates/user/settings/email.tmpl
@@ -16,7 +16,7 @@
                             {{range .Emails}}
                             <li class="email clear">
                                 <div class="email-content left">
-									<p><strong>{{.Email}}</strong> {{if .IsPrimary}} <span class="email-primary">Primary</span> {{end}}</p>
+									<p><strong>{{.Email}}</strong> {{if .IsPrimary}} <span class="email-primary">{{$.i18n.Tr "settings.primary"}}</span> {{end}}</p>
 							   </div>
 							   {{if not .IsPrimary}}
 							   {{if .IsActivated}}