File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import (
25
25
)
26
26
27
27
func setPo (poFile string ) {
28
- po = new ( gotext.Po )
28
+ po = gotext .NewPo ( )
29
29
po .Parse ([]byte (poFile ))
30
30
}
31
31
@@ -39,7 +39,7 @@ func TestPoTranslation(t *testing.T) {
39
39
}
40
40
41
41
func TestNoLocaleSet (t * testing.T ) {
42
- po = new ( gotext.Po )
42
+ po = gotext .NewPo ( )
43
43
require .Equal (t , "test-key" , Tr ("test-key" ))
44
44
}
45
45
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ var po *gotext.Po
28
28
var contents embed.FS
29
29
30
30
func init () {
31
- po = new ( gotext.Po )
31
+ po = gotext .NewPo ( )
32
32
}
33
33
34
34
func supportedLocales () []string {
@@ -75,6 +75,6 @@ func setLocale(locale string) {
75
75
if err != nil {
76
76
panic ("Error reading embedded i18n data: " + err .Error ())
77
77
}
78
- po = new ( gotext.Po )
78
+ po = gotext .NewPo ( )
79
79
po .Parse (poFile )
80
80
}
You can’t perform that action at this time.
0 commit comments