i18n-js 2.1.2 → 3.0.0.rc1

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.
Files changed (55) hide show
  1. data/Gemfile.lock +23 -31
  2. data/README.md +318 -0
  3. data/Rakefile +6 -6
  4. data/app/assets/javascripts/i18n/translations.js.erb +3 -0
  5. data/i18n-js.gemspec +5 -6
  6. data/lib/i18n-js.rb +1 -177
  7. data/lib/i18n.js +698 -0
  8. data/lib/i18n/js.rb +157 -0
  9. data/lib/i18n/js/engine.rb +22 -0
  10. data/lib/{i18n-js → i18n/js}/middleware.rb +7 -7
  11. data/lib/i18n/js/version.rb +10 -0
  12. data/spec/{resources → fixtures}/custom_path.yml +1 -1
  13. data/spec/{resources → fixtures}/default.yml +1 -1
  14. data/spec/fixtures/js_file_per_locale.yml +3 -0
  15. data/spec/{resources → fixtures}/locales.yml +1 -1
  16. data/spec/fixtures/multiple_conditions.yml +5 -0
  17. data/spec/{resources → fixtures}/multiple_files.yml +3 -3
  18. data/spec/{resources → fixtures}/no_config.yml +0 -0
  19. data/spec/{resources → fixtures}/no_scope.yml +1 -1
  20. data/spec/{resources → fixtures}/simple_scope.yml +1 -1
  21. data/spec/i18n_js_spec.rb +122 -0
  22. data/spec/js/currency.spec.js +60 -0
  23. data/spec/js/current_locale.spec.js +19 -0
  24. data/spec/js/dates.spec.js +218 -0
  25. data/spec/js/defaults.spec.js +23 -0
  26. data/spec/js/interpolation.spec.js +28 -0
  27. data/spec/js/jasmine/MIT.LICENSE +20 -0
  28. data/spec/js/jasmine/jasmine-html.js +190 -0
  29. data/spec/js/jasmine/jasmine.css +166 -0
  30. data/spec/js/jasmine/jasmine.js +2476 -0
  31. data/spec/js/jasmine/jasmine_favicon.png +0 -0
  32. data/spec/js/localization.spec.js +41 -0
  33. data/spec/js/numbers.spec.js +124 -0
  34. data/spec/js/placeholder.spec.js +24 -0
  35. data/spec/js/pluralization.spec.js +105 -0
  36. data/spec/js/prepare_options.spec.js +41 -0
  37. data/spec/js/specs.html +46 -0
  38. data/spec/js/translate.spec.js +115 -0
  39. data/spec/js/translations.js +115 -0
  40. data/spec/spec_helper.rb +36 -14
  41. metadata +115 -69
  42. data/.gitignore +0 -5
  43. data/.rspec +0 -1
  44. data/README.rdoc +0 -305
  45. data/config/i18n-js.yml +0 -22
  46. data/lib/i18n-js/engine.rb +0 -62
  47. data/lib/i18n-js/railtie.rb +0 -13
  48. data/lib/i18n-js/rake.rb +0 -16
  49. data/lib/i18n-js/version.rb +0 -10
  50. data/spec/i18n_spec.js +0 -768
  51. data/spec/i18n_spec.rb +0 -205
  52. data/spec/resources/js_file_per_locale.yml +0 -3
  53. data/spec/resources/multiple_conditions.yml +0 -6
  54. data/vendor/assets/javascripts/i18n.js +0 -450
  55. data/vendor/assets/javascripts/i18n/translations.js.erb +0 -7
@@ -1,7 +0,0 @@
1
- <% SimplesIdeias::I18n.assert_usable_configuration! %>
2
- var I18n = I18n || {};
3
- I18n.translations = <%=
4
- SimplesIdeias::I18n.translation_segments.each_with_object({}) do |(name, segment),translations|
5
- translations.merge!(segment)
6
- end.to_json
7
- %>;