summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-06-28 08:43:28 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-28 13:43:28 +0800
commit32fc44aa83e61acb93dbdcf6d47dfadc69f5c044 (patch)
tree60c08a5a57d10e710c36d27685f199af465f0b97 /models
parent9d8fba62b37aee328f47411d1e187ca8f18396e4 (diff)
downloadgitea-32fc44aa83e61acb93dbdcf6d47dfadc69f5c044.tar.gz
gitea-32fc44aa83e61acb93dbdcf6d47dfadc69f5c044.zip
Make time diff translatable (#2057)
Diffstat (limited to 'models')
-rw-r--r--models/mail.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/mail.go b/models/mail.go
index 7ef73fc11d..41fddad2b4 100644
--- a/models/mail.go
+++ b/models/mail.go
@@ -47,8 +47,8 @@ func SendTestMail(email string) error {
func SendUserMail(c *macaron.Context, u *User, tpl base.TplName, code, subject, info string) {
data := map[string]interface{}{
"Username": u.DisplayName(),
- "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives),
- "ResetPwdCodeLives": base.MinutesToFriendly(setting.Service.ResetPwdCodeLives),
+ "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives, c.Locale.Language()),
+ "ResetPwdCodeLives": base.MinutesToFriendly(setting.Service.ResetPwdCodeLives, c.Locale.Language()),
"Code": code,
}
@@ -79,7 +79,7 @@ func SendResetPasswordMail(c *macaron.Context, u *User) {
func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) {
data := map[string]interface{}{
"Username": u.DisplayName(),
- "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives),
+ "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives, c.Locale.Language()),
"Code": u.GenerateEmailActivateCode(email.Email),
"Email": email.Email,
}