gettext 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/doc/text/news.md +23 -0
  3. data/lib/gettext/tools/msginit.rb +5 -4
  4. data/lib/gettext/tools/parser/gtk_builder_ui_definitions.rb +129 -0
  5. data/lib/gettext/tools/parser/ruby.rb +48 -22
  6. data/lib/gettext/tools/xgettext.rb +6 -6
  7. data/lib/gettext/version.rb +1 -1
  8. data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
  9. data/po/bg/gettext.edit.po +12 -4
  10. data/po/bg/gettext.po +7 -3
  11. data/po/bs/gettext.edit.po +12 -4
  12. data/po/bs/gettext.po +7 -3
  13. data/po/ca/gettext.edit.po +12 -4
  14. data/po/ca/gettext.po +7 -3
  15. data/po/cs/gettext.edit.po +12 -4
  16. data/po/cs/gettext.po +7 -3
  17. data/po/de/gettext.edit.po +12 -4
  18. data/po/de/gettext.po +7 -3
  19. data/po/el/gettext.edit.po +12 -4
  20. data/po/el/gettext.po +7 -3
  21. data/po/eo/gettext.edit.po +12 -4
  22. data/po/eo/gettext.po +7 -3
  23. data/po/es/gettext.edit.po +12 -4
  24. data/po/es/gettext.po +7 -3
  25. data/po/et/gettext.edit.po +12 -4
  26. data/po/et/gettext.po +7 -3
  27. data/po/fr/gettext.edit.po +12 -4
  28. data/po/fr/gettext.po +7 -3
  29. data/po/gettext.pot +15 -9
  30. data/po/hr/gettext.edit.po +12 -4
  31. data/po/hr/gettext.po +7 -3
  32. data/po/hu/gettext.edit.po +12 -4
  33. data/po/hu/gettext.po +7 -3
  34. data/po/it/gettext.edit.po +12 -4
  35. data/po/it/gettext.po +7 -3
  36. data/po/ja/gettext.edit.po +14 -6
  37. data/po/ja/gettext.po +9 -5
  38. data/po/ko/gettext.edit.po +12 -4
  39. data/po/ko/gettext.po +7 -3
  40. data/po/lv/gettext.edit.po +12 -4
  41. data/po/lv/gettext.po +7 -3
  42. data/po/nb/gettext.edit.po +12 -4
  43. data/po/nb/gettext.po +7 -3
  44. data/po/nl/gettext.edit.po +12 -4
  45. data/po/nl/gettext.po +7 -3
  46. data/po/pt_BR/gettext.edit.po +12 -4
  47. data/po/pt_BR/gettext.po +7 -3
  48. data/po/ru/gettext.edit.po +12 -4
  49. data/po/ru/gettext.po +7 -3
  50. data/po/sr/gettext.edit.po +12 -4
  51. data/po/sr/gettext.po +7 -3
  52. data/po/sv/gettext.edit.po +12 -4
  53. data/po/sv/gettext.po +7 -3
  54. data/po/uk/gettext.edit.po +12 -4
  55. data/po/uk/gettext.po +7 -3
  56. data/po/vi/gettext.edit.po +12 -4
  57. data/po/vi/gettext.po +7 -3
  58. data/po/zh/gettext.edit.po +12 -4
  59. data/po/zh/gettext.po +7 -3
  60. data/po/zh_TW/gettext.edit.po +12 -4
  61. data/po/zh_TW/gettext.po +7 -3
  62. data/samples/cgi/po/helloerb1.pot +3 -3
  63. data/samples/cgi/po/helloerb2.pot +3 -3
  64. data/samples/cgi/po/hellolib.pot +3 -3
  65. data/samples/cgi/po/main.pot +3 -3
  66. data/samples/po/hello.pot +3 -3
  67. data/samples/po/hello2.pot +4 -4
  68. data/samples/po/hello_glade2.pot +4 -4
  69. data/samples/po/hello_gtk2.pot +4 -4
  70. data/samples/po/hello_gtk_builder.pot +5 -4
  71. data/samples/po/hello_noop.pot +4 -4
  72. data/samples/po/hello_plural.pot +4 -4
  73. data/samples/po/hello_tk.pot +4 -4
  74. data/test/fixtures/_/backtick.rb +30 -0
  75. data/test/fixtures/_/block_parameter.rb +2 -2
  76. data/test/fixtures/_/double_quote_in_double_quote.rb +2 -2
  77. data/test/fixtures/_/double_quote_in_single_quote.rb +2 -2
  78. data/test/fixtures/_/literal_concatenation_with_continuation_line.rb +2 -2
  79. data/test/fixtures/_/middle_new_line.rb +2 -2
  80. data/test/fixtures/_/multiple_lines_literal.rb +2 -2
  81. data/test/fixtures/_/multiple_messages_in_same_line.rb +2 -2
  82. data/test/fixtures/_/multiple_same_messages.rb +2 -2
  83. data/test/fixtures/_/one_line.rb +2 -2
  84. data/test/fixtures/_/one_new_line.rb +2 -2
  85. data/test/{gettext-test-utils.rb → fixtures/_/percent_strings.rb} +21 -26
  86. data/test/fixtures/_/quoted_symbol.rb +34 -0
  87. data/test/fixtures/gtk_builder_ui_definitions.ui +68 -0
  88. data/test/fixtures/ns_/custom.rb +2 -2
  89. data/test/fixtures/s_/custom.rb +2 -2
  90. data/test/helper.rb +99 -0
  91. data/test/po/_.pot +2 -6
  92. data/test/po/backslash.pot +4 -6
  93. data/test/po/hello.pot +3 -3
  94. data/test/po/ja/_.edit.po +0 -4
  95. data/test/po/ja/hello.edit.po +1 -0
  96. data/test/po/non_ascii.pot +4 -4
  97. data/test/po/np_.pot +5 -8
  98. data/test/po/ns_.pot +4 -6
  99. data/test/po/p_.pot +3 -3
  100. data/test/po/s_.pot +4 -6
  101. data/test/po/untranslated.pot +4 -4
  102. data/test/run-test.rb +2 -2
  103. data/test/test_parser.rb +11 -10
  104. data/test/test_po_parser.rb +2 -2
  105. data/test/test_string.rb +1 -1
  106. data/test/tools/parser/test_gtk_builder_ui_definitions.rb +45 -0
  107. data/test/tools/parser/test_ruby.rb +26 -39
  108. data/test/tools/test_msgmerge.rb +3 -3
  109. data/test/tools/test_xgettext.rb +2 -2
  110. metadata +20 -14
