tpl: Set i18n bundle once per test run
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 19 Sep 2016 00:44:21 +0000 (02:44 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 19 Sep 2016 00:44:21 +0000 (02:44 +0200)
No real practical difference, but more clear.

tpl/template_i18n_test.go

index 2940c8d4d31a44cf860635ce421f8d1d6d1c7b09..4578005aff18431be1fa4f4e658d416db7dc6787 100644 (file)
@@ -34,9 +34,9 @@ func doTestI18nTranslate(t *testing.T, data []test, lang, id string) string {
                if err != nil {
                        t.Errorf("Error parsing translation file: %s", err)
                }
-               SetI18nTfuncs(i18nBundle)
        }
 
+       SetI18nTfuncs(i18nBundle)
        SetTranslateLang(lang)
 
        translated, err := I18nTranslate(id, nil)