i18n-js 3.8.3 → 4.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +4 -0
  3. data/.github/FUNDING.yml +1 -1
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
  7. data/.github/dependabot.yml +15 -0
  8. data/.github/workflows/ruby-tests.yml +61 -0
  9. data/.gitignore +11 -7
  10. data/.rubocop.yml +12 -0
  11. data/CHANGELOG.md +12 -535
  12. data/CODE_OF_CONDUCT.md +74 -0
  13. data/CONTRIBUTING.md +79 -0
  14. data/Gemfile +3 -0
  15. data/LICENSE.md +20 -0
  16. data/README.md +86 -1030
  17. data/Rakefile +10 -20
  18. data/exe/i18n +5 -0
  19. data/i18n-js.gemspec +47 -29
  20. data/lib/guard/i18n-js.rb +78 -0
  21. data/lib/guard/i18n-js/templates/Guardfile +10 -0
  22. data/lib/guard/i18n-js/version.rb +13 -0
  23. data/lib/i18n-js.rb +66 -1
  24. data/lib/i18n-js/cli.rb +47 -0
  25. data/lib/i18n-js/cli/command.rb +43 -0
  26. data/lib/i18n-js/cli/export_command.rb +108 -0
  27. data/lib/i18n-js/cli/init_command.rb +50 -0
  28. data/lib/i18n-js/cli/ui.rb +30 -0
  29. data/lib/i18n-js/cli/version_command.rb +18 -0
  30. data/lib/i18n-js/listen.rb +80 -0
  31. data/lib/i18n-js/schema.rb +92 -0
  32. data/lib/i18n-js/version.rb +5 -0
  33. metadata +122 -194
  34. data/.editorconfig +0 -24
  35. data/.github/workflows/tests.yaml +0 -100
  36. data/.npmignore +0 -27
  37. data/Appraisals +0 -44
  38. data/app/assets/javascripts/i18n.js +0 -1095
  39. data/app/assets/javascripts/i18n/filtered.js.erb +0 -23
  40. data/app/assets/javascripts/i18n/shims.js +0 -240
  41. data/app/assets/javascripts/i18n/translations.js +0 -3
  42. data/gemfiles/i18n_0_6.gemfile +0 -7
  43. data/gemfiles/i18n_0_7.gemfile +0 -7
  44. data/gemfiles/i18n_0_8.gemfile +0 -7
  45. data/gemfiles/i18n_0_9.gemfile +0 -7
  46. data/gemfiles/i18n_1_0.gemfile +0 -7
  47. data/gemfiles/i18n_1_1.gemfile +0 -7
  48. data/gemfiles/i18n_1_2.gemfile +0 -7
  49. data/gemfiles/i18n_1_3.gemfile +0 -7
  50. data/gemfiles/i18n_1_4.gemfile +0 -7
  51. data/gemfiles/i18n_1_5.gemfile +0 -7
  52. data/gemfiles/i18n_1_6.gemfile +0 -7
  53. data/gemfiles/i18n_1_7.gemfile +0 -7
  54. data/gemfiles/i18n_1_8.gemfile +0 -7
  55. data/i18njs.png +0 -0
  56. data/lib/i18n/js.rb +0 -264
  57. data/lib/i18n/js/dependencies.rb +0 -63
  58. data/lib/i18n/js/engine.rb +0 -87
  59. data/lib/i18n/js/fallback_locales.rb +0 -70
  60. data/lib/i18n/js/formatters/base.rb +0 -25
  61. data/lib/i18n/js/formatters/js.rb +0 -39
  62. data/lib/i18n/js/formatters/json.rb +0 -13
  63. data/lib/i18n/js/middleware.rb +0 -82
  64. data/lib/i18n/js/private/config_store.rb +0 -31
  65. data/lib/i18n/js/private/hash_with_symbol_keys.rb +0 -36
  66. data/lib/i18n/js/segment.rb +0 -80
  67. data/lib/i18n/js/utils.rb +0 -78
  68. data/lib/i18n/js/version.rb +0 -7
  69. data/lib/rails/generators/i18n/js/config/config_generator.rb +0 -19
  70. data/lib/rails/generators/i18n/js/config/templates/i18n-js.yml +0 -27
  71. data/lib/tasks/export.rake +0 -8
  72. data/package.json +0 -25
  73. data/spec/fixtures/custom_path.yml +0 -5
  74. data/spec/fixtures/default.yml +0 -5
  75. data/spec/fixtures/erb.yml +0 -5
  76. data/spec/fixtures/except_condition.yml +0 -7
  77. data/spec/fixtures/js_export_dir_custom.yml +0 -7
  78. data/spec/fixtures/js_export_dir_none.yml +0 -6
  79. data/spec/fixtures/js_extend_parent.yml +0 -6
  80. data/spec/fixtures/js_extend_segment.yml +0 -6
  81. data/spec/fixtures/js_file_per_locale.yml +0 -7
  82. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_default_locale_symbol.yml +0 -4
  83. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_hash.yml +0 -6
  84. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale.yml +0 -4
  85. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale_without_fallback_translations.yml +0 -4
  86. data/spec/fixtures/js_file_per_locale_with_fallbacks_enabled.yml +0 -4
  87. data/spec/fixtures/js_file_per_locale_without_fallbacks.yml +0 -4
  88. data/spec/fixtures/js_file_with_namespace_prefix_and_pretty_print.yml +0 -9
  89. data/spec/fixtures/js_sort_translation_keys_false.yml +0 -6
  90. data/spec/fixtures/js_sort_translation_keys_true.yml +0 -6
  91. data/spec/fixtures/json_only.yml +0 -18
  92. data/spec/fixtures/locales.yml +0 -133
  93. data/spec/fixtures/merge_plurals.yml +0 -6
  94. data/spec/fixtures/merge_plurals_with_no_overrides.yml +0 -4
  95. data/spec/fixtures/merge_plurals_with_partial_overrides.yml +0 -4
  96. data/spec/fixtures/millions.yml +0 -4
  97. data/spec/fixtures/multiple_conditions.yml +0 -7
  98. data/spec/fixtures/multiple_conditions_per_locale.yml +0 -7
  99. data/spec/fixtures/multiple_files.yml +0 -7
  100. data/spec/fixtures/no_config.yml +0 -2
  101. data/spec/fixtures/no_scope.yml +0 -4
  102. data/spec/fixtures/simple_scope.yml +0 -5
  103. data/spec/js/currency.spec.js +0 -62
  104. data/spec/js/current_locale.spec.js +0 -19
  105. data/spec/js/dates.spec.js +0 -276
  106. data/spec/js/defaults.spec.js +0 -31
  107. data/spec/js/extend.spec.js +0 -110
  108. data/spec/js/interpolation.spec.js +0 -124
  109. data/spec/js/jasmine/MIT.LICENSE +0 -20
  110. data/spec/js/jasmine/jasmine-html.js +0 -190
  111. data/spec/js/jasmine/jasmine.css +0 -166
  112. data/spec/js/jasmine/jasmine.js +0 -2476
  113. data/spec/js/jasmine/jasmine_favicon.png +0 -0
  114. data/spec/js/json_parsable.spec.js +0 -14
  115. data/spec/js/locales.spec.js +0 -31
  116. data/spec/js/localization.spec.js +0 -78
  117. data/spec/js/numbers.spec.js +0 -174
  118. data/spec/js/placeholder.spec.js +0 -24
  119. data/spec/js/pluralization.spec.js +0 -219
  120. data/spec/js/prepare_options.spec.js +0 -41
  121. data/spec/js/require.js +0 -2083
  122. data/spec/js/specs.html +0 -49
  123. data/spec/js/specs_requirejs.html +0 -72
  124. data/spec/js/translate.spec.js +0 -304
  125. data/spec/js/translations.js +0 -188
  126. data/spec/js/utility_functions.spec.js +0 -20
  127. data/spec/ruby/i18n/js/fallback_locales_spec.rb +0 -84
  128. data/spec/ruby/i18n/js/segment_spec.rb +0 -261
  129. data/spec/ruby/i18n/js/utils_spec.rb +0 -106
  130. data/spec/ruby/i18n/js_spec.rb +0 -748
  131. data/spec/spec_helper.rb +0 -80
  132. data/yarn.lock +0 -131
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module I18nJS
4
+ class CLI
5
+ class InitCommand < Command
6
+ command_name "init"
7
+ description "Initialize a project"
8
+
9
+ parse do |opts|
10
+ opts.banner = "Usage: i18n #{name} [options]"
11
+
12
+ opts.on(
13
+ "-cCONFIG_FILE",
14
+ "--config=CONFIG_FILE",
15
+ "The configuration file that will be generated"
16
+ ) do |config_file|
17
+ options[:config_file] = config_file
18
+ end
19
+
20
+ opts.on("-h", "--help", "Prints this help") do
21
+ ui.exit_with opts.to_s
22
+ end
23
+ end
24
+
25
+ command do
26
+ file_path = File.expand_path(options[:config_file])
27
+
28
+ if File.file?(file_path)
29
+ ui.fail_with("ERROR: #{file_path} already exists!")
30
+ end
31
+
32
+ FileUtils.mkdir_p(File.dirname(file_path))
33
+
34
+ File.open(file_path, "w") do |file|
35
+ file << <<~YAML
36
+ ---
37
+ translations:
38
+ - file: app/javascript/locales.json
39
+ patterns:
40
+ - "*"
41
+ - "!*.activerecord"
42
+ - "!*.errors"
43
+ - "!*.number.nth"
44
+
45
+ YAML
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module I18nJS
4
+ class CLI
5
+ class UI
6
+ def initialize(stdout:, stderr:)
7
+ @stdout = stdout
8
+ @stderr = stderr
9
+ end
10
+
11
+ def stdout_print(*message)
12
+ @stdout << "#{message.join(' ')}\n"
13
+ end
14
+
15
+ def stderr_print(*message)
16
+ @stderr << "#{message.join(' ')}\n"
17
+ end
18
+
19
+ def fail_with(*message)
20
+ stderr_print(message)
21
+ exit(1)
22
+ end
23
+
24
+ def exit_with(*message)
25
+ stdout_print(message)
26
+ exit(0)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module I18nJS
4
+ class CLI
5
+ class VersionCommand < Command
6
+ command_name "version"
7
+ description "Show package version"
8
+
9
+ parse do |opts|
10
+ opts.banner = "Usage: i18n #{name}"
11
+
12
+ opts.on_tail do
13
+ ui.exit_with("v#{I18nJS::VERSION}")
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ gem "listen"
4
+ require "listen"
5
+ require "i18n-js"
6
+
7
+ module I18nJS
8
+ class << self
9
+ attr_accessor :started
10
+ end
11
+
12
+ def self.listen(
13
+ config_file: Rails.root.join("config/i18n.yml"),
14
+ locales_dir: Rails.root.join("config/locales")
15
+ )
16
+ return unless Rails.env.development?
17
+ return if started
18
+
19
+ self.started = true
20
+
21
+ relative_paths =
22
+ [config_file, locales_dir].map {|path| relative_path(path) }
23
+
24
+ debug("Watching #{relative_paths.inspect}")
25
+
26
+ listener(config_file, locales_dir.to_s).start
27
+ I18nJS.call(config_file: config_file)
28
+ end
29
+
30
+ def self.relative_path(path)
31
+ Pathname.new(path).relative_path_from(Rails.root).to_s
32
+ end
33
+
34
+ def self.relative_path_list(paths)
35
+ paths.map {|path| relative_path(path) }
36
+ end
37
+
38
+ def self.debug(message)
39
+ logger.tagged("i18n-js") { logger.debug(message) }
40
+ end
41
+
42
+ def self.logger
43
+ @logger ||= ActiveSupport::TaggedLogging.new(Rails.logger)
44
+ end
45
+
46
+ def self.listener(config_file, locales_dir) # rubocop:disable Metrics/MethodLength
47
+ paths = [File.dirname(config_file), locales_dir]
48
+
49
+ Listen.to(*paths) do |changed, added, removed|
50
+ changes = compute_changes(
51
+ [config_file, locales_dir],
52
+ changed,
53
+ added,
54
+ removed
55
+ )
56
+
57
+ next unless changes.any?
58
+
59
+ debug(changes.map {|key, value| "#{key}=#{value.inspect}" }.join(", "))
60
+
61
+ I18nJS.call(config_file: config_file)
62
+ end
63
+ end
64
+
65
+ def self.compute_changes(paths, changed, added, removed)
66
+ paths = paths.map {|path| relative_path(path) }
67
+
68
+ {
69
+ changed: included_on_watched_paths(paths, changed),
70
+ added: included_on_watched_paths(paths, added),
71
+ removed: included_on_watched_paths(paths, removed)
72
+ }.select {|_k, v| v.any? }
73
+ end
74
+
75
+ def self.included_on_watched_paths(paths, changes)
76
+ changes.map {|change| relative_path(change) }.select do |change|
77
+ paths.any? {|path| change.start_with?(path) }
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module I18nJS
4
+ class Schema
5
+ InvalidError = Class.new(StandardError)
6
+
7
+ ROOT_KEYS = %i[translations].freeze
8
+ REQUIRED_ROOT_KEYS = %i[translations].freeze
9
+ REQUIRED_TRANSLATION_KEYS = %i[file patterns].freeze
10
+ TRANSLATION_KEYS = %i[file patterns].freeze
11
+
12
+ def self.validate!(target)
13
+ new(target).validate!
14
+ end
15
+
16
+ attr_reader :target
17
+
18
+ def initialize(target)
19
+ @target = target
20
+ end
21
+
22
+ def validate!
23
+ expect_type(:root, target, Hash, target)
24
+
25
+ expect_required_keys(REQUIRED_ROOT_KEYS, target)
26
+ reject_extraneous_keys(ROOT_KEYS, target)
27
+ validate_translations
28
+ end
29
+
30
+ def validate_translations
31
+ translations = target[:translations]
32
+
33
+ expect_type(:translations, translations, Array, target)
34
+ expect_array_with_items(:translations, translations)
35
+
36
+ translations.each do |translation|
37
+ validate_translation(translation)
38
+ end
39
+ end
40
+
41
+ def validate_translation(translation)
42
+ expect_required_keys(REQUIRED_TRANSLATION_KEYS, translation)
43
+ reject_extraneous_keys(TRANSLATION_KEYS, translation)
44
+ expect_type(:file, translation[:file], String, translation)
45
+ expect_type(:patterns, translation[:patterns], Array, translation)
46
+ expect_array_with_items(:patterns, translation[:patterns], translation)
47
+ end
48
+
49
+ def reject(error_message, node = nil)
50
+ node_json = "\n#{JSON.pretty_generate(node)}" if node
51
+ raise InvalidError, "#{error_message}#{node_json}"
52
+ end
53
+
54
+ def expect_type(attribute, value, expected_type, payload)
55
+ return if value.is_a?(expected_type)
56
+
57
+ actual_type = value.class
58
+
59
+ message = [
60
+ "Expected #{attribute.inspect} to be #{expected_type};",
61
+ "got #{actual_type} instead"
62
+ ].join(" ")
63
+
64
+ reject message, payload
65
+ end
66
+
67
+ def expect_array_with_items(attribute, value, payload = value)
68
+ return unless value.empty?
69
+
70
+ reject "Expected #{attribute.inspect} to have at least one item", payload
71
+ end
72
+
73
+ def expect_required_keys(required_keys, value)
74
+ keys = value.keys.map(&:to_sym)
75
+
76
+ required_keys.each do |key|
77
+ next if keys.include?(key)
78
+
79
+ reject "Expected #{key.inspect} to be defined", value
80
+ end
81
+ end
82
+
83
+ def reject_extraneous_keys(allowed_keys, value)
84
+ keys = value.keys.map(&:to_sym)
85
+ extraneous = keys - allowed_keys
86
+
87
+ return if extraneous.empty?
88
+
89
+ reject "Unexpected keys: #{extraneous.join(', ')}", value
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module I18nJS
4
+ VERSION = "4.0.0.alpha1"
5
+ end
metadata CHANGED
@@ -1,217 +1,204 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.3
4
+ version: 4.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-21 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: glob
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: i18n
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: 0.6.6
33
+ version: '0'
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: 0.6.6
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
- name: appraisal
56
+ name: minitest
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - "~>"
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: '2.3'
61
+ version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - "~>"
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
- version: '2.3'
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
- name: rspec
70
+ name: minitest-utils
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
- - - "~>"
73
+ - - ">="
46
74
  - !ruby/object:Gem::Version
