gettext 3.3.4 → 3.3.5
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.
- checksums.yaml +4 -4
- data/doc/text/news.md +11 -0
- data/lib/gettext/tools/parser/ruby.rb +32 -17
- data/lib/gettext/version.rb +1 -1
- data/po/bg/gettext.edit.po +5 -5
- data/po/bg/gettext.po +3 -3
- data/po/bs/gettext.edit.po +5 -5
- data/po/bs/gettext.po +3 -3
- data/po/ca/gettext.edit.po +5 -5
- data/po/ca/gettext.po +3 -3
- data/po/cs/gettext.edit.po +5 -5
- data/po/cs/gettext.po +3 -3
- data/po/de/gettext.edit.po +5 -5
- data/po/de/gettext.po +3 -3
- data/po/el/gettext.edit.po +5 -5
- data/po/el/gettext.po +3 -3
- data/po/eo/gettext.edit.po +5 -5
- data/po/eo/gettext.po +3 -3
- data/po/es/gettext.edit.po +5 -5
- data/po/es/gettext.po +3 -3
- data/po/et/gettext.edit.po +5 -5
- data/po/et/gettext.po +3 -3
- data/po/fr/gettext.edit.po +5 -5
- data/po/fr/gettext.po +3 -3
- data/po/gettext.pot +8 -8
- data/po/hr/gettext.edit.po +5 -5
- data/po/hr/gettext.po +3 -3
- data/po/hu/gettext.edit.po +5 -5
- data/po/hu/gettext.po +3 -3
- data/po/it/gettext.edit.po +5 -5
- data/po/it/gettext.po +3 -3
- data/po/ja/gettext.edit.po +5 -5
- data/po/ja/gettext.po +3 -3
- data/po/ko/gettext.edit.po +5 -5
- data/po/ko/gettext.po +3 -3
- data/po/lv/gettext.edit.po +5 -5
- data/po/lv/gettext.po +3 -3
- data/po/nb/gettext.edit.po +5 -5
- data/po/nb/gettext.po +3 -3
- data/po/nl/gettext.edit.po +5 -5
- data/po/nl/gettext.po +3 -3
- data/po/pt_BR/gettext.edit.po +5 -5
- data/po/pt_BR/gettext.po +3 -3
- data/po/ru/gettext.edit.po +5 -5
- data/po/ru/gettext.po +3 -3
- data/po/sr/gettext.edit.po +5 -5
- data/po/sr/gettext.po +3 -3
- data/po/sv/gettext.edit.po +5 -5
- data/po/sv/gettext.po +3 -3
- data/po/uk/gettext.edit.po +5 -5
- data/po/uk/gettext.po +3 -3
- data/po/vi/gettext.edit.po +5 -5
- data/po/vi/gettext.po +3 -3
- data/po/zh/gettext.edit.po +5 -5
- data/po/zh/gettext.po +3 -3
- data/po/zh_TW/gettext.edit.po +5 -5
- data/po/zh_TW/gettext.po +3 -3
- data/test/fixtures/_/pipe.rb +32 -0
- data/test/tools/parser/test_ruby.rb +15 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5391b52687ca78f695890c2d0b7d78b322ba32ce7b4978c12de1cbde7f2e682f
|
4
|
+
data.tar.gz: b589d0b3dc0a057526b17b5a196171365280d1e60fdc2f939be5a2381ecd1e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 774e933f6950156d08af1957e0f67d4a07b717ca42761c84fd6bf9ee2758304eb5ac0e58bdfbd6cce0a892ecce7ea6de4708cfee5ba39e58a64e325cb5acb885
|
7
|
+
data.tar.gz: c614dbf745ba89e691e4e40c38f73a2daba026eb58af0af0f638753a169f5ef18f2b93e9bf1311df4f086e916294db73ab0d3597f26fdd9ad51cf539c923ff26
|
data/doc/text/news.md
CHANGED
@@ -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
|
-
|
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 "
|
54
|
-
@
|
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
|
-
|
286
|
-
|
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
|
-
|
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
|
|
data/lib/gettext/version.rb
CHANGED
data/po/bg/gettext.edit.po
CHANGED
@@ -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"
|
data/po/bg/gettext.po
CHANGED
@@ -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 ""
|
data/po/bs/gettext.edit.po
CHANGED
@@ -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"
|
data/po/bs/gettext.po
CHANGED
@@ -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 ""
|
data/po/ca/gettext.edit.po
CHANGED
@@ -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"
|
data/po/ca/gettext.po
CHANGED
@@ -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 ""
|
data/po/cs/gettext.edit.po
CHANGED
@@ -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"
|
data/po/cs/gettext.po
CHANGED
@@ -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 ""
|
data/po/de/gettext.edit.po
CHANGED
@@ -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"
|
data/po/de/gettext.po
CHANGED
@@ -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 ""
|
data/po/el/gettext.edit.po
CHANGED
@@ -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"
|
data/po/el/gettext.po
CHANGED
@@ -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 ""
|
data/po/eo/gettext.edit.po
CHANGED
@@ -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"
|