File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change 15
15
16
16
package i18n
17
17
18
- var initialized = false
19
-
20
18
// Init initializes the i18n module, setting the locale according to this order of preference:
21
19
// 1. Locale specified via the function call
22
20
// 2. OS Locale
23
21
// 3. en (default)
24
22
func Init (configLocale ... string ) {
25
- defer func () { initialized = true }()
26
-
27
23
initRiceBox ()
28
24
locales := supportedLocales ()
29
25
if len (configLocale ) > 1 {
@@ -50,8 +46,5 @@ func Init(configLocale ...string) {
50
46
// Tr returns msg translated to the selected locale
51
47
// the msg argument must be a literal string
52
48
func Tr (msg string , args ... interface {}) string {
53
- if ! initialized {
54
- panic ("i18n.Tr called before i18n.Init()" )
55
- }
56
49
return po .Get (msg , args ... )
57
50
}
You can’t perform that action at this time.
0 commit comments