1
0
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:
Lee Brown
2019-08-02 16:23:13 -08:00
parent 88c97c18b3
commit 0344473c1e
4 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,6 @@ func Translator(utrans *ut.UniversalTranslator) web.Middleware {
m := func() error { m := func() error {
locale, _ := params["locale"] locale, _ := params["locale"]
locale = "fr"
var t ut.Translator var t ut.Translator
if len(locale) > 0 { if len(locale) > 0 {

View File

@ -37,6 +37,7 @@ func ContextTranslator(ctx context.Context) ut.Translator {
if t, ok := ctx.Value(KeyTranslate).(ut.Translator); ok { if t, ok := ctx.Value(KeyTranslate).(ut.Translator); ok {
return t return t
} }
return uniTrans.GetFallback() return uniTrans.GetFallback()
} }
@ -71,6 +72,7 @@ func init() {
transNl, _ := uniTrans.GetTranslator(nl.Locale()) transNl, _ := uniTrans.GetTranslator(nl.Locale())
transZh, _ := uniTrans.GetTranslator(zh.Locale()) transZh, _ := uniTrans.GetTranslator(zh.Locale())
transEn.Add("{{name}}", "Name", false) transEn.Add("{{name}}", "Name", false)
transFr.Add("{{name}}", "Nom", false) transFr.Add("{{name}}", "Nom", false)

View File

@ -14,6 +14,6 @@
<p>{{ .FromUser.FirstName }} has invited you to join {{ .Account.Name }}.</p> <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>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><a href="{{ .Url }}" target="_blank">{{ .Url }}</a></p>
<p>&nbsp;<br/>- Support </p> <p>&nbsp;<br/>- Geeks </p>
</div> </div>
</div> </div>

View File

@ -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>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>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><a href="{{ .Url }}" target="_blank">{{ .Url }}</a></p>
<p>&nbsp;<br/>- Support</p> <p>&nbsp;<br/>- Geeks </p>
</div> </div>
</div> </div>