awesome_translations 0.0.39 → 0.0.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/awesome_translations/groups/show.html.haml +4 -1
- data/lib/awesome_translations/handlers/validations_handler.rb +1 -7
- data/lib/awesome_translations/version.rb +1 -1
- data/spec/dummy/db/awesome_translations.sqlite3 +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +29 -0
- data/spec/dummy/log/test.log +69 -0
- data/spec/handlers/validations_handler_spec.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce3363ca2ec6efc2a28a213d9ef3481beb8b686
|
4
|
+
data.tar.gz: 49f520ec852daf2bb85329c8fa3456060856ff4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17523176efadd420b2bfed964e3a2bae562fead4407eece2f50206154466463ed608b4e18e6a40ab14a648eeffa378997f4d5e896de9b117e74c76e0d10e114e
|
7
|
+
data.tar.gz: c4eaafc0efdf138cd95102b38b4bdbe1e86fe28723144339f6466f9d2bd3245e010ed660946aaa68e8896b46cac582b1815369393074c30b4382d34fe36c51b8
|
@@ -28,7 +28,10 @@
|
|
28
28
|
%td.line-content{colspan: 1 + I18n.available_locales.length}
|
29
29
|
.code-container
|
30
30
|
- if translation.file_line_content?
|
31
|
-
%pre
|
31
|
+
%pre
|
32
|
+
%p{style: "font-weight: bold;"} #{translation.file_path}:#{translation.line_no}
|
33
|
+
|
34
|
+
= translation.file_line_content
|
32
35
|
- elsif translation.default.present?
|
33
36
|
Default: #{translation.default}
|
34
37
|
- if @translations.empty?
|
@@ -70,13 +70,7 @@ private
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def translations_for_confirmation_validator(_validator, model_inspector, attribute_name, yielder)
|
73
|
-
|
74
|
-
|
75
|
-
yielder << AwesomeTranslations::Translation.new(
|
76
|
-
key: "activerecord.attributes.#{snake_clazz_name}.#{attribute_name}_confirmation",
|
77
|
-
key_show: "#{snake_clazz_name}.#{attribute_name}_confirmation",
|
78
|
-
dir: "#{Rails.root}/config/locales/awesome_translations/models/#{snake_clazz_name}"
|
79
|
-
)
|
73
|
+
add_translation("confirmation", model_inspector, "#{attribute_name}_confirmation", yielder)
|
80
74
|
end
|
81
75
|
|
82
76
|
def add_translation(key, model_inspector, attribute_name, yielder)
|
Binary file
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
[1m[36m (1.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreateUsers (20141018081559)
|
6
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password" varchar, "age" integer)
|
8
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141018081559"]]
|
9
|
+
[1m[35m (1.0ms)[0m commit transaction
|
10
|
+
Migrating to CreateRoles (20141018081640)
|
11
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "roles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "role" varchar)
|
13
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_roles_on_user_id" ON "roles" ("user_id")[0m
|
14
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141018081640"]]
|
15
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
16
|
+
Migrating to AddPriceCentsToRoles (20150607110245)
|
17
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "roles" ADD "price_cents" integer[0m
|
19
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150607110245"]]
|
20
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
21
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
22
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
23
|
+
FROM sqlite_master
|
24
|
+
WHERE name='index_roles_on_user_id' AND type='index'
|
25
|
+
UNION ALL
|
26
|
+
SELECT sql
|
27
|
+
FROM sqlite_temp_master
|
28
|
+
WHERE name='index_roles_on_user_id' AND type='index'
|
29
|
+
[0m
|
data/spec/dummy/log/test.log
CHANGED
@@ -222,3 +222,72 @@ Processing by AwesomeTranslations::HandlersController#show as HTML
|
|
222
222
|
Rendered /Users/kaspernj/Rails/awesome_translations/app/views/awesome_translations/handlers/show.html.haml within layouts/awesome_translations/application (36.4ms)
|
223
223
|
Completed 200 OK in 44ms (Views: 39.0ms | ActiveRecord: 0.0ms)
|
224
224
|
[1m[35m (0.1ms)[0m rollback transaction
|
225
|
+
Unhandeled validator: ActiveModel::Validations::NumericalityValidator
|
226
|
+
Unhandeled validator: MoneyRails::ActiveModel::MoneyValidator
|
227
|
+
Unhandeled validator: ActiveModel::Validations::ConfirmationValidator
|
228
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
229
|
+
[1m[35m (0.0ms)[0m commit transaction
|
230
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
231
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
232
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
233
|
+
[1m[35m (0.0ms)[0m commit transaction
|
234
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
235
|
+
Unhandeled validator: ActiveModel::Validations::ConfirmationValidator
|
236
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
237
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
238
|
+
[1m[35m (0.0ms)[0m commit transaction
|
239
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
240
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
241
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
242
|
+
[1m[35m (0.0ms)[0m commit transaction
|
243
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
244
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
245
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
246
|
+
[1m[35m (0.1ms)[0m commit transaction
|
247
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
248
|
+
Unhandeled validator: ActiveModel::Validations::ConfirmationValidator
|
249
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
250
|
+
Unhandeled validator: ActiveModel::Validations::NumericalityValidator
|
251
|
+
Unhandeled validator: MoneyRails::ActiveModel::MoneyValidator
|
252
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
253
|
+
[1m[35m (0.0ms)[0m commit transaction
|
254
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
255
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
256
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
257
|
+
[1m[35m (0.1ms)[0m commit transaction
|
258
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
259
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
260
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
261
|
+
[1m[35m (0.1ms)[0m commit transaction
|
262
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
263
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
264
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
265
|
+
[1m[35m (0.0ms)[0m commit transaction
|
266
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
267
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
268
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
269
|
+
[1m[35m (0.0ms)[0m commit transaction
|
270
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
271
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
272
|
+
Unhandeled validator: ActiveModel::Validations::NumericalityValidator
|
273
|
+
Unhandeled validator: MoneyRails::ActiveModel::MoneyValidator
|
274
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
275
|
+
[1m[35m (0.0ms)[0m commit transaction
|
276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
277
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
278
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
279
|
+
[1m[35m (0.0ms)[0m commit transaction
|
280
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
281
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
282
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
283
|
+
[1m[35m (0.0ms)[0m commit transaction
|
284
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
285
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
286
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
287
|
+
[1m[35m (0.0ms)[0m commit transaction
|
288
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
289
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
290
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
291
|
+
[1m[35m (0.0ms)[0m commit transaction
|
292
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
293
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
@@ -25,7 +25,7 @@ describe AwesomeTranslations::Handlers::ValidationsHandler do
|
|
25
25
|
it "finds confirmation translations" do
|
26
26
|
confirmation_translation = user_group.translations.find { |translation| translation.key.include? "email_confirmation" }
|
27
27
|
expect(confirmation_translation).to_not be_blank
|
28
|
-
expect(confirmation_translation.key).to eq "activerecord.
|
28
|
+
expect(confirmation_translation.key).to eq "activerecord.errors.models.user.attributes.email_confirmation.confirmation"
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
@@ -346,11 +346,13 @@ files:
|
|
346
346
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
347
347
|
- spec/dummy/config/routes.rb
|
348
348
|
- spec/dummy/db/awesome_translations.sqlite3
|
349
|
+
- spec/dummy/db/development.sqlite3
|
349
350
|
- spec/dummy/db/migrate/20141018081559_create_users.rb
|
350
351
|
- spec/dummy/db/migrate/20141018081640_create_roles.rb
|
351
352
|
- spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
|
352
353
|
- spec/dummy/db/schema.rb
|
353
354
|
- spec/dummy/db/test.sqlite3
|
355
|
+
- spec/dummy/log/development.log
|
354
356
|
- spec/dummy/log/test.log
|
355
357
|
- spec/dummy/public/404.html
|
356
358
|
- spec/dummy/public/422.html
|
@@ -510,11 +512,13 @@ test_files:
|
|
510
512
|
- spec/dummy/config/routes.rb
|
511
513
|
- spec/dummy/config.ru
|
512
514
|
- spec/dummy/db/awesome_translations.sqlite3
|
515
|
+
- spec/dummy/db/development.sqlite3
|
513
516
|
- spec/dummy/db/migrate/20141018081559_create_users.rb
|
514
517
|
- spec/dummy/db/migrate/20141018081640_create_roles.rb
|
515
518
|
- spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
|
516
519
|
- spec/dummy/db/schema.rb
|
517
520
|
- spec/dummy/db/test.sqlite3
|
521
|
+
- spec/dummy/log/development.log
|
518
522
|
- spec/dummy/log/test.log
|
519
523
|
- spec/dummy/public/404.html
|
520
524
|
- spec/dummy/public/422.html
|