data/test/po/ja/_.edit.po CHANGED
@@ -93,10 +93,6 @@ msgid ""
93
93
  "Here document2\n"
94
94
  msgstr ""
95
95
 
96
- #: ../fixtures/_.rb:109
97
- msgid "in_quote"
98
- msgstr ""
99
-
100
96
  #. TRANSLATORS: This is a proper name. See the gettext
101
97
  #. manual, section Names. Note this is actually a non-ASCII
102
98
  #. name: The first name is (with Unicode escapes)
@@ -7,6 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: hello 3.1.7\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2015-09-22 14:05+0900\n"
10
11
  "PO-Revision-Date: 2015-09-22 14:06+0900\n"
11
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
13
  "Language-Team: Japanese\n"
@@ -1,15 +1,15 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the non_ascii package.
3
+ # This file is distributed under the same license as the gettext package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: non_ascii 3.2.9\n"
9
+ "Project-Id-Version: gettext 3.0.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2018-06-16 12:12+0900\n"
12
- "PO-Revision-Date: 2018-06-16 12:12+0900\n"
11
+ "POT-Creation-Date: 2013-08-30 22:00+0900\n"
12
+ "PO-Revision-Date: 2013-08-30 22:00+0900\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
data/test/po/np_.pot CHANGED
@@ -1,25 +1,22 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the np_ package.
3
+ # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: np_ 3.2.9\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2018-06-16 12:12+0900\n"
12
- "PO-Revision-Date: 2018-06-16 12:12+0900\n"
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "POT-Creation-Date: 2012-08-19 22:14+0900\n"
11
+ "PO-Revision-Date: 2012-08-19 22:14+0900\n"
13
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
16
14
  "MIME-Version: 1.0\n"