47
- version: '3.0'
75
+ version: '0'
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - "~>"
80
+ - - ">="
53
81
  - !ruby/object:Gem::Version
54
- version: '3.0'
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-meta
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: rake
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - "~>"
101
+ - - ">="
60
102
  - !ruby/object:Gem::Version
61
- version: '12.0'
103
+ version: '0'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - "~>"
108
+ - - ">="
67
109
  - !ruby/object:Gem::Version
68
- version: '12.0'
110
+ version: '0'
69
111
  - !ruby/object:Gem::Dependency
70
- name: gem-release
112
+ name: rubocop
71
113
  requirement: !ruby/object:Gem::Requirement
72
114
  requirements:
73
115
  - - ">="
74
116
  - !ruby/object:Gem::Version
75
- version: '0.7'
117
+ version: '0'
76
118
  type: :development
77
119
  prerelease: false
78
120
  version_requirements: !ruby/object:Gem::Requirement
79
121
  requirements:
80
122
  - - ">="
81
123
  - !ruby/object:Gem::Version
82
- version: '0.7'
124
+ version: '0'
83
125
  - !ruby/object:Gem::Dependency
84
- name: coveralls
126
+ name: rubocop-fnando
85
127
  requirement: !ruby/object:Gem::Requirement
86
128
  requirements:
