i18nliner 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbb90fe50e15cd800c8fe6266435e6ad65da7f403939cbf619c866b843b6792e
4
- data.tar.gz: cf1778863ed5faf6346c491162c90acd52c0e51e4efda4a114bbd13e99f04ed7
3
+ metadata.gz: 3cae685053ab3a06d205244fb111de3040ca1d81224d099e2350f016d07f0d55
4
+ data.tar.gz: f41863a6a11fffc2839cae6bbf5c4fb98c67e7f71a6b8524b9f5aa49bbee1b26
5
5
  SHA512:
6
- metadata.gz: 74400054da78cccfd58e5a54eb452bf46b79464ea2d398536acb62ff37cbba84b044c757cbf45c0950ab22f493dd3d0ac018613a6bcc66e2d40bcca34b36e507
7
- data.tar.gz: 05fddfa85858798700910737ba60e57e0e8da23605792fa6e822ce6ef524f5a98e41fb22face1ad9aed57f4ef9da7d1f0db797898273ffdf4ac71ac33de03dd5
6
+ metadata.gz: 4b89963344f03ce3f822a917ad6005278763ef23aeead3044d5dd06160cc3583b2ae9662baa5113dddf870e9dd5dd0bd279c2c6d2e7decdd54682a68ec4e1d4a
7
+ data.tar.gz: 970fa32baf0fb3bb378d793f664296d67ea2199ba0e6bc8193f4b72eeb12a4917b944742b8d4b9766c942fc54525183c864b4b84c77488c3852766d165bb06ad
@@ -84,6 +84,9 @@ module I18nliner
84
84
  end
85
85
 
86
86
  def evaluate_expression(exp)
87
+ # value omissions in hashes will be nil and can just be considered UnsupportedExpression
88
+ # since they are equivalent to a method call
89
+ return UnsupportedExpression if exp.nil?
87
90
  return raw(exp) if exp.sexp_type == :lit
88
91
  return string_from(exp) if stringish?(exp)
89
92
  return hash_from(exp) if exp.sexp_type == :hash
@@ -49,6 +49,10 @@ describe I18nliner::Extractors::RubyExtractor do
49
49
  {'foo' => "Foo"})
50
50
  end
51
51
 
52
+ it "should handle omitted values in hashes" do
53
+ expect { extract("t('foo %{count}', count:)") }.not_to raise_error
54
+ end
55
+
52
56
  it "should bail on invalid t calls" do
53
57
  assert_error "t foo", I18nliner::InvalidSignatureError
54
58
  assert_error "t :foo, foo", I18nliner::InvalidSignatureError
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18nliner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Jensen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -224,7 +224,7 @@ files:
224
224
  homepage: http://github.com/jenseng/i18nliner
225
225
  licenses: []
226
226
  metadata: {}
227
- post_install_message:
227
+ post_install_message:
228
228
  rdoc_options: []
229
229
  require_paths:
230
230
  - lib
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: 1.3.5
241
241
  requirements: []
242
242
  rubygems_version: 3.1.6
243
- signing_key:
243
+ signing_key:
244
244
  specification_version: 4
245
245
  summary: I18n made simple
246
246
  test_files: []