rails-i18nterface 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -11
- data/Rakefile +13 -2
- data/app/controllers/rails_i18nterface/translate_controller.rb +10 -24
- data/app/helpers/rails_i18nterface/translate_helper.rb +12 -19
- data/app/views/rails_i18nterface/translate/index.html.erb +91 -105
- data/config/initializers/missing_translation.rb +4 -2
- data/lib/rails-i18nterface.rb +1 -0
- data/lib/rails-i18nterface/cache.rb +3 -3
- data/lib/rails-i18nterface/keys.rb +21 -11
- data/lib/rails-i18nterface/sourcefiles.rb +38 -19
- data/lib/rails-i18nterface/translation.rb +34 -0
- data/lib/rails-i18nterface/utils.rb +13 -9
- data/lib/rails-i18nterface/version.rb +1 -1
- data/lib/rails-i18nterface/yamlfile.rb +1 -1
- data/spec/controllers/translate_controller_spec.rb +72 -51
- data/spec/internal/app/controllers/application_controller.rb +2 -1
- data/spec/internal/app/models/article.rb +1 -0
- data/spec/internal/db/schema.rb +2 -0
- data/spec/internal/log/test.log +0 -2370
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/0PMwId9157j93ZuEBNCPa71HO-BWiCNHuiZtCkqHovk.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/172YbT7Y9QCTtQpYWCn3GiUa1XYF30IZjymEsgPF2r4.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1RE9Nc-99pz5dq3J_WTniU9ihuoYrOprEnGvyXAa5cY.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1vT4QnCK-tMzI13mEL_FMuTrb5BgAdA3XBhVxNv4-r8.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/3V-PndZUHey8S35jzCvUM5n8ObasIDurRCq_RlH0jKo.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/3l6G7l7GutWzjmS7bo548k2NQXCbu3FuG0RCqtNuUL8.cache +2 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/4vXT_Tqow4flv0JjTjeIZO4MHOerMmqrPSyHiyf3SYE.cache +2 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/7Ki489aXvXh1c80Q1MzMtZpbfnotMDd6A3yHY-HEecw.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/9kyHNOVXEDTe7kg34AKp3C9rb7GbxRKGQYV0smgM01I.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/DgOE4dVOvx7Kg6yuTxyUSupElQF47xWnXtMcz2TXBaw.cache +2 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/FZqMgA_zpqV7sBthUsaF-loYETVrVCEtlxczLF730GY.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/M-S52Jney4p15fjNRm25zSHatM5QqthKsrEU_Q7GTVA.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/PaP9vMCDQ63NoJWLaM8fSu0YeRy-eLKbArpgNOm8Z_4.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/UHhQ3Te4YSyiy1iqqTRt4nt2dyXqSXxkwAkjepufrsY.cache +2 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/VOKFuKrh87uBuA6qI4LzN8vVjP5mXjzL0j-iaq5sNNg.cache +2 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/Vjw0tPMcLKXFR62wwfemKkM4UCNkbPeERe-8KqFrez0.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/YGEo5ly-YOZRgLRVZp1HmXC1FVjMcAWo8Pc006mVUEc.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/_RHrJ0guSCf-x6bLKcowvNq4a-4N5p1m_5Abxsef-Zw.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/bZt89CxopsDo8--1TGPUMLxKV-mDvRqFMTNNZOfnN08.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/frFXg-urENHAZ5rXQ1GpQfRRjJu9Fp_-RvTvn9UugJc.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/gaOEShTR6QyHBz9Pv5Ylz1vVWcNP7Dz2DRcuDIl52cs.cache +3 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/mr2V_uFvIXsHQ7VrC70TymoM9CO0RMKHzQgBkn3deHw.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/nbwa8EHOBiuE0pKOTtnWN0gAQOC27loObjVaVMX_wZE.cache +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/oQxOm6wUSyQ0jKnI8eKFRJLgEQ-dFvxofYtnbn-haqA.cache +1 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/v6huIOApjM-My2aA3RhSsO6U2my-O0Ht7A0lo0YKqPI.cache +2 -0
- data/spec/internal/tmp/translation_strings +2 -1
- data/spec/lib/cache_spec.rb +32 -29
- data/spec/lib/keys_spec.rb +77 -66
- data/spec/lib/sourcefiles_spec.rb +53 -50
- data/spec/lib/utils_spec.rb +55 -29
- data/spec/lib/yamlfile_spec.rb +2 -2
- data/spec/requests/search_spec.rb +4 -4
- data/spec/selenium/nav_spec.rb +23 -0
- data/spec/selenium/sauce.rb +68 -0
- data/spec/selenium/translation_spec.rb +19 -0
- data/spec/spec_helper.rb +19 -18
- metadata +225 -74
- data/app/helpers/rails_i18nterface/application_helper.rb +0 -6
- data/config/initializers/rails_i18nterface/missing_translation.rb +0 -13
- data/spec/internal/app/views/categories/category.erb +0 -1
@@ -1,13 +0,0 @@
|
|
1
|
-
module RailsI18nterface
|
2
|
-
module UseKeyForMissing
|
3
|
-
def call(exception, locale, key, options)
|
4
|
-
if exception.is_a?(I18n::MissingTranslation)
|
5
|
-
key.split(/\./)[-1]
|
6
|
-
else
|
7
|
-
super
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
I18n.exception_handler.extend RailsI18nterface::UseKeyForMissing
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= t(:'category_erb.key1') %>
|