87
129
  - - ">="
88
130
  - !ruby/object:Gem::Version
89
- version: '0.7'
131
+ version: '0'
90
132
  type: :development
91
133
  prerelease: false
92
134
  version_requirements: !ruby/object:Gem::Requirement
93
135
  requirements:
94
136
  - - ">="
95
137
  - !ruby/object:Gem::Version
96
- version: '0.7'
97
- description: It's a small library to provide the Rails I18n translations on the Javascript.
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Export i18n translations and use them on JavaScript.
98
154
  email:
99
- - fnando.vieira@gmail.com
100
- executables: []
155
+ - me@fnando.com
156
+ executables:
157
+ - i18n
101
158
  extensions: []
102
159
  extra_rdoc_files: []
103
160
  files:
104
- - ".editorconfig"
161
+ - ".github/CODEOWNERS"
105
162
  - ".github/FUNDING.yml"
106
- - ".github/workflows/tests.yaml"
163
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
164
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
165
+ - ".github/PULL_REQUEST_TEMPLATE.md"
166
+ - ".github/dependabot.yml"
167
+ - ".github/workflows/ruby-tests.yml"
107
168
  - ".gitignore"
108
- - ".npmignore"
109
- - Appraisals
169
+ - ".rubocop.yml"
110
170
  - CHANGELOG.md