17
15
  "Content-Type: text/plain; charset=UTF-8\n"
18
16
  "Content-Transfer-Encoding: 8bit\n"
19
17
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
18
 
21
- #: ../fixtures/np_.rb:28 ../fixtures/np_.rb:29 ../fixtures/np_.rb:33
22
- #: ../fixtures/np_.rb:34
19
+ #: ../fixtures/np_.rb:28 ../fixtures/np_.rb:29 ../fixtures/np_.rb:33 ../fixtures/np_.rb:34
23
20
  msgctxt "Magazine"
24
21
  msgid "a book"
25
22
  msgid_plural "%{num} books"
data/test/po/ns_.pot CHANGED
@@ -1,18 +1,16 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the ns_ package.
3
+ # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: ns_ 3.2.9\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2018-06-16 12:12+0900\n"
12
- "PO-Revision-Date: 2018-06-16 12:12+0900\n"
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "POT-Creation-Date: 2012-08-19 22:38+0900\n"
11
+ "PO-Revision-Date: 2012-08-19 22:38+0900\n"
13
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
16
14
  "MIME-Version: 1.0\n"
17
15
  "Content-Type: text/plain; charset=UTF-8\n"
18
16
  "Content-Transfer-Encoding: 8bit\n"
data/test/po/p_.pot CHANGED
@@ -6,10 +6,10 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: p_ 3.2.9\n"
9
+ "Project-Id-Version: p_ 3.1.3\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2020-01-08 16:01+0900\n"
12
- "PO-Revision-Date: 2020-01-08 16:01+0900\n"
11
+ "POT-Creation-Date: 2014-07-09 15:25+0900\n"
12
+ "PO-Revision-Date: 2014-07-09 15:25+0900\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
data/test/po/s_.pot CHANGED
@@ -1,18 +1,16 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the s_ package.
3
+ # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: s_ 3.2.9\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2018-06-16 12:12+0900\n"
12
- "PO-Revision-Date: 2018-06-16 12:12+0900\n"
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "POT-Creation-Date: 2012-08-19 22:25+0900\n"
11
+ "PO-Revision-Date: 2012-08-19 22:25+0900\n"
13
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
16
14
  "MIME-Version: 1.0\n"
17
15
  "Content-Type: text/plain; charset=UTF-8\n"
18
16
  "Content-Transfer-Encoding: 8bit\n"
@@ -1,15 +1,15 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the untranslated package.
3
+ # This file is distributed under the same license as the gettext package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: untranslated 3.2.9\n"
9
+ "Project-Id-Version: gettext 3.0.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2018-06-16 12:12+0900\n"
12
- "PO-Revision-Date: 2018-06-16 12:12+0900\n"
11
+ "POT-Creation-Date: 2013-08-30 22:00+0900\n"
12
+ "PO-Revision-Date: 2013-08-30 22:00+0900\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
data/test/run-test.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
4
4
  #
5
5
  # License: Ruby's or LGPL
6
6
  #
@@ -32,7 +32,7 @@ require "test-unit"
32
32
  require "test/unit/notify"
33
33
  require "test/unit/rr"
34
34
 
35
- require "gettext-test-utils"
35
+ require "helper"
36
36
 
37
37
  Dir.chdir(test_dir) do
38
38
  Dir.glob("**/test_*.rb").each do |test_file_path|
data/test/test_parser.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
4
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
4
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
5
5
  # Copyright (C) 2010 masone (Christian Felder) <ema@rh-productions.ch>
6
6
  # Copyright (C) 2009 Vladimir Dobriakov <vladimir@geekq.net>
7
7
  # Copyright (C) 2009-2010 Masao Mutoh
@@ -160,7 +160,7 @@ class TestGetTextParser < Test::Unit::TestCase
160
160
  end
161
161
 
162
162
  class TestErbParser < self
163
- include GetTextTestUtils
163
+ include Helper::Path
164
164
 
165
165
  def test_detect_encoding
166
166
  euc_file = Tempfile.new("euc-jp.rhtml")
