imba-localization 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/localization.imba +3 -2
- package/package.json +1 -1
package/localization.imba
CHANGED
|
@@ -17,11 +17,11 @@ export class Localization
|
|
|
17
17
|
|
|
18
18
|
return new Proxy self, {
|
|
19
19
|
get: do(target, p, receiver)
|
|
20
|
+
return Reflect.get(target, p, receiver) if self[p] !== undefined
|
|
20
21
|
if !ready
|
|
21
|
-
console.log("Request before localization is ready", p)
|
|
22
|
+
console.log("Request before localization is ready:", p)
|
|
22
23
|
return
|
|
23
24
|
return if errors[p]
|
|
24
|
-
return Reflect.get(target, p, receiver) if self[p]
|
|
25
25
|
return target.languages[p] if target.languages[p]
|
|
26
26
|
return target.languages[active][p] if target.languages[active] and target.languages[active][p]
|
|
27
27
|
if !errors[p]
|
|
@@ -45,6 +45,7 @@ export class Localization
|
|
|
45
45
|
console.log('There is no Localization for the default language', default)
|
|
46
46
|
return
|
|
47
47
|
ready = true
|
|
48
|
+
errors = {}
|
|
48
49
|
onready! if onready isa Function
|
|
49
50
|
onchange(active) if onchange isa Function
|
|
50
51
|
|