gettext 3.3.4 → 3.3.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/doc/text/news.md +11 -0
  3. data/lib/gettext/tools/parser/ruby.rb +32 -17
  4. data/lib/gettext/version.rb +1 -1
  5. data/po/bg/gettext.edit.po +5 -5
  6. data/po/bg/gettext.po +3 -3
  7. data/po/bs/gettext.edit.po +5 -5
  8. data/po/bs/gettext.po +3 -3
  9. data/po/ca/gettext.edit.po +5 -5
  10. data/po/ca/gettext.po +3 -3
  11. data/po/cs/gettext.edit.po +5 -5
  12. data/po/cs/gettext.po +3 -3
  13. data/po/de/gettext.edit.po +5 -5
  14. data/po/de/gettext.po +3 -3
  15. data/po/el/gettext.edit.po +5 -5
  16. data/po/el/gettext.po +3 -3
  17. data/po/eo/gettext.edit.po +5 -5
  18. data/po/eo/gettext.po +3 -3
  19. data/po/es/gettext.edit.po +5 -5
  20. data/po/es/gettext.po +3 -3
  21. data/po/et/gettext.edit.po +5 -5
  22. data/po/et/gettext.po +3 -3
  23. data/po/fr/gettext.edit.po +5 -5
  24. data/po/fr/gettext.po +3 -3
  25. data/po/gettext.pot +8 -8
  26. data/po/hr/gettext.edit.po +5 -5
  27. data/po/hr/gettext.po +3 -3
  28. data/po/hu/gettext.edit.po +5 -5
  29. data/po/hu/gettext.po +3 -3
  30. data/po/it/gettext.edit.po +5 -5
  31. data/po/it/gettext.po +3 -3
  32. data/po/ja/gettext.edit.po +5 -5
  33. data/po/ja/gettext.po +3 -3
  34. data/po/ko/gettext.edit.po +5 -5
  35. data/po/ko/gettext.po +3 -3
  36. data/po/lv/gettext.edit.po +5 -5
  37. data/po/lv/gettext.po +3 -3
  38. data/po/nb/gettext.edit.po +5 -5
  39. data/po/nb/gettext.po +3 -3
  40. data/po/nl/gettext.edit.po +5 -5
  41. data/po/nl/gettext.po +3 -3
  42. data/po/pt_BR/gettext.edit.po +5 -5
  43. data/po/pt_BR/gettext.po +3 -3
  44. data/po/ru/gettext.edit.po +5 -5
  45. data/po/ru/gettext.po +3 -3
  46. data/po/sr/gettext.edit.po +5 -5
  47. data/po/sr/gettext.po +3 -3
  48. data/po/sv/gettext.edit.po +5 -5
  49. data/po/sv/gettext.po +3 -3
  50. data/po/uk/gettext.edit.po +5 -5
  51. data/po/uk/gettext.po +3 -3
  52. data/po/vi/gettext.edit.po +5 -5
  53. data/po/vi/gettext.po +3 -3
  54. data/po/zh/gettext.edit.po +5 -5
  55. data/po/zh/gettext.po +3 -3
  56. data/po/zh_TW/gettext.edit.po +5 -5
  57. data/po/zh_TW/gettext.po +3 -3
  58. data/test/fixtures/_/pipe.rb +32 -0
  59. data/test/tools/parser/test_ruby.rb +15 -0
  60. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2042428f38c26ad37b232abdd52d2450339e52fa476c129dd31ffd58ee7e7c8f
4
- data.tar.gz: e7de1e426ce9699a0f8cc7e0fa7a1a9e4df9cc05af35b32911bb690dc2eeeac0
3
+ metadata.gz: 5391b52687ca78f695890c2d0b7d78b322ba32ce7b4978c12de1cbde7f2e682f
4
+ data.tar.gz: b589d0b3dc0a057526b17b5a196171365280d1e60fdc2f939be5a2381ecd1e4d
5
5
  SHA512:
6
- metadata.gz: bcff65fd44de8574479c1d8d12d7d32c0b2fbb703516656f5ceadf57e3a6c7ceaa23985a1ad069db8fff222e53c3bd37333d1410c7e5c6d1398f2276e5300b8d
7
- data.tar.gz: a653287bf1ca9b1361bc5e9aacb1bee26175d51a061d963915db161f80c38af2984bedb3757767d543e2f2c2e71dff5d6a30014a133fef38cde833985b478abc
6
+ metadata.gz: 774e933f6950156d08af1957e0f67d4a07b717ca42761c84fd6bf9ee2758304eb5ac0e58bdfbd6cce0a892ecce7ea6de4708cfee5ba39e58a64e325cb5acb885
7
+ data.tar.gz: c614dbf745ba89e691e4e40c38f73a2daba026eb58af0af0f638753a169f5ef18f2b93e9bf1311df4f086e916294db73ab0d3597f26fdd9ad51cf539c923ff26
@@ -1,5 +1,16 @@
1
1
  # News
2
2
 
3
+ ## 3.3.5: 2020-02-15 {#version-3-3-5}
4
+
5
+ ### Improvements
6
+
7
+ * Added support for `|` method.
8
+ [GitHub#73][Reported by dorle-o]
9
+
10
+ ### Thanks
11
+
12
+ * dorle-o
13
+
3
14
  ## 3.3.4: 2020-02-12 {#version-3-3-4}
4
15
 
5
16
  ### Improvements
@@ -28,9 +28,9 @@ module GetText
28
28
  attr_accessor :comment_tag
29
29
  def initialize(*args)
30
30
  super(*args)
31
+ @start_block = false
31
32
  @in_block_arguments = false
32
33
  @ignore_next_comma = false
33
- @context_stack = []
34
34
  @need_definition_name = false
35
35
  @current_po_entry = nil
36
36
  @current_po_entry_nth_attribute = 0
@@ -43,28 +43,31 @@ module GetText
43
43
  end
44
44
 
45
45
  def process_on_op(token, po)
46
- @in_block_arguments = !@in_block_arguments if token == "|"
46
+ if @start_block
47
+ @in_block_arguments = (token == "|")
48
+ else
49
+ if @in_block_arguments and token == "|"
50
+ @in_block_arguments = false
51
+ end
52
+ end
47
53
  po
48
54
  end
49
55
 
50
56
  def process_on_kw(token, po)
51
57
  store_po_entry(po)
52
58
  case token
53
- when "begin", "case", "do", "for"
54
- @context_stack.push(token)
55
- when "class", "def", "module"
56
- @context_stack.push(token)
57
- when "if", "unless", "until", "while"
58
- # postfix case
59
- unless state.allbits?(Ripper::EXPR_LABEL)
60
- @context_stack.push(token)
61
- end
62
- when "end"
63
- @context_stack.pop
59
+ when "do"
60
+ @start_block = true
64
61
  end
65
62
  po
66
63
  end
67
64
 
65
+ def process_on_lbrace(token, po)
66
+ store_po_entry(po)
67
+ @start_block = (state == Ripper::EXPR_BEG)
68
+ po
69
+ end
70
+
68
71
  def process_on_ident(token, po)
69
72
  store_po_entry(po)
70
73
 
@@ -280,11 +283,14 @@ module GetText
280
283
  def on_default(event, token, po)
281
284
  trace(event, token) do
282
285
  process_method = "process_#{event}"
286
+ start_block = @start_block
283
287
  if respond_to?(process_method)
284
- __send__(process_method, token, po)
285
- else
286
- po
288
+ po = __send__(process_method, token, po)
289
+ end
290
+ if start_block and event != :on_sp
291
+ @start_block = false
287
292
  end
293
+ po
288
294
  end
289
295
  end
290
296
 
@@ -295,7 +301,16 @@ module GetText
295
301
  end
296
302
 
297
303
  def trace(event_name, token)
298
- pp [event_name, token, state, @context_stack.last] if debug?
304
+ if debug?
305
+ status = [
306
+ event_name,
307
+ token,
308
+ state,
309
+ ]
310
+ status << :start_block if @start_block
311
+ status << :in_block_arguments if @in_block_arguments
312
+ pp status
313
+ end
299
314
  yield
300
315
  end
301
316
 
@@ -9,5 +9,5 @@
9
9
  =end
10
10
 
11
11
  module GetText
12
- VERSION = "3.3.4"
12
+ VERSION = "3.3.5"
13
13
  end
@@ -342,7 +342,7 @@ msgid ""
342
342
  "Hello %{world}\n"
343
343
  msgstr ""
344
344
 
345
- #: ../samples/hello2.rb:20
345
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
346
346
  msgid "World"
347
347
  msgstr ""
348
348
 
@@ -553,6 +553,10 @@ msgstr ""
553
553
  msgid "in_string_array"
554
554
  msgstr ""
555
555
 
556
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
557
+ msgid "Hello"
558
+ msgstr ""
559
+
556
560
  #: ../test/fixtures/backslash.rb:27
557
561
  msgid "You should escape '\\' as '\\\\'."
558
562
  msgstr ""
@@ -586,10 +590,6 @@ msgstr ""
586
590
  msgid "duplicated"
587
591
  msgstr ""
588
592
 
589
- #: ../test/fixtures/hello.rb:26
590
- msgid "Hello"
591
- msgstr ""
592
-
593
593
  #: ../test/fixtures/lower_n_.rb:33
594
594
  msgid ""
595
595
  "bbb\n"
@@ -453,6 +453,9 @@ msgstr ""
453
453
  msgid "in_string_array"
454
454
  msgstr ""
455
455
 
456
+ msgid "Hello"
457
+ msgstr ""
458
+
456
459
  msgid "You should escape '\\' as '\\\\'."
457
460
  msgstr ""
458
461
 
@@ -479,9 +482,6 @@ msgstr ""
479
482
  msgid "duplicated"
480
483
  msgstr ""
481
484
 
482
- msgid "Hello"
483
- msgstr ""
484
-
485
485
  msgid ""
486
486
  "bbb\n"
487
487
  msgid_plural ""
@@ -347,7 +347,7 @@ msgid ""
347
347
  "Hello %{world}\n"
348
348
  msgstr ""
349
349
 
350
- #: ../samples/hello2.rb:20
350
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
351
351
  msgid "World"
352
352
  msgstr ""
353
353
 
@@ -558,6 +558,10 @@ msgstr ""
558
558
  msgid "in_string_array"
559
559
  msgstr ""
560
560
 
561
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
562
+ msgid "Hello"
563
+ msgstr ""
564
+
561
565
  #: ../test/fixtures/backslash.rb:27
562
566
  msgid "You should escape '\\' as '\\\\'."
563
567
  msgstr ""
@@ -591,10 +595,6 @@ msgstr ""
591
595
  msgid "duplicated"
592
596
  msgstr ""
593
597
 
594
- #: ../test/fixtures/hello.rb:26
595
- msgid "Hello"
596
- msgstr ""
597
-
598
598
  #: ../test/fixtures/lower_n_.rb:33
599
599
  msgid ""
600
600
  "bbb\n"
@@ -459,6 +459,9 @@ msgstr ""
459
459
  msgid "in_string_array"
460
460
  msgstr ""
461
461
 
462
+ msgid "Hello"
463
+ msgstr ""
464
+
462
465
  msgid "You should escape '\\' as '\\\\'."
463
466
  msgstr ""
464
467
 
@@ -485,9 +488,6 @@ msgstr ""
485
488
  msgid "duplicated"
486
489
  msgstr ""
487
490
 
488
- msgid "Hello"
489
- msgstr ""
490
-
491
491
  msgid ""
492
492
  "bbb\n"
493
493
  msgid_plural ""
@@ -342,7 +342,7 @@ msgid ""
342
342
  "Hello %{world}\n"
343
343
  msgstr ""
344
344
 
345
- #: ../samples/hello2.rb:20
345
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
346
346
  msgid "World"
347
347
  msgstr ""
348
348
 
@@ -553,6 +553,10 @@ msgstr ""
553
553
  msgid "in_string_array"
554
554
  msgstr ""
555
555
 
556
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
557
+ msgid "Hello"
558
+ msgstr ""
559
+
556
560
  #: ../test/fixtures/backslash.rb:27
557
561
  msgid "You should escape '\\' as '\\\\'."
558
562
  msgstr ""
@@ -586,10 +590,6 @@ msgstr ""
586
590
  msgid "duplicated"
587
591
  msgstr ""
588
592
 
589
- #: ../test/fixtures/hello.rb:26
590
- msgid "Hello"
591
- msgstr ""
592
-
593
593
  #: ../test/fixtures/lower_n_.rb:33
594
594
  msgid ""
595
595
  "bbb\n"
@@ -455,6 +455,9 @@ msgstr ""
455
455
  msgid "in_string_array"
456
456
  msgstr ""
457
457
 
458
+ msgid "Hello"
459
+ msgstr ""
460
+
458
461
  msgid "You should escape '\\' as '\\\\'."
459
462
  msgstr ""
460
463
 
@@ -481,9 +484,6 @@ msgstr ""
481
484
  msgid "duplicated"
482
485
  msgstr ""
483
486
 
484
- msgid "Hello"
485
- msgstr ""
486
-
487
487
  msgid ""
488
488
  "bbb\n"
489
489
  msgid_plural ""
@@ -349,7 +349,7 @@ msgid ""
349
349
  "Hello %{world}\n"
350
350
  msgstr ""
351
351
 
352
- #: ../samples/hello2.rb:20
352
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
353
353
  msgid "World"
354
354
  msgstr ""
355
355
 
@@ -560,6 +560,10 @@ msgstr ""
560
560
  msgid "in_string_array"
561
561
  msgstr ""
562
562
 
563
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
564
+ msgid "Hello"
565
+ msgstr ""
566
+
563
567
  #: ../test/fixtures/backslash.rb:27
564
568
  msgid "You should escape '\\' as '\\\\'."
565
569
  msgstr ""
@@ -593,10 +597,6 @@ msgstr ""
593
597
  msgid "duplicated"
594
598
  msgstr ""
595
599
 
596
- #: ../test/fixtures/hello.rb:26
597
- msgid "Hello"
598
- msgstr ""
599
-
600
600
  #: ../test/fixtures/lower_n_.rb:33
601
601
  msgid ""
602
602
  "bbb\n"
@@ -461,6 +461,9 @@ msgstr ""
461
461
  msgid "in_string_array"
462
462
  msgstr ""
463
463
 
464
+ msgid "Hello"
465
+ msgstr ""
466
+
464
467
  msgid "You should escape '\\' as '\\\\'."
465
468
  msgstr ""
466
469
 
@@ -487,9 +490,6 @@ msgstr ""
487
490
  msgid "duplicated"
488
491
  msgstr ""
489
492
 
490
- msgid "Hello"
491
- msgstr ""
492
-
493
493
  msgid ""
494
494
  "bbb\n"
495
495
  msgid_plural ""
@@ -356,7 +356,7 @@ msgid ""
356
356
  "Hello %{world}\n"
357
357
  msgstr ""
358
358
 
359
- #: ../samples/hello2.rb:20
359
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
360
360
  msgid "World"
361
361
  msgstr ""
362
362
 
@@ -567,6 +567,10 @@ msgstr ""
567
567
  msgid "in_string_array"
568
568
  msgstr ""
569
569
 
570
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
571
+ msgid "Hello"
572
+ msgstr ""
573
+
570
574
  #: ../test/fixtures/backslash.rb:27
571
575
  msgid "You should escape '\\' as '\\\\'."
572
576
  msgstr ""
@@ -600,10 +604,6 @@ msgstr ""
600
604
  msgid "duplicated"
601
605
  msgstr ""
602
606
 
603
- #: ../test/fixtures/hello.rb:26
604
- msgid "Hello"
605
- msgstr ""
606
-
607
607
  #: ../test/fixtures/lower_n_.rb:33
608
608
  msgid ""
609
609
  "bbb\n"
@@ -468,6 +468,9 @@ msgstr ""
468
468
  msgid "in_string_array"
469
469
  msgstr ""
470
470
 
471
+ msgid "Hello"
472
+ msgstr ""
473
+
471
474
  msgid "You should escape '\\' as '\\\\'."
472
475
  msgstr ""
473
476
 
@@ -494,9 +497,6 @@ msgstr ""
494
497
  msgid "duplicated"
495
498
  msgstr ""
496
499
 
497
- msgid "Hello"
498
- msgstr ""
499
-
500
500
  msgid ""
501
501
  "bbb\n"
502
502
  msgid_plural ""
@@ -352,7 +352,7 @@ msgid ""
352
352
  "Hello %{world}\n"
353
353
  msgstr ""
354
354
 
355
- #: ../samples/hello2.rb:20
355
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
356
356
  msgid "World"
357
357
  msgstr ""
358
358
 
@@ -563,6 +563,10 @@ msgstr ""
563
563
  msgid "in_string_array"
564
564
  msgstr ""
565
565
 
566
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
567
+ msgid "Hello"
568
+ msgstr ""
569
+
566
570
  #: ../test/fixtures/backslash.rb:27
567
571
  msgid "You should escape '\\' as '\\\\'."
568
572
  msgstr ""
@@ -596,10 +600,6 @@ msgstr ""
596
600
  msgid "duplicated"
597
601
  msgstr ""
598
602
 
599
- #: ../test/fixtures/hello.rb:26
600
- msgid "Hello"
601
- msgstr ""
602
-
603
603
  #: ../test/fixtures/lower_n_.rb:33
604
604
  msgid ""
605
605
  "bbb\n"
@@ -464,6 +464,9 @@ msgstr ""
464
464
  msgid "in_string_array"
465
465
  msgstr ""
466
466
 
467
+ msgid "Hello"
468
+ msgstr ""
469
+
467
470
  msgid "You should escape '\\' as '\\\\'."
468
471
  msgstr ""
469
472
 
@@ -490,9 +493,6 @@ msgstr ""
490
493
  msgid "duplicated"
491
494
  msgstr ""
492
495
 
493
- msgid "Hello"
494
- msgstr ""
495
-
496
496
  msgid ""
497
497
  "bbb\n"
498
498
  msgid_plural ""
@@ -355,7 +355,7 @@ msgid ""
355
355
  "Hello %{world}\n"
356
356
  msgstr ""
357
357
 
358
- #: ../samples/hello2.rb:20
358
+ #: ../samples/hello2.rb:20 ../test/fixtures/_/pipe.rb:28
359
359
  msgid "World"
360
360
  msgstr ""
361
361
 
@@ -566,6 +566,10 @@ msgstr ""
566
566
  msgid "in_string_array"
567
567
  msgstr ""
568
568
 
569
+ #: ../test/fixtures/_/pipe.rb:26 ../test/fixtures/hello.rb:26
570
+ msgid "Hello"
571
+ msgstr ""
572
+
569
573
  #: ../test/fixtures/backslash.rb:27
570
574
  msgid "You should escape '\\' as '\\\\'."
571
575
  msgstr ""
@@ -599,10 +603,6 @@ msgstr ""
599
603
  msgid "duplicated"
600
604
  msgstr ""
601
605
 
602
- #: ../test/fixtures/hello.rb:26
603
- msgid "Hello"
604
- msgstr ""
605
-
606
606
  #: ../test/fixtures/lower_n_.rb:33
607
607
  msgid ""
608
608
  "bbb\n"