gettext 3.3.3 → 3.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -0
  3. data/doc/text/news.md +231 -0
  4. data/gettext.gemspec +1 -1
  5. data/lib/gettext/locale_path.rb +12 -8
  6. data/lib/gettext/mo.rb +7 -5
  7. data/lib/gettext/tools/msginit.rb +216 -50
  8. data/lib/gettext/tools/msgmerge.rb +13 -0
  9. data/lib/gettext/tools/parser/erb.rb +9 -1
  10. data/lib/gettext/tools/parser/glade.rb +38 -40
  11. data/lib/gettext/tools/parser/gtk_builder_ui_definitions.rb +6 -6
  12. data/lib/gettext/tools/parser/ruby.rb +50 -29
  13. data/lib/gettext/version.rb +2 -2
  14. data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
  15. data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
  16. data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
  17. data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
  18. data/locale/de/LC_MESSAGES/gettext.mo +0 -0
  19. data/locale/el/LC_MESSAGES/gettext.mo +0 -0
  20. data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
  21. data/locale/es/LC_MESSAGES/gettext.mo +0 -0
  22. data/locale/et/LC_MESSAGES/gettext.mo +0 -0
  23. data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
  24. data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
  25. data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
  26. data/locale/it/LC_MESSAGES/gettext.mo +0 -0
  27. data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
  28. data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
  29. data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
  30. data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
  31. data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
  32. data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
  33. data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
  34. data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
  35. data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
  36. data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
  37. data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
  38. data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
  39. data/po/bg/gettext.edit.po +36 -554
  40. data/po/bg/gettext.po +0 -423
  41. data/po/bs/gettext.edit.po +36 -554
  42. data/po/bs/gettext.po +0 -423
  43. data/po/ca/gettext.edit.po +36 -554
  44. data/po/ca/gettext.po +0 -423
  45. data/po/cs/gettext.edit.po +36 -554
  46. data/po/cs/gettext.po +0 -423
  47. data/po/de/gettext.edit.po +36 -554
  48. data/po/de/gettext.po +0 -423
  49. data/po/el/gettext.edit.po +36 -554
  50. data/po/el/gettext.po +0 -423
  51. data/po/eo/gettext.edit.po +36 -554
  52. data/po/eo/gettext.po +0 -423
  53. data/po/es/gettext.edit.po +36 -554
  54. data/po/es/gettext.po +0 -423
  55. data/po/et/gettext.edit.po +36 -554
  56. data/po/et/gettext.po +0 -423
  57. data/po/fr/gettext.edit.po +36 -554
  58. data/po/fr/gettext.po +0 -423
  59. data/po/gettext.pot +37 -619
  60. data/po/hr/gettext.edit.po +36 -554
  61. data/po/hr/gettext.po +0 -423
  62. data/po/hu/gettext.edit.po +36 -554
  63. data/po/hu/gettext.po +0 -423
  64. data/po/it/gettext.edit.po +36 -554
  65. data/po/it/gettext.po +0 -423
  66. data/po/ja/gettext.edit.po +36 -554
  67. data/po/ja/gettext.po +0 -423
  68. data/po/ko/gettext.edit.po +36 -554
  69. data/po/ko/gettext.po +0 -423
  70. data/po/lv/gettext.edit.po +36 -554
  71. data/po/lv/gettext.po +0 -423
  72. data/po/nb/gettext.edit.po +36 -554
  73. data/po/nb/gettext.po +0 -423
  74. data/po/nl/gettext.edit.po +36 -554
  75. data/po/nl/gettext.po +0 -423
  76. data/po/pt_BR/gettext.edit.po +36 -554
  77. data/po/pt_BR/gettext.po +0 -423
  78. data/po/ru/gettext.edit.po +36 -554
  79. data/po/ru/gettext.po +0 -423
  80. data/po/sr/gettext.edit.po +36 -554
  81. data/po/sr/gettext.po +0 -423
  82. data/po/sv/gettext.edit.po +34 -555
  83. data/po/sv/gettext.po +0 -423
  84. data/po/uk/gettext.edit.po +36 -554
  85. data/po/uk/gettext.po +0 -423
  86. data/po/vi/gettext.edit.po +36 -554
  87. data/po/vi/gettext.po +0 -423
  88. data/po/zh/gettext.edit.po +36 -554
  89. data/po/zh/gettext.po +0 -423
  90. data/po/zh_TW/gettext.edit.po +36 -554
  91. data/po/zh_TW/gettext.po +0 -423
  92. data/test/fixtures/_.rb +1 -1
  93. data/test/fixtures/_/pipe.rb +32 -0
  94. data/test/fixtures/erb/minus.rhtml +12 -0
  95. data/test/fixtures/{gladeparser.glade → glade/2.glade} +0 -0
  96. data/test/fixtures/glade/3.glade +63 -0
  97. data/test/fixtures/gtk_builder_ui_definitions.ui~ +68 -0
  98. data/test/fixtures/multi_text_domain.rb +12 -12
  99. data/test/fixtures/np_.rb +1 -1
  100. data/test/fixtures/ns_.rb +1 -1
  101. data/test/fixtures/p_.rb +1 -1
  102. data/test/fixtures/ruby/percent_lower_i.rb +1 -0
  103. data/test/fixtures/ruby/percent_lower_w.rb +1 -0
  104. data/test/fixtures/ruby/percent_upper_i.rb +1 -0
  105. data/test/fixtures/ruby/percent_upper_w.rb +1 -0
  106. data/test/fixtures/s_.rb +1 -1
  107. data/test/fixtures/simple.rb +1 -1
  108. data/test/fixtures/upper_nn_.rb +77 -0
  109. data/test/po/_.pot +20 -4
  110. data/test/po/ja/_.edit.po +24 -0
  111. data/test/po/np_.pot +8 -5
  112. data/test/po/ns_.pot +6 -4
  113. data/test/po/p_.pot +3 -3
  114. data/test/po/s_.pot +6 -4
  115. data/test/run-test.rb +0 -1
  116. data/test/test_parser.rb +42 -17
  117. data/test/tools/parser/test_glade.rb +91 -0
  118. data/test/tools/parser/test_gtk_builder_ui_definitions.rb +19 -1
  119. data/test/tools/parser/test_ruby.rb +42 -0
  120. data/test/tools/test_msginit.rb +77 -3
  121. data/test/tools/test_msgmerge.rb +34 -0
  122. metadata +37 -28
