locale_kit 1.0.1 → 1.1.0
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc48ce76c06104b370b3a91836be834219120b0798af46421b8a5d23fba69305
|
|
4
|
+
data.tar.gz: 273591aea406bcc543534bf1b4c0a365b278178746ca219e222d1e66792e65b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '057665899331a13d67df5649675b85ff89caa492071cf1dcd8db0af639869e95b4a27044277026fc0ce6860d35aba1a934e11c184dc789cacd5bef8e2d71ea2f'
|
|
7
|
+
data.tar.gz: 61e066a5d2fd81466abf3c0ac2896d35375ad2a96c69e5567ec0124b68e47dd94575ec368b5b2c122e2bcb30c408a469f3c6dbfceb0911a73f15c6b6129b8d0e
|
|
@@ -16,6 +16,10 @@ class LocaleKit::Generators::ModelGenerator < LocaleKit::Generators::Base
|
|
|
16
16
|
|
|
17
17
|
attr_accessor :current_locale
|
|
18
18
|
|
|
19
|
+
def i18n_scope
|
|
20
|
+
defined?(ApplicationRecord) ? ApplicationRecord.i18n_scope : model_type
|
|
21
|
+
end
|
|
22
|
+
|
|
19
23
|
def model_type
|
|
20
24
|
defined?(ActiveRecord) ? :activerecord : :activemodel
|
|
21
25
|
end
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<%= current_locale %>:
|
|
2
|
-
<%=
|
|
2
|
+
<%= i18n_scope %>:
|
|
3
3
|
models:
|
|
4
4
|
<%= model_name %>: "<%= file_name.classify %>"
|
|
5
5
|
attributes:
|
|
6
6
|
<%= model_name %>:
|
|
7
|
-
id: "ID"
|
|
8
7
|
<% attribute_names.each do |attr_name| -%>
|
|
9
8
|
<%= attr_name %>: "<%= attr_name.classify %>"
|
|
10
9
|
<% end -%>
|
data/lib/locale_kit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locale_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sho Kusano
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-04-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: i18n
|
|
@@ -84,16 +84,16 @@ dependencies:
|
|
|
84
84
|
name: sqlite3
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - "
|
|
87
|
+
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
89
|
+
version: 1.3.6
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
96
|
+
version: 1.3.6
|
|
97
97
|
description: Improve locales convention of Rails
|
|
98
98
|
email:
|
|
99
99
|
- sho-kusano@space-pirates.jp
|
|
@@ -147,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
147
|
- !ruby/object:Gem::Version
|
|
148
148
|
version: '0'
|
|
149
149
|
requirements: []
|
|
150
|
-
|
|
151
|
-
rubygems_version: 2.7.6
|
|
150
|
+
rubygems_version: 3.1.2
|
|
152
151
|
signing_key:
|
|
153
152
|
specification_version: 4
|
|
154
153
|
summary: Improve locales convention of Rails
|