@@ -175,19 +175,20 @@ class TestGetTextParser < Test::Unit::TestCase
175
175
  end
176
176
 
177
177
  def test_ascii
178
- @ary = GetText::ErbParser.parse('fixtures/erb/ascii.rhtml')
178
+ path = fixture_path("erb", "ascii.rhtml")
179
+ @ary = GetText::ErbParser.parse(path)
179
180
 
180
- assert_target 'aaa', ['fixtures/erb/ascii.rhtml:8']
181
- assert_target "aaa\n", ['fixtures/erb/ascii.rhtml:11']
182
- assert_target 'bbb', ['fixtures/erb/ascii.rhtml:12']
183
- assert_plural_target "ccc1", "ccc2", ['fixtures/erb/ascii.rhtml:13']
181
+ assert_target 'aaa', ["#{path}:8"]
182
+ assert_target "aaa\n", ["#{path}:11"]
183
+ assert_target 'bbb', ["#{path}:12"]
184
+ assert_plural_target "ccc1", "ccc2", ["#{path}:13"]
184
185
  end
185
186
 
186
187
  def test_non_ascii
187
- fixture_path = "fixtures/erb/non_ascii.rhtml"
188
- @ary = GetText::ErbParser.parse(fixture_path)
188
+ path = fixture_path("erb", "non_ascii.rhtml")
189
+ @ary = GetText::ErbParser.parse(path)
189
190
 
190
- assert_target('わたし', ["#{fixture_path}:12"])
191
+ assert_target('わたし', ["#{path}:12"])
191
192
  end
192
193
  end
193
194
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
2
2
  # Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
3
3
  #
4
4
  # License: Ruby's or LGPL
@@ -60,7 +60,7 @@ EOP
60
60
  end
61
61
 
62
62
  class TestPO < self
63
- include GetTextTestUtils
63
+ include Helper::Warning
64
64
 
65
65
  def test_msgstr
66
66
  po_file = create_po_file(<<-EOP)
data/test/test_string.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class TestGetTextString < Test::Unit::TestCase
2
2
  class TestFormat < self
3
- include GetTextTestUtils
3
+ include Helper::Warning
4
4
 
5
5
  def test_basic
6
6
  assert_equal("foo is a number", "%{msg} is a number" % {:msg => "foo"})
@@ -0,0 +1,45 @@
1
+ # Copyright (C) 2020 Sutou Kouhei <kou@clear-code.com>
2
+ #
3
+ # License: Ruby's or LGPL
4
+ #
5
+ # This library is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Lesser General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require "gettext/tools/parser/gtk_builder_ui_definitions"
19
+
20
+ class TestGtkBuilderUIDefinitionsParser < Test::Unit::TestCase
21
+ include Helper::Parser
22
+
23
+ def parse(file)
24
+ GetText::GtkBuilderUIDefinitionsParser.parse(fixture_path(file))
25
+ end
26
+
27
+ def test_all
28
+ assert_parse([
29
+ {
30
+ :msgid => "label with context",
31
+ :msgctxt => "context",
32
+ :references => ["gtk_builder_ui_definitions.ui:19"],
33
+ },
34
+ {
35
+ :msgid => "label simple",
36
+ :references => ["gtk_builder_ui_definitions.ui:31"],
37
+ },
38
+ {
39
+ :msgid => "multiple\n" + "lines\n" + "label",
40
+ :references => ["gtk_builder_ui_definitions.ui:55"],
41
+ },
42
+ ],
43
+ "gtk_builder_ui_definitions.ui")
44
+ end
45
+ end
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
4
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
4
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
5
5
  # Copyright (C) 2010 masone (Christian Felder) <ema@rh-productions.ch>
6
6
  # Copyright (C) 2009 Vladimir Dobriakov <vladimir@geekq.net>
7
7
  # Copyright (C) 2009-2010 Masao Mutoh
@@ -24,49 +24,12 @@
24
24
  require "gettext/tools/parser/ruby"
25
25
 
26
26
  class TestRubyParser < Test::Unit::TestCase
27
- include GetTextTestUtils
27
+ include Helper::Parser
28
28
 
29
- private
30
29
  def parse(file)
31
30
  GetText::RubyParser.parse(fixture_path(file))
32
31
  end
33
32
 
34
- def assert_parse(expected, file)
35
- assert_equal(normalize_expected(expected),
36
- normalize_actual(parse(file)))
37
- end
38
-
39
- def normalize_expected(messages)
40
- messages.collect do |message|
41
- default = {
42
- :msgid => nil,
43
- :msgid_plural => nil,
44
- :msgstr => nil,
45
- :separator => nil,
46
- :references => nil,
47
- }
48
- default.merge(message)
49
- end
50
- end
51
-
52
- def normalize_actual(po)
53
- po.collect do |po_entry|
54
- {
55
- :msgid => po_entry.msgid,
56
- :msgid_plural => po_entry.msgid_plural,
57
- :msgstr => po_entry.msgstr,
58
- :separator => po_entry.separator,
59
- :references => normalize_references(po_entry.references),
60
- }
61
- end
62
- end
63
-
64
- def normalize_references(references)
65
- references.collect do |reference|
66
- reference.sub(/\A#{Regexp.escape(fixture_path)}\//, "")
67
- end
68
- end
69
-
70
33
  class TestDetectEncoding < self
71
34
  def test_ascii_and_hyphen
72
35
  assert_equal("euc-jp", detect_encoding("# coding: euc-jp"))
@@ -227,6 +190,30 @@ class TestRubyParser < Test::Unit::TestCase
227
190
  path)
228
191
  end
229
192
 
193
+
194
+ def test_percent_strings
195
+ path = "percent_strings.rb"
196
+ assert_parse([
197
+ {
198
+ :msgid => "hello world",
199
+ :references => ["#{path}:34"],
200
+ }
201
+ ],
202
+ path)
203
+ end
204
+
205
+ def test_quoted_symbol
206
+ path = "quoted_symbol.rb"
207
+ assert_parse([],
208
+ path)
209
+ end
210
+
211
+ def test_backtick
212
+ path = "backtick.rb"
213
+ assert_parse([],
214
+ path)
215
+ end
216
+
230
217
  private
231
218
  def fixture_path(*components)
232
219
  super("_", *components)
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
4
4
  # Copyright (C) 2010 Eddie Lau <tatonlto@gmail.com>
5
5
  #
6
6
  # License: Ruby's or LGPL
@@ -363,7 +363,7 @@ EOC
363
363
  end
364
364
 
365
365
  class TestCommand < self
366
- include GetTextTestUtils
366
+ include Helper::Tmpdir
367
367
 
368
368
  def setup
369
369
  @msgmerge = GetText::Tools::MsgMerge.new
@@ -480,7 +480,7 @@ EOP
480
480
  end
481
481
 
482
482
  class TestMessage < self
483
- include GetTextTestUtils
483
+ include Helper::Warning
484
484
 
485
485
  def po_content
486
486
  <<-PO
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
4
4
  # Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
5
5
  #
6
6
  # License: Ruby's or LGPL
@@ -22,7 +22,7 @@ require "locale"
22
22
  require "gettext/tools/xgettext"
23
23
 
24
24
  class TestToolsXGetText < Test::Unit::TestCase
25
- include GetTextTestUtils
25
+ include Helper::Tmpdir
26
26
 
27
27
  def setup
28
28
  @xgettext = GetText::Tools::XGetText.new
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.0
4
+ version: 3.3.1
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-01-08 00:00:00.000000000 Z
12
+ date: 2020-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: locale
@@ -145,11 +145,11 @@ email:
145
145
  - kou@clear-code.com
146
146
  - mutomasa at gmail.com
147
147
  executables:
148
- - rmsgfmt
149
148
  - rmsgmerge
149
+ - rmsginit
150
150
  - rmsgcat
151
151
  - rxgettext
152
- - rmsginit
152
+ - rmsgfmt
153
153
  extensions: []
154
154
  extra_rdoc_files: []
155
155
  files:
@@ -185,6 +185,7 @@ files:
185
185
  - lib/gettext/tools/msgmerge.rb
