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: 5a96bab6a15c916b2f43e5dad1787d4351f75016b818bdb8a4559dc626f3d218
4
- data.tar.gz: 1dbf100eb865ab05a7394b641e45e3ab001eb294237eb51418b07169e24e7995
3
+ metadata.gz: f35abe522b6d44295360add386e32886b6bbb367f9efb377a06108b496b8732c
4
+ data.tar.gz: 91e58486142e9cc7dee787cfc9ba369c884187078addef668e37c9958f1a6e00
5
5
  SHA512:
6
- metadata.gz: 6d569ffb9cba5101fac1a48e2606c4042590d40a3c86c0506ccf988d34db53466fb8b0219a1866629f409a7ea15090659a2ee137a85086cf7c6b907af5eddf4a
7
- data.tar.gz: a4acf8ca5fd4df4e848a454449c01e590329097d49d88f52e9ee9514c1cd7054f153f70275ccd72343584e9d223d11f38c0e4bf76eac83a4f97db687ebd4ccda
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
- @locale
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!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAdminGlobalizeField
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
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.1.0
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-13 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails