Rename TR* to TResource* for clarity

This commit is contained in:
Denis Arh
2021-09-22 11:26:14 +02:00
committed by Tomaž Jerman
parent 2a843a317d
commit a50c64747e
6 changed files with 27 additions and 27 deletions
@@ -123,7 +123,7 @@ func (svc resourceTranslation) {{ .Resource }}(ctx context.Context, {{ if .Local
Resource: res.ResourceTranslation(),
Lang: tag.String(),
Key: k.Path,
Msg: svc.locale.TRFor(tag, res.ResourceTranslation(), k.Path),
Msg: svc.locale.TResourceFor(tag, res.ResourceTranslation(), k.Path),
})
{{ end }}
{{- end}}
@@ -65,7 +65,7 @@ func {{ .Resource }}ResourceTranslation({{ if .Locale.Resource }}{{ range .Local
cpts = append(cpts, {{range .Locale.Resource.References -}}
strconv.FormatUint({{ unexport .Field }}, 10),
{{- end }})
return fmt.Sprintf({{ .Resource }}ResourceTranslationTpl(), cpts...)
{{- end }}
}