171
+ - CODE_OF_CONDUCT.md
172
+ - CONTRIBUTING.md
111
173
  - Gemfile
174
+ - LICENSE.md
112
175
  - README.md
113
176
  - Rakefile
114
- - app/assets/javascripts/i18n.js
115
- - app/assets/javascripts/i18n/filtered.js.erb
116
- - app/assets/javascripts/i18n/shims.js
117
- - app/assets/javascripts/i18n/translations.js
118
- - gemfiles/i18n_0_6.gemfile
119
- - gemfiles/i18n_0_7.gemfile
120
- - gemfiles/i18n_0_8.gemfile
121
- - gemfiles/i18n_0_9.gemfile
122
- - gemfiles/i18n_1_0.gemfile
123
- - gemfiles/i18n_1_1.gemfile
124
- - gemfiles/i18n_1_2.gemfile
125
- - gemfiles/i18n_1_3.gemfile
126
- - gemfiles/i18n_1_4.gemfile
127
- - gemfiles/i18n_1_5.gemfile
128
- - gemfiles/i18n_1_6.gemfile
129
- - gemfiles/i18n_1_7.gemfile
130
- - gemfiles/i18n_1_8.gemfile
177
+ - exe/i18n
131
178
  - i18n-js.gemspec
132
- - i18njs.png
179
+ - lib/guard/i18n-js.rb
180
+ - lib/guard/i18n-js/templates/Guardfile
181
+ - lib/guard/i18n-js/version.rb
133
182
  - lib/i18n-js.rb
