You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-06-25 00:46:51 +02:00
fix translations
This commit is contained in:
@ -24,8 +24,6 @@ func Translator(utrans *ut.UniversalTranslator) web.Middleware {
|
||||
m := func() error {
|
||||
locale, _ := params["locale"]
|
||||
|
||||
locale = "fr"
|
||||
|
||||
var t ut.Translator
|
||||
if len(locale) > 0 {
|
||||
|
||||
|
@ -37,6 +37,7 @@ func ContextTranslator(ctx context.Context) ut.Translator {
|
||||
if t, ok := ctx.Value(KeyTranslate).(ut.Translator); ok {
|
||||
return t
|
||||
}
|
||||
|
||||
return uniTrans.GetFallback()
|
||||
}
|
||||
|
||||
@ -71,6 +72,7 @@ func init() {
|
||||
transNl, _ := uniTrans.GetTranslator(nl.Locale())
|
||||
transZh, _ := uniTrans.GetTranslator(zh.Locale())
|
||||
|
||||
|
||||
transEn.Add("{{name}}", "Name", false)
|
||||
transFr.Add("{{name}}", "Nom", false)
|
||||
|
||||
|
@ -14,6 +14,6 @@
|
||||
<p>{{ .FromUser.FirstName }} has invited you to join {{ .Account.Name }}.</p>
|
||||
<p>To accept the invite, follow this link (or paste into your browser) within the next {{ .Minutes }} minutes.</p>
|
||||
<p><a href="{{ .Url }}" target="_blank">{{ .Url }}</a></p>
|
||||
<p> <br/>- Support </p>
|
||||
<p> <br/>- Geeks </p>
|
||||
</div>
|
||||
</div>
|
@ -15,6 +15,6 @@
|
||||
<p>Someone in space has asked to reset the password for your account. If you did not request a password reset, you can disregard this email. No changes have been made to your account.</p>
|
||||
<p>To reset your password, follow this link (or paste into your browser) within the next {{ .Minutes }} minutes.</p>
|
||||
<p><a href="{{ .Url }}" target="_blank">{{ .Url }}</a></p>
|
||||
<p> <br/>- Support</p>
|
||||
<p> <br/>- Geeks </p>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user