rails_admin_globalize_field 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f35abe522b6d44295360add386e32886b6bbb367f9efb377a06108b496b8732c
|
4
|
+
data.tar.gz: 91e58486142e9cc7dee787cfc9ba369c884187078addef668e37c9958f1a6e00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60f127c44ed0af74ae3c01bba80d3fbd8eb1a6945ef25eb7ba974c1d196f3470b40c7f9e480c94169bad07f5af648420caeceb0eb979b86419432afa1e23851a
|
7
|
+
data.tar.gz: 7d0692a33c641c34219986e457857a99929f52a93485c6d7d7d9983a2deb55d03c16dbf8ba7d9325a49490587dbbb99cbf46292f86e5aebe1fc6dd16bbe491f0
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
module RailsAdminGlobalizeField
|
4
4
|
class Tab
|
5
|
+
LABEL_KEY = 'admin.globalize_field.tab_label'
|
6
|
+
|
5
7
|
attr_reader :locale, :translation
|
6
8
|
|
7
9
|
def initialize(locale, translation, validate: true)
|
@@ -15,7 +17,11 @@ module RailsAdminGlobalizeField
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def label
|
18
|
-
|
20
|
+
if I18n.exists?(LABEL_KEY, locale: locale)
|
21
|
+
I18n.t(LABEL_KEY, locale: locale)
|
22
|
+
else
|
23
|
+
locale
|
24
|
+
end
|
19
25
|
end
|
20
26
|
|
21
27
|
def active!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_globalize_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Volozhanin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|