134
- - lib/i18n/js.rb
135
- - lib/i18n/js/dependencies.rb
136
- - lib/i18n/js/engine.rb
137
- - lib/i18n/js/fallback_locales.rb
138
- - lib/i18n/js/formatters/base.rb
139
- - lib/i18n/js/formatters/js.rb
140
- - lib/i18n/js/formatters/json.rb
141
- - lib/i18n/js/middleware.rb
142
- - lib/i18n/js/private/config_store.rb
143
- - lib/i18n/js/private/hash_with_symbol_keys.rb
144
- - lib/i18n/js/segment.rb
145
- - lib/i18n/js/utils.rb
146
- - lib/i18n/js/version.rb
147
- - lib/rails/generators/i18n/js/config/config_generator.rb
148
- - lib/rails/generators/i18n/js/config/templates/i18n-js.yml
149
- - lib/tasks/export.rake
150
- - package.json
151
- - spec/fixtures/custom_path.yml
152
- - spec/fixtures/default.yml
153
- - spec/fixtures/erb.yml
154
- - spec/fixtures/except_condition.yml
155
- - spec/fixtures/js_export_dir_custom.yml
156
- - spec/fixtures/js_export_dir_none.yml
157
- - spec/fixtures/js_extend_parent.yml
158
- - spec/fixtures/js_extend_segment.yml
159
- - spec/fixtures/js_file_per_locale.yml
160
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_default_locale_symbol.yml
161
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_hash.yml
162
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_locale.yml
163
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_locale_without_fallback_translations.yml
164
- - spec/fixtures/js_file_per_locale_with_fallbacks_enabled.yml
165
- - spec/fixtures/js_file_per_locale_without_fallbacks.yml
166
- - spec/fixtures/js_file_with_namespace_prefix_and_pretty_print.yml
167
- - spec/fixtures/js_sort_translation_keys_false.yml
168
- - spec/fixtures/js_sort_translation_keys_true.yml
169
- - spec/fixtures/json_only.yml
170
- - spec/fixtures/locales.yml
171
- - spec/fixtures/merge_plurals.yml
172
- - spec/fixtures/merge_plurals_with_no_overrides.yml
173
- - spec/fixtures/merge_plurals_with_partial_overrides.yml
174
- - spec/fixtures/millions.yml
175
- - spec/fixtures/multiple_conditions.yml
176
- - spec/fixtures/multiple_conditions_per_locale.yml
177
- - spec/fixtures/multiple_files.yml
178
- - spec/fixtures/no_config.yml
179
- - spec/fixtures/no_scope.yml
180
- - spec/fixtures/simple_scope.yml
181
- - spec/js/currency.spec.js
182
- - spec/js/current_locale.spec.js
183
- - spec/js/dates.spec.js
184
- - spec/js/defaults.spec.js
185
- - spec/js/extend.spec.js
186
- - spec/js/interpolation.spec.js
187
- - spec/js/jasmine/MIT.LICENSE
188
- - spec/js/jasmine/jasmine-html.js
189
- - spec/js/jasmine/jasmine.css
190
- - spec/js/jasmine/jasmine.js
191
- - spec/js/jasmine/jasmine_favicon.png
192
- - spec/js/json_parsable.spec.js
193
- - spec/js/locales.spec.js
194
- - spec/js/localization.spec.js
195
- - spec/js/numbers.spec.js
196
- - spec/js/placeholder.spec.js
197
- - spec/js/pluralization.spec.js
198
- - spec/js/prepare_options.spec.js
199
- - spec/js/require.js
200
- - spec/js/specs.html
201
- - spec/js/specs_requirejs.html
202
- - spec/js/translate.spec.js
203
- - spec/js/translations.js
204
- - spec/js/utility_functions.spec.js
205
- - spec/ruby/i18n/js/fallback_locales_spec.rb
206
- - spec/ruby/i18n/js/segment_spec.rb
207
- - spec/ruby/i18n/js/utils_spec.rb
208
- - spec/ruby/i18n/js_spec.rb
209
- - spec/spec_helper.rb
210
- - yarn.lock
211
- homepage: http://rubygems.org/gems/i18n-js
183
+ - lib/i18n-js/cli.rb
184
+ - lib/i18n-js/cli/command.rb
185
+ - lib/i18n-js/cli/export_command.rb
186
+ - lib/i18n-js/cli/init_command.rb
187
+ - lib/i18n-js/cli/ui.rb
188
+ - lib/i18n-js/cli/version_command.rb
189
+ - lib/i18n-js/listen.rb
190
+ - lib/i18n-js/schema.rb
191
+ - lib/i18n-js/version.rb
192
+ homepage: https://github.com/fnando/i18n-js
212
193
  licenses:
213
194
  - MIT
214
- metadata: {}
195
+ metadata:
196
+ homepage_uri: https://github.com/fnando/i18n-js
197
+ bug_tracker_uri: https://github.com/fnando/i18n-js/issues
198
+ source_code_uri: https://github.com/fnando/i18n-js/tree/v4.0.0.alpha1
199
+ changelog_uri: https://github.com/fnando/i18n-js/tree/v4.0.0.alpha1/CHANGELOG.md
200
+ documentation_uri: https://github.com/fnando/i18n-js/tree/v4.0.0.alpha1/README.md
201
+ license_uri: https://github.com/fnando/i18n-js/tree/v4.0.0.alpha1/LICENSE.md
215
202
  post_install_message:
216
203
  rdoc_options: []
217
204
  require_paths:
@@ -220,74 +207,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
207
  requirements:
221
208
  - - ">="
222
209
  - !ruby/object:Gem::Version
223
- version: 2.1.0
210
+ version: 2.6.0
224
211
  required_rubygems_version: !ruby/object:Gem::Requirement
225
212
  requirements:
226
- - - ">="
213
+ - - ">"
227
214
  - !ruby/object:Gem::Version
228
- version: '0'
215
+ version: 1.3.1
229
216
  requirements: []
230
- rubygems_version: 3.2.17
217
+ rubygems_version: 3.2.15
231
218
  signing_key:
232
219
  specification_version: 4
233
- summary: It's a small library to provide the Rails I18n translations on the Javascript.
234
- test_files:
235
- - spec/fixtures/custom_path.yml
236
- - spec/fixtures/default.yml
237
- - spec/fixtures/erb.yml
238
- - spec/fixtures/except_condition.yml
239
- - spec/fixtures/js_export_dir_custom.yml
240
- - spec/fixtures/js_export_dir_none.yml
241
- - spec/fixtures/js_extend_parent.yml
242
- - spec/fixtures/js_extend_segment.yml
243
- - spec/fixtures/js_file_per_locale.yml
244
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_default_locale_symbol.yml
245
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_hash.yml
246
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_locale.yml
247
- - spec/fixtures/js_file_per_locale_with_fallbacks_as_locale_without_fallback_translations.yml
248
- - spec/fixtures/js_file_per_locale_with_fallbacks_enabled.yml
249
- - spec/fixtures/js_file_per_locale_without_fallbacks.yml
250
- - spec/fixtures/js_file_with_namespace_prefix_and_pretty_print.yml
251
- - spec/fixtures/js_sort_translation_keys_false.yml
252
- - spec/fixtures/js_sort_translation_keys_true.yml
253
- - spec/fixtures/json_only.yml
254
- - spec/fixtures/locales.yml
255
- - spec/fixtures/merge_plurals.yml
256
- - spec/fixtures/merge_plurals_with_no_overrides.yml
257
- - spec/fixtures/merge_plurals_with_partial_overrides.yml
258
- - spec/fixtures/millions.yml
259
- - spec/fixtures/multiple_conditions.yml
260
- - spec/fixtures/multiple_conditions_per_locale.yml
261
- - spec/fixtures/multiple_files.yml
262
- - spec/fixtures/no_config.yml
263
- - spec/fixtures/no_scope.yml
264
- - spec/fixtures/simple_scope.yml
265
- - spec/js/currency.spec.js
266
- - spec/js/current_locale.spec.js
267
- - spec/js/dates.spec.js
268
- - spec/js/defaults.spec.js
269
- - spec/js/extend.spec.js
270
- - spec/js/interpolation.spec.js
271
- - spec/js/jasmine/MIT.LICENSE
272
- - spec/js/jasmine/jasmine-html.js
273
- - spec/js/jasmine/jasmine.css
274
- - spec/js/jasmine/jasmine.js
275
- - spec/js/jasmine/jasmine_favicon.png
276
- - spec/js/json_parsable.spec.js
277
- - spec/js/locales.spec.js
278
- - spec/js/localization.spec.js
279
- - spec/js/numbers.spec.js
280
- - spec/js/placeholder.spec.js
281
- - spec/js/pluralization.spec.js
282
- - spec/js/prepare_options.spec.js
283
- - spec/js/require.js
284
- - spec/js/specs.html
285
- - spec/js/specs_requirejs.html
286
- - spec/js/translate.spec.js
287
- - spec/js/translations.js
288
- - spec/js/utility_functions.spec.js
289
- - spec/ruby/i18n/js/fallback_locales_spec.rb
290
- - spec/ruby/i18n/js/segment_spec.rb
291
- - spec/ruby/i18n/js/utils_spec.rb
292
- - spec/ruby/i18n/js_spec.rb
293
- - spec/spec_helper.rb
220
+ summary: Export i18n translations and use them on JavaScript.
221
+ test_files: []