186
186
  - lib/gettext/tools/parser/erb.rb
187
187
  - lib/gettext/tools/parser/glade.rb
188
+ - lib/gettext/tools/parser/gtk_builder_ui_definitions.rb
188
189
  - lib/gettext/tools/parser/ruby.rb
189
190
  - lib/gettext/tools/task.rb
190
191
  - lib/gettext/tools/xgettext.rb
@@ -1513,6 +1514,7 @@ files:
1513
1514
  - samples/po/zh_TW/hello_tk.po.time_stamp
1514
1515
  - src/po_parser.ry
1515
1516
  - test/fixtures/_.rb
1517
+ - test/fixtures/_/backtick.rb
1516
1518
  - test/fixtures/_/block_parameter.rb
1517
1519
  - test/fixtures/_/double_quote_in_double_quote.rb
1518
1520
  - test/fixtures/_/double_quote_in_single_quote.rb
@@ -1523,11 +1525,14 @@ files:
1523
1525
  - test/fixtures/_/multiple_same_messages.rb
1524
1526
  - test/fixtures/_/one_line.rb
1525
1527
  - test/fixtures/_/one_new_line.rb
1528
+ - test/fixtures/_/percent_strings.rb
1529
+ - test/fixtures/_/quoted_symbol.rb
1526
1530
  - test/fixtures/backslash.rb
1527
1531
  - test/fixtures/erb/ascii.rhtml
1528
1532
  - test/fixtures/erb/ascii.rxml
1529
1533
  - test/fixtures/erb/non_ascii.rhtml
1530
1534
  - test/fixtures/gladeparser.glade
1535
+ - test/fixtures/gtk_builder_ui_definitions.ui
1531
1536
  - test/fixtures/hello.rb
1532
1537
  - test/fixtures/lower_n_.rb
1533
1538
  - test/fixtures/multi_text_domain.rb
@@ -1541,7 +1546,7 @@ files:
1541
1546
  - test/fixtures/simple.rb
1542
1547
  - test/fixtures/untranslated.rb
1543
1548
  - test/fixtures/upper_n_.rb
1544
- - test/gettext-test-utils.rb
1549
+ - test/helper.rb
1545
1550
  - test/locale/cr/LC_MESSAGES/plural.mo
1546
1551
  - test/locale/da/LC_MESSAGES/plural.mo
1547
1552
  - test/locale/da/LC_MESSAGES/plural_error.mo
@@ -1652,6 +1657,7 @@ files:
1652
1657
  - test/tools/files/simple_2.po
1653
1658
  - test/tools/files/simple_translation.rb
1654
1659
  - test/tools/files/version.po
1660
+ - test/tools/parser/test_gtk_builder_ui_definitions.rb
1655
1661
  - test/tools/parser/test_ruby.rb
1656
1662
  - test/tools/test.pot
1657
1663
  - test/tools/test_msgcat.rb
@@ -1685,16 +1691,16 @@ specification_version: 4
1685
1691
  summary: Gettext is a pure Ruby libary and tools to localize messages.
1686
1692
  test_files:
1687
1693
  - test/test_mo.rb
1688
- - test/test_text_domain_toplevel.rb
1689
- - test/test_locale_path.rb
1690
- - test/test_text_domain_bind.rb
1691
- - test/test_po_entry.rb
1694
+ - test/test_parser.rb
1692
1695
  - test/test_po_parser.rb
1693
- - test/test_po.rb
1694
- - test/test_string.rb
1695
- - test/test_gettext.rb
1696
+ - test/test_text_domain_bind.rb
1696
1697
  - test/test_text_domain.rb
1697
- - test/test_parser.rb
1698
- - test/test_text_domain_multi.rb
1698
+ - test/test_string.rb
1699
+ - test/test_locale_path.rb
1699
1700
  - test/test_thread.rb
1700
1701
  - test/test_class_info.rb
1702
+ - test/test_text_domain_multi.rb
1703
+ - test/test_po_entry.rb
1704
+ - test/test_gettext.rb
1705
+ - test/test_text_domain_toplevel.rb
1706
+ - test/test_po.rb