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 1515
1616package i18n
1717
18- var initialized = false
19-
2018// Init initializes the i18n module, setting the locale according to this order of preference:
2119// 1. Locale specified via the function call
2220// 2. OS Locale
2321// 3. en (default)
2422func Init (configLocale ... string ) {
25- defer func () { initialized = true }()
26-
2723 initRiceBox ()
2824 locales := supportedLocales ()
2925 if len (configLocale ) > 1 {
@@ -50,8 +46,5 @@ func Init(configLocale ...string) {
5046// Tr returns msg translated to the selected locale
5147// the msg argument must be a literal string
5248func Tr (msg string , args ... interface {}) string {
53- if ! initialized {
54- panic ("i18n.Tr called before i18n.Init()" )
55- }
5649 return po .Get (msg , args ... )
5750}
You can’t perform that action at this time.
0 commit comments