diff options
-rw-r--r-- | modules/templates/helper.go | 4 | ||||
-rw-r--r-- | options/locale/locale_en-US.ini | 4 | ||||
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 454bd648a3..ae2efc2585 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -160,6 +160,10 @@ func NewFuncMap() []template.FuncMap { return setting.DisableGitHooks }, "TrN": TrN, + // TODO: Remove this once go-ini parser supports unescaping comment characters + "UnescapeLocale": func(str string) string { + return strings.NewReplacer("\\;", ";", "\\#", "#").Replace(str) + }, }} } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 86b64946c2..59c4d840ee 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -627,8 +627,8 @@ issues.label_templates.info = There are not any labels yet. You can click on the issues.label_templates.helper = Select a label set issues.label_templates.use = Use this label set issues.label_templates.fail_to_load_file = Failed to load label template file '%s': %v -issues.add_label_at = `added the <div class="ui label" style="color: %s; background-color: %s">%s</div> label %s` -issues.remove_label_at = `removed the <div class="ui label" style="color: %s; background-color: %s">%s</div> label %s` +issues.add_label_at = `added the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s` +issues.remove_label_at = `removed the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s` issues.add_milestone_at = `added this to the <b>%s</b> milestone %s` issues.change_milestone_at = `modified the milestone from <b>%s</b> to <b>%s</b> %s` issues.remove_milestone_at = `removed this from the <b>%s</b> milestone %s` diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 34609ceb31..083518dffe 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -96,7 +96,7 @@ <img src="{{.Poster.RelAvatarLink}}"> </a> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> - {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color .Label.Name $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color .Label.Name $createdStr | Safe}}{{end}}</span> + {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color .Label.Name $createdStr | UnescapeLocale | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color .Label.Name $createdStr | UnescapeLocale | Safe}}{{end}}</span> </div> {{end}} {{else if eq .Type 8}} |