use descriptive variable names in email translations
in preparation for an email editor.
This commit is contained in:
@@ -118,6 +118,15 @@ func (ls *setupLangs) getOptions() [][2]string {
|
||||
}
|
||||
|
||||
type langSection map[string]string
|
||||
type tmpl map[string]string
|
||||
|
||||
func (el langSection) template(field string, vals tmpl) string {
|
||||
text := el.get(field)
|
||||
for key, val := range vals {
|
||||
text = strings.ReplaceAll(text, "{"+key+"}", val)
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
func (el langSection) format(field string, vals ...string) string {
|
||||
text := el.get(field)
|
||||
|
||||
Reference in New Issue
Block a user