we_bridge_rails_engine_langs 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/seeds.rb +12 -0
- data/db/seeds/de.rb +1 -0
- data/db/seeds/de/de.txt +1 -0
- data/db/seeds/de/en.txt +1 -0
- data/db/seeds/de/es.txt +1 -0
- data/db/seeds/de/fa.txt +1 -0
- data/db/seeds/de/ja.txt +1 -0
- data/db/seeds/en.rb +1 -0
- data/db/seeds/en/de.txt +1 -0
- data/db/seeds/en/en.txt +1 -0
- data/db/seeds/en/es.txt +1 -0
- data/db/seeds/en/fa.txt +1 -0
- data/db/seeds/en/ja.txt +1 -0
- data/db/seeds/es.rb +1 -0
- data/db/seeds/es/de.txt +1 -0
- data/db/seeds/es/en.txt +1 -0
- data/db/seeds/es/es.txt +1 -0
- data/db/seeds/es/fa.txt +1 -0
- data/db/seeds/es/ja.txt +1 -0
- data/db/seeds/fa.rb +2 -0
- data/db/seeds/fa/de.txt +1 -0
- data/db/seeds/fa/en.txt +1 -0
- data/db/seeds/fa/es.txt +1 -0
- data/db/seeds/fa/fa.txt +1 -0
- data/db/seeds/fa/ja.txt +1 -0
- data/db/seeds/ja.rb +1 -0
- data/db/seeds/ja/de.txt +1 -0
- data/db/seeds/ja/en.txt +1 -0
- data/db/seeds/ja/es.txt +1 -0
- data/db/seeds/ja/fa.txt +1 -0
- data/db/seeds/ja/ja.txt +1 -0
- data/lib/we_bridge_rails_engine_langs/engine.rb +11 -0
- data/lib/we_bridge_rails_engine_langs/version.rb +1 -1
- metadata +33 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b654160340c79fd8f61102d7e78a55a3a99cb91d
|
4
|
+
data.tar.gz: 23f7272f88c4e14c63f43811e870a3c50a260ef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf21931bbc8c42ffe48790a1ffc3ed32f83488a042062ad6e7b8c4480c2e8c8935afaabcf460d21274ae2852ae5e6a77a02ab896f7608436f7a95f5bdc60dd57
|
7
|
+
data.tar.gz: 929b0da02d87029b29afbf3ca9efcc64296505ae3a4f5f49d65fa1d5ac4e1d9705996816aa0a9c4d1817a686ce9520055951d72888412037d4f41b02053f3e76
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Dir[File.expand_path('../seeds/*.rb',__FILE__)].each do |path|
|
2
|
+
load path
|
3
|
+
end
|
4
|
+
|
5
|
+
Lang.all.each do |lang|
|
6
|
+
Dir[File.expand_path("../seeds/#{lang.code}/*.txt",__FILE__)].each do |path|
|
7
|
+
if !(txt = File.read(path).gsub(/\s/,'')).empty?
|
8
|
+
code = File.basename(path,'.*').to_sym
|
9
|
+
Lang.find_by(code: code).text(lang.code).update!(label: txt)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/db/seeds/de.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Lang.find_or_create_by(code: :de).update!(enable: false, position: 300)
|
data/db/seeds/de/de.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Deutsch
|
data/db/seeds/de/en.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Englisch
|
data/db/seeds/de/es.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Spanisch
|
data/db/seeds/de/fa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Persisch
|
data/db/seeds/de/ja.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Japanisch
|
data/db/seeds/en.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Lang.find_or_create_by(code: :en).update!(position: 200)
|
data/db/seeds/en/de.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
German
|
data/db/seeds/en/en.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
English
|
data/db/seeds/en/es.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Spanish
|
data/db/seeds/en/fa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Persian
|
data/db/seeds/en/ja.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Japanese
|
data/db/seeds/es.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Lang.find_or_create_by(code: :es).update!(position: 400,enable: false)
|
data/db/seeds/es/de.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Alemán
|
data/db/seeds/es/en.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Inglés
|
data/db/seeds/es/es.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Españoles
|
data/db/seeds/es/fa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Persa
|
data/db/seeds/es/ja.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Japonés
|
data/db/seeds/fa.rb
ADDED
data/db/seeds/fa/de.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
آلمان
|
data/db/seeds/fa/en.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
انگلیسی
|
data/db/seeds/fa/es.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
اسپانیایی
|
data/db/seeds/fa/fa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
فارسی
|
data/db/seeds/fa/ja.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ژاپن
|
data/db/seeds/ja.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Lang.find_or_create_by(code: :ja).update!(position: 100)
|
data/db/seeds/ja/de.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ドイツ語
|
data/db/seeds/ja/en.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
英語
|
data/db/seeds/ja/es.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
スペイン語
|
data/db/seeds/ja/fa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ペルシア語
|
data/db/seeds/ja/ja.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
日本語
|
@@ -9,5 +9,16 @@ module WeBridgeRailsEngineLangs
|
|
9
9
|
g.stylesheets true
|
10
10
|
g.javascripts true
|
11
11
|
end
|
12
|
+
|
13
|
+
initializer :append_migrations_and_seeds do |app|
|
14
|
+
unless app.root.to_s.match root.to_s
|
15
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
16
|
+
app.config.paths["db/migrate"] << expanded_path
|
17
|
+
end
|
18
|
+
config.paths["db/seeds.rb"].existent.each do |expanded_path|
|
19
|
+
app.config.paths["db/seeds.rb"] << expanded_path
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
12
23
|
end
|
13
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: we_bridge_rails_engine_langs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinjiro Itagaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -143,6 +143,37 @@ files:
|
|
143
143
|
- app/views/langs/show.html.builder
|
144
144
|
- config/routes.rb
|
145
145
|
- db/migrate/20150803101150_create_langs.rb
|
146
|
+
- db/seeds.rb
|
147
|
+
- db/seeds/de.rb
|
148
|
+
- db/seeds/de/de.txt
|
149
|
+
- db/seeds/de/en.txt
|
150
|
+
- db/seeds/de/es.txt
|
151
|
+
- db/seeds/de/fa.txt
|
152
|
+
- db/seeds/de/ja.txt
|
153
|
+
- db/seeds/en.rb
|
154
|
+
- db/seeds/en/de.txt
|
155
|
+
- db/seeds/en/en.txt
|
156
|
+
- db/seeds/en/es.txt
|
157
|
+
- db/seeds/en/fa.txt
|
158
|
+
- db/seeds/en/ja.txt
|
159
|
+
- db/seeds/es.rb
|
160
|
+
- db/seeds/es/de.txt
|
161
|
+
- db/seeds/es/en.txt
|
162
|
+
- db/seeds/es/es.txt
|
163
|
+
- db/seeds/es/fa.txt
|
164
|
+
- db/seeds/es/ja.txt
|
165
|
+
- db/seeds/fa.rb
|
166
|
+
- db/seeds/fa/de.txt
|
167
|
+
- db/seeds/fa/en.txt
|
168
|
+
- db/seeds/fa/es.txt
|
169
|
+
- db/seeds/fa/fa.txt
|
170
|
+
- db/seeds/fa/ja.txt
|
171
|
+
- db/seeds/ja.rb
|
172
|
+
- db/seeds/ja/de.txt
|
173
|
+
- db/seeds/ja/en.txt
|
174
|
+
- db/seeds/ja/es.txt
|
175
|
+
- db/seeds/ja/fa.txt
|
176
|
+
- db/seeds/ja/ja.txt
|
146
177
|
- lib/tasks/we_bridge_rails_engine_langs_tasks.rake
|
147
178
|
- lib/we_bridge_rails_engine_langs.rb
|
148
179
|
- lib/we_bridge_rails_engine_langs/engine.rb
|