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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -11
  3. data/Rakefile +13 -2
  4. data/app/controllers/rails_i18nterface/translate_controller.rb +10 -24
  5. data/app/helpers/rails_i18nterface/translate_helper.rb +12 -19
  6. data/app/views/rails_i18nterface/translate/index.html.erb +91 -105
  7. data/config/initializers/missing_translation.rb +4 -2
  8. data/lib/rails-i18nterface.rb +1 -0
  9. data/lib/rails-i18nterface/cache.rb +3 -3
  10. data/lib/rails-i18nterface/keys.rb +21 -11
  11. data/lib/rails-i18nterface/sourcefiles.rb +38 -19
  12. data/lib/rails-i18nterface/translation.rb +34 -0
  13. data/lib/rails-i18nterface/utils.rb +13 -9
  14. data/lib/rails-i18nterface/version.rb +1 -1
  15. data/lib/rails-i18nterface/yamlfile.rb +1 -1
  16. data/spec/controllers/translate_controller_spec.rb +72 -51
  17. data/spec/internal/app/controllers/application_controller.rb +2 -1
  18. data/spec/internal/app/models/article.rb +1 -0
  19. data/spec/internal/db/schema.rb +2 -0
  20. data/spec/internal/log/test.log +0 -2370
  21. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/0PMwId9157j93ZuEBNCPa71HO-BWiCNHuiZtCkqHovk.cache +1 -0
  22. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/172YbT7Y9QCTtQpYWCn3GiUa1XYF30IZjymEsgPF2r4.cache +1 -0
  23. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1RE9Nc-99pz5dq3J_WTniU9ihuoYrOprEnGvyXAa5cY.cache +1 -0
  24. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1vT4QnCK-tMzI13mEL_FMuTrb5BgAdA3XBhVxNv4-r8.cache +1 -0
  25. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/3V-PndZUHey8S35jzCvUM5n8ObasIDurRCq_RlH0jKo.cache +0 -0
  26. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/3l6G7l7GutWzjmS7bo548k2NQXCbu3FuG0RCqtNuUL8.cache +2 -0
  27. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/4vXT_Tqow4flv0JjTjeIZO4MHOerMmqrPSyHiyf3SYE.cache +2 -0
  28. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/7Ki489aXvXh1c80Q1MzMtZpbfnotMDd6A3yHY-HEecw.cache +1 -0
  29. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/9kyHNOVXEDTe7kg34AKp3C9rb7GbxRKGQYV0smgM01I.cache +1 -0
  30. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/DgOE4dVOvx7Kg6yuTxyUSupElQF47xWnXtMcz2TXBaw.cache +2 -0
  31. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/FZqMgA_zpqV7sBthUsaF-loYETVrVCEtlxczLF730GY.cache +1 -0
  32. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/M-S52Jney4p15fjNRm25zSHatM5QqthKsrEU_Q7GTVA.cache +1 -0
  33. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/PaP9vMCDQ63NoJWLaM8fSu0YeRy-eLKbArpgNOm8Z_4.cache +1 -0
  34. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/UHhQ3Te4YSyiy1iqqTRt4nt2dyXqSXxkwAkjepufrsY.cache +2 -0
  35. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/VOKFuKrh87uBuA6qI4LzN8vVjP5mXjzL0j-iaq5sNNg.cache +2 -0
  36. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/Vjw0tPMcLKXFR62wwfemKkM4UCNkbPeERe-8KqFrez0.cache +0 -0
  37. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/YGEo5ly-YOZRgLRVZp1HmXC1FVjMcAWo8Pc006mVUEc.cache +0 -0
  38. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/_RHrJ0guSCf-x6bLKcowvNq4a-4N5p1m_5Abxsef-Zw.cache +0 -0
  39. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/bZt89CxopsDo8--1TGPUMLxKV-mDvRqFMTNNZOfnN08.cache +0 -0
  40. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/frFXg-urENHAZ5rXQ1GpQfRRjJu9Fp_-RvTvn9UugJc.cache +0 -0
  41. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/gaOEShTR6QyHBz9Pv5Ylz1vVWcNP7Dz2DRcuDIl52cs.cache +3 -0
  42. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/mr2V_uFvIXsHQ7VrC70TymoM9CO0RMKHzQgBkn3deHw.cache +1 -0
  43. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/nbwa8EHOBiuE0pKOTtnWN0gAQOC27loObjVaVMX_wZE.cache +0 -0
  44. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/oQxOm6wUSyQ0jKnI8eKFRJLgEQ-dFvxofYtnbn-haqA.cache +1 -0
  45. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/v6huIOApjM-My2aA3RhSsO6U2my-O0Ht7A0lo0YKqPI.cache +2 -0
  46. data/spec/internal/tmp/translation_strings +2 -1
  47. data/spec/lib/cache_spec.rb +32 -29
  48. data/spec/lib/keys_spec.rb +77 -66
  49. data/spec/lib/sourcefiles_spec.rb +53 -50
  50. data/spec/lib/utils_spec.rb +55 -29
  51. data/spec/lib/yamlfile_spec.rb +2 -2
  52. data/spec/requests/search_spec.rb +4 -4
  53. data/spec/selenium/nav_spec.rb +23 -0
  54. data/spec/selenium/sauce.rb +68 -0
  55. data/spec/selenium/translation_spec.rb +19 -0
  56. data/spec/spec_helper.rb +19 -18
  57. metadata +225 -74
  58. data/app/helpers/rails_i18nterface/application_helper.rb +0 -6
  59. data/config/initializers/rails_i18nterface/missing_translation.rb +0 -13
  60. data/spec/internal/app/views/categories/category.erb +0 -1
@@ -1,6 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module RailsI18nterface
4
- module ApplicationHelper
5
- end
6
- end
@@ -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') %>