From 6104c37761deb8f06ea4af8838db12b8158318be Mon Sep 17 00:00:00 2001 From: Yusuke Nemoto Date: Sat, 21 Jul 2018 01:52:20 +0900 Subject: Break HTML blocks to individual strings (#8903) * Modifying message and templates about mfa_change * Modifying message and templates about password_change * Modify message and template about password_reset * Modify message and template about singin_change * Modify message and template about email_info * Modify message and template about change_username * Modify message about change_email * Add missing props * Add argument * Modify message and template about token_added * Modify messages and template about notification_email * Modify message and template about deactivate_email * Fix style * Remove unused message * Remove br tags * Modify message and code about invite_mail * Add missing message --- utils/html_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/html_test.go') diff --git a/utils/html_test.go b/utils/html_test.go index ba67189b6..43363488f 100644 --- a/utils/html_test.go +++ b/utils/html_test.go @@ -28,7 +28,7 @@ func init() { htmlTestTranslationBundle = bundle.New() fooBold, _ := translation.NewTranslation(map[string]interface{}{ "id": "foo.bold", - "translation": "{{ .Foo }}", + "translation": "

[[{{ .Foo }}]]

", }) htmlTestTranslationBundle.AddTranslation(&language.Language{Tag: "en"}, fooBold) } @@ -103,7 +103,7 @@ func TestHTMLTemplate_RenderError(t *testing.T) { } func TestTranslateAsHtml(t *testing.T) { - assert.EqualValues(t, "<i>foo</i>", TranslateAsHtml(i18n.TranslateFunc(htmlTestTranslationBundle.MustTfunc("en")), "foo.bold", map[string]interface{}{ + assert.EqualValues(t, "

<i>foo</i>

", TranslateAsHtml(i18n.TranslateFunc(htmlTestTranslationBundle.MustTfunc("en")), "foo.bold", map[string]interface{}{ "Foo": "foo", })) } -- cgit v1.2.3-1-g7c22