gettext 3.0.9 → 3.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b781a60677e7d0b803b8d28dc33a6f1b5e65a11
4
- data.tar.gz: 86c661948b0dc4eaa89490d9af1360a792b50f5e
3
+ metadata.gz: a719015e637ff305554d5775941be1006078d16f
4
+ data.tar.gz: cb71c4d53de15937a6bdb4d04b1fbfe14a4ba2e5
5
5
  SHA512:
6
- metadata.gz: af7c1f0755860c2d0a7923b987dd7a76a98e2872aad9eec36f545d0294fa5415c2f841f1c1b065f989c8171e75e8b9264290125fbdbf62b1b99b4965d7ba39f4
7
- data.tar.gz: 410f8f7813b41da1bd30e44eb6d98f2e7c07c770bfa3e1602dd679b08391379711f4ea06d01a172a9765bc074313c7d0281f270fb6537a56e040222bd8d7f07a
6
+ metadata.gz: 1e9d8304087408af8eb5a43cae49fb7fbd160d5d35b73f0e46f7705881077ed3bba0e2a70887c1e78dd0eadbeb956e6b03eeafa84ae7e736cdac47867b90c3fc
7
+ data.tar.gz: 080412c95eb2def6cf02d5fd75aef62ad74a3321c61f96d83650fd2f4ca4b7bb727e5841a7380567fa5818107bf4c98280412150e2268a55200b3280480ff37d
@@ -1,10 +1,16 @@
1
1
  # News
2
2
 
3
+ ## <a id="3-1-0">3.1.0</a>: 2014-02-09
4
+
5
+ ### Improvements
6
+
7
+ * `rmsgcat`: Added `--no-obsolete-entries` option.
8
+
3
9
  ## <a id="3-0-9">3.0.9</a>: 2014-02-09
4
10
 
5
11
  ### Improvements
6
12
 
7
- * `rmsgimerge`: Improves fuzzy matching speed.
13
+ * `rmsgmerge`: Improves fuzzy matching speed.
8
14
 
9
15
  ## <a id="3-0-8">3.0.8</a>: 2014-02-09
10
16
 
@@ -73,6 +73,9 @@ module GetText
73
73
 
74
74
  def merge(po)
75
75
  po.each do |entry|
76
+ if entry.msgid == :last
77
+ next unless @config.output_obsolete_entries?
78
+ end
76
79
  id = [entry.msgctxt, entry.msgid]
77
80
  if @output_po.has_key?(*id)
78
81
  merged_entry = merge_entry(@output_po[*id], entry)
@@ -139,6 +142,9 @@ module GetText
139
142
  # (see report_warning?)
140
143
  attr_writer :report_warning
141
144
 
145
+ # (see output_obsolete_entries?)
146
+ attr_writer :output_obsolete_entries
147
+
142
148
  def initialize
143
149
  @pos = []
144
150
  @output = nil
@@ -148,6 +154,7 @@ module GetText
148
154
  }
149
155
  @include_fuzzy = true
150
156
  @report_warning = true
157
+ @output_obsolete_entries = true
151
158
  end
152
159
 
153
160
  # @return [Boolean] Whether includes fuzzy entries or not.
@@ -160,6 +167,11 @@ module GetText
160
167
  @report_warning
161
168
  end
162
169
 
170
+ # @return [Boolean] Whether outputs obsolete entries or not.
171
+ def output_obsolete_entries?
172
+ @output_obsolete_entries
173
+ end
174
+
163
175
  def parse(command_line)
164
176
  parser = create_option_parser
165
177
  @pos = parser.parse(command_line)
@@ -242,6 +254,11 @@ module GetText
242
254
  @report_warning = report_warning
243
255
  end
244
256
 
257
+ parser.on("--no-obsolete-entries",
258
+ _("Don't output obsolete entries")) do
259
+ @output_obsolete_entries = false
260
+ end
261
+
245
262
  parser
246
263
  end
247
264
  end
@@ -9,5 +9,5 @@
9
9
  =end
10
10
 
11
11
  module GetText