@@ -784,6 +784,40 @@ msgstr ""
784
784
  end
785
785
  end
786
786
 
787
+ class TestWarning < self
788
+ def pot_content
789
+ <<-POT
790
+ msgid "Hello"
791
+ msgstr ""
792
+ POT
793
+ end
794
+
795
+ def po_content
796
+ <<-PO
797
+ #, fuzzy
798
+ msgid "Hello!"
799
+ msgstr "Bonjour!"
800
+ PO
801
+ end
802
+
803
+ def test_default
804
+ _stdout, stderr = capture_output do
805
+ @msgmerge.run(@po_file_path, @pot_file_path)
806
+ end
807
+ assert_equal(<<-STDERR, stderr)
808
+ Warning: fuzzy message was used.
809
+ #{@po_file_path}: msgid 'Hello!'
810
+ STDERR
811
+ end
812
+
813
+ def test_no_report_warning
814
+ _stdout, stderr = capture_output do
815
+ @msgmerge.run("--no-report-warning", @po_file_path, @pot_file_path)
816
+ end
817
+ assert_equal("", stderr)
818
+ end
819
+ end
820
+
787
821
  class TestObsoleteEntries < self
788
822
  def pot_content
789
823
  <<-POT
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-05 00:00:00.000000000 Z
12
+ date: 2021-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: locale
@@ -26,35 +26,35 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: 2.0.5
28
28
  - !ruby/object:Gem::Dependency
29
- name: text
29
+ name: red-datasets
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 1.3.0
34
+ version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 1.3.0
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: rake
43
+ name: text
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
48
+ version: 1.3.0
49
+ type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: 1.3.0
56
56
  - !ruby/object:Gem::Dependency
57
- name: racc
57
+ name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
@@ -68,7 +68,7 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: yard
71
+ name: racc
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
@@ -82,7 +82,7 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: kramdown
85
+ name: yard
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
@@ -96,7 +96,7 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: test-unit
99
+ name: kramdown
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="
@@ -110,7 +110,7 @@ dependencies:
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: test-unit-notify
113
+ name: test-unit
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
@@ -145,11 +145,11 @@ email:
145
145
  - kou@clear-code.com
146
146
  - mutomasa at gmail.com
147
147
  executables:
148
- - rmsgmerge
149
- - rmsginit
150
148
  - rmsgcat
