Rename TR* to TResource* for clarity
This commit is contained in:
@@ -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 }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user