12
- VERSION = "3.0.9"
12
+ VERSION = "3.1.0"
13
13
  end
@@ -6,10 +6,10 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: gettext 3.0.9\n"
9
+ "Project-Id-Version: gettext 3.1.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2014-02-09 22:50+0900\n"
12
- "PO-Revision-Date: 2014-02-09 22:50+0900\n"
11
+ "POT-Creation-Date: 2014-02-09 23:09+0900\n"
12
+ "PO-Revision-Date: 2014-02-09 23:09+0900\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
@@ -26,80 +26,84 @@ msgstr ""
26
26
  msgid "ngettext: 3rd parameter should be a number, not nil."
27
27
  msgstr ""
28
28
 
29
- #: ../lib/gettext/tools/msgcat.rb:172
29
+ #: ../lib/gettext/tools/msgcat.rb:184
30
30
  msgid "Usage: %s [OPTIONS] PO_FILE1 PO_FILE2 ..."
31
31
  msgstr ""
32
32
 
33
- #: ../lib/gettext/tools/msgcat.rb:174
33
+ #: ../lib/gettext/tools/msgcat.rb:186
34
34
  msgid "Concatenates and merges PO files."
35
35
  msgstr ""
36
36
 
37
- #: ../lib/gettext/tools/msgcat.rb:176 ../lib/gettext/tools/msgfmt.rb:86
37
+ #: ../lib/gettext/tools/msgcat.rb:188 ../lib/gettext/tools/msgfmt.rb:86
38
38
  #: ../lib/gettext/tools/msginit.rb:92 ../lib/gettext/tools/msgmerge.rb:334
39
39
  #: ../lib/gettext/tools/xgettext.rb:248
40
40
  msgid "Specific options:"
41
41
  msgstr ""
42
42
 
43
- #: ../lib/gettext/tools/msgcat.rb:179 ../lib/gettext/tools/msgmerge.rb:342
43
+ #: ../lib/gettext/tools/msgcat.rb:191 ../lib/gettext/tools/msgmerge.rb:342
44
44
  msgid "Write output to specified file"
45
45
  msgstr ""
46
46
 
47
- #: ../lib/gettext/tools/msgcat.rb:180
47
+ #: ../lib/gettext/tools/msgcat.rb:192
48
48
  msgid "(default: the standard output)"
49
49
  msgstr ""
50
50
 
51
- #: ../lib/gettext/tools/msgcat.rb:185 ../lib/gettext/tools/msgcat.rb:202
51
+ #: ../lib/gettext/tools/msgcat.rb:197 ../lib/gettext/tools/msgcat.rb:214
52
52
  #: ../lib/gettext/tools/msgmerge.rb:347 ../lib/gettext/tools/msgmerge.rb:366
53
53
  #: ../lib/gettext/tools/xgettext.rb:302
54
54
  msgid "Sort output by msgid"
55
55
  msgstr ""
56
56
 
57
- #: ../lib/gettext/tools/msgcat.rb:190 ../lib/gettext/tools/msgcat.rb:195
57
+ #: ../lib/gettext/tools/msgcat.rb:202 ../lib/gettext/tools/msgcat.rb:207
58
58
  #: ../lib/gettext/tools/msgmerge.rb:354 ../lib/gettext/tools/msgmerge.rb:361
59
59
  msgid "Sort output by location"
60
60
  msgstr ""
61
61
 
62
- #: ../lib/gettext/tools/msgcat.rb:196 ../lib/gettext/tools/msgmerge.rb:355
62
+ #: ../lib/gettext/tools/msgcat.rb:208 ../lib/gettext/tools/msgmerge.rb:355
63
63
  msgid "It is same as --sort-by-location"
64
64
  msgstr ""
65
65
 
66
- #: ../lib/gettext/tools/msgcat.rb:197 ../lib/gettext/tools/msgcat.rb:204
66
+ #: ../lib/gettext/tools/msgcat.rb:209 ../lib/gettext/tools/msgcat.rb:216
67
67
  #: ../lib/gettext/tools/msgmerge.rb:349 ../lib/gettext/tools/msgmerge.rb:356