151
- - rxgettext
152
149
  - rmsgfmt
150
+ - rmsginit
151
+ - rmsgmerge
152
+ - rxgettext
153
153
  extensions: []
154
154
  extra_rdoc_files: []
155
155
  files:
@@ -1526,13 +1526,17 @@ files:
1526
1526
  - test/fixtures/_/one_line.rb
1527
1527
  - test/fixtures/_/one_new_line.rb
1528
1528
  - test/fixtures/_/percent_strings.rb
1529
+ - test/fixtures/_/pipe.rb
1529
1530
  - test/fixtures/_/quoted_symbol.rb
1530
1531
  - test/fixtures/backslash.rb
1531
1532
  - test/fixtures/erb/ascii.rhtml
1532
1533
  - test/fixtures/erb/ascii.rxml
1534
+ - test/fixtures/erb/minus.rhtml
1533
1535
  - test/fixtures/erb/non_ascii.rhtml
1534
- - test/fixtures/gladeparser.glade
1536
+ - test/fixtures/glade/2.glade
1537
+ - test/fixtures/glade/3.glade
1535
1538
  - test/fixtures/gtk_builder_ui_definitions.ui
1539
+ - test/fixtures/gtk_builder_ui_definitions.ui~
1536
1540
  - test/fixtures/hello.rb
1537
1541
  - test/fixtures/lower_n_.rb
1538
1542
  - test/fixtures/multi_text_domain.rb
@@ -1541,11 +1545,16 @@ files:
1541
1545
  - test/fixtures/ns_.rb
1542
1546
  - test/fixtures/ns_/custom.rb
1543
1547
  - test/fixtures/p_.rb
1548
+ - test/fixtures/ruby/percent_lower_i.rb
1549
+ - test/fixtures/ruby/percent_lower_w.rb
1550
+ - test/fixtures/ruby/percent_upper_i.rb
1551
+ - test/fixtures/ruby/percent_upper_w.rb
1544
1552
  - test/fixtures/s_.rb
1545
1553
  - test/fixtures/s_/custom.rb
1546
1554
  - test/fixtures/simple.rb
1547
1555
  - test/fixtures/untranslated.rb
1548
1556
  - test/fixtures/upper_n_.rb
1557
+ - test/fixtures/upper_nn_.rb
1549
1558
  - test/helper.rb
1550
1559
  - test/locale/cr/LC_MESSAGES/plural.mo
1551
1560
  - test/locale/da/LC_MESSAGES/plural.mo
@@ -1657,6 +1666,7 @@ files:
1657
1666
  - test/tools/files/simple_2.po
1658
1667
  - test/tools/files/simple_translation.rb
1659
1668
  - test/tools/files/version.po
1669
+ - test/tools/parser/test_glade.rb
1660
1670
  - test/tools/parser/test_gtk_builder_ui_definitions.rb
1661
1671
  - test/tools/parser/test_ruby.rb
1662
1672
  - test/tools/test.pot
@@ -1684,23 +1694,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1684
1694
  - !ruby/object:Gem::Version
1685
1695
  version: '0'
1686
1696
  requirements: []
1687
- rubyforge_project:
1688
- rubygems_version: 2.7.6.2
1697
+ rubygems_version: 3.3.0.dev
1689
1698
  signing_key:
1690
1699
  specification_version: 4
1691
1700
  summary: Gettext is a pure Ruby libary and tools to localize messages.
1692
1701
  test_files:
1702
+ - test/test_class_info.rb
1703
+ - test/test_gettext.rb
1704
+ - test/test_locale_path.rb
1693
1705
  - test/test_mo.rb
1694
1706
  - test/test_parser.rb
1707
+ - test/test_po.rb
1708
+ - test/test_po_entry.rb
1695
1709
  - test/test_po_parser.rb
1696
- - test/test_text_domain_bind.rb
1697
- - test/test_text_domain.rb
1698
1710
  - test/test_string.rb
1699
- - test/test_locale_path.rb
1700
- - test/test_thread.rb
1701
- - test/test_class_info.rb
1711
+ - test/test_text_domain.rb
1712
+ - test/test_text_domain_bind.rb
1702
1713
  - test/test_text_domain_multi.rb
1703
- - test/test_po_entry.rb
1704
- - test/test_gettext.rb
1705
1714
  - test/test_text_domain_toplevel.rb
1706
- - test/test_po.rb
1715
+ - test/test_thread.rb