68
68
  msgid "Just for GNU gettext's msgcat compatibility"
69
69
  msgstr ""
70
70
 
71
- #: ../lib/gettext/tools/msgcat.rb:203 ../lib/gettext/tools/msgmerge.rb:348
71
+ #: ../lib/gettext/tools/msgcat.rb:215 ../lib/gettext/tools/msgmerge.rb:348
72
72
  msgid "It is same as --sort-by-msgid"
73
73
  msgstr ""
74
74
 
75
- #: ../lib/gettext/tools/msgcat.rb:209
75
+ #: ../lib/gettext/tools/msgcat.rb:221
76
76
  msgid "Remove location information"
77
77
  msgstr ""
78
78
 
79
- #: ../lib/gettext/tools/msgcat.rb:214
79
+ #: ../lib/gettext/tools/msgcat.rb:226
80
80
  msgid "Remove all comments"
81
81
  msgstr ""
82
82
 
83
- #: ../lib/gettext/tools/msgcat.rb:219 ../lib/gettext/tools/msgmerge.rb:376
83
+ #: ../lib/gettext/tools/msgcat.rb:231 ../lib/gettext/tools/msgmerge.rb:376
84
84
  #: ../lib/gettext/tools/xgettext.rb:312
85
85
  msgid "Set output page width"
86
86
  msgstr ""
87
87
 
88
- #: ../lib/gettext/tools/msgcat.rb:225 ../lib/gettext/tools/msgmerge.rb:382
88
+ #: ../lib/gettext/tools/msgcat.rb:237 ../lib/gettext/tools/msgmerge.rb:382
89
89
  #: ../lib/gettext/tools/xgettext.rb:318
90
90
  msgid ""
91
91
  "Break long message lines, longer than the output page width, into several line"
92
92
  "s"
93
93
  msgstr ""
94
94
 
95
- #: ../lib/gettext/tools/msgcat.rb:236
95
+ #: ../lib/gettext/tools/msgcat.rb:248
96
96
  msgid "Ignore fuzzy entries"
97
97
  msgstr ""
98
98
 
99
- #: ../lib/gettext/tools/msgcat.rb:241
99
+ #: ../lib/gettext/tools/msgcat.rb:253
100
100
  msgid "Don't report warning messages"
101
101
  msgstr ""
102
102
 
103
+ #: ../lib/gettext/tools/msgcat.rb:258 ../lib/gettext/tools/msgmerge.rb:399
104
+ msgid "Don't output obsolete entries"
105
+ msgstr ""
106
+
103
107
  #: ../lib/gettext/tools/msgfmt.rb:65
104
108
  msgid "no input files specified."
105
109
  msgstr ""
@@ -218,10 +222,6 @@ msgstr ""
218
222
  msgid "(enable)"
219
223
  msgstr ""
220
224
 
221
- #: ../lib/gettext/tools/msgmerge.rb:399
222
- msgid "Don't output obsolete entries"
223
- msgstr ""
224
-
225
225
  #: ../lib/gettext/tools/msgmerge.rb:409
226
226
  msgid "Display version information and exit"
227
227
  msgstr ""
@@ -401,4 +401,24 @@ msgstr "Bonjour"
401
401
  assert_empty(@stderr)
402
402
  end
403
403
  end
404
+
405
+ class TestObsoleteEntries < self
406
+ def setup
407
+ @po_fuzzy = <<-PO
408
+ #~ msgid "Hello World"
409
+ #~ msgstr "Bonjour"
410
+ PO
411
+ end
412
+
413
+ def test_default
414
+ assert_equal(<<-PO, run_msgcat([@po_fuzzy]))
415
+ #~ msgid "Hello World"
416
+ #~ msgstr "Bonjour"
417
+ PO
418
+ end
419
+
420
+ def test_no_obsolete_entries
421
+ assert_equal("", run_msgcat([@po_fuzzy], "--no-obsolete-entries"))
422
+ end
423
+ end
404
424
  end
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.0.9
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou