jekyll-task-i18n 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de80e6b3ffdb015d02f3cc9d5181ba7d3999c0a8fa71d984cccbecddebb1c940
4
- data.tar.gz: 846fa2a8c2e93583797e352380388f92ebc412c106d7e72088a03f381a86f96c
3
+ metadata.gz: 4156d92b5c76de010ee1091cb8f5bf7c432c0ad15ac8026fd5d6c2d5afb76b21
4
+ data.tar.gz: 7583965e477957041691d0c8ee36ecd750abf8e9c34e907e40daaa09c513d3bf
5
5
  SHA512:
6
- metadata.gz: 916b255b12f5746a0ae237da0755ee8007643b2738fa354cdf4c6d086cd777b245b23982a182672f452c15d06349195f569a166d48aa99e6e3bbe525e396901f
7
- data.tar.gz: 71c8534505fcf2ff0e083cfb80d6b5aa1e623c16b6c3535dec592ef9dcda315a213f8e5598aab67127c21034cc749a2d25d4bde97a8d16c423bd38b26094edb5
6
+ metadata.gz: a3bc0412d6f06731f3ff1141399c2cebeceb0d48ebf020a4a870d6612e0a8dc990c9904d208a886f8ad58d28111bfb86a5e400f3b2a1e3f6572741f474abaea3
7
+ data.tar.gz: edd06c8e0b2319434e4fb562c96219b17aad03d724377aaaac488ae7c1a2765b8066fb9215e255b3909731132d86e2953b7c3295a5cbe139a2332338f7d22265
@@ -17,7 +17,7 @@
17
17
  module Jekyll
18
18
  module Task
19
19
  class I18n
20
- VERSION = "1.0.7"
20
+ VERSION = "1.0.9"
21
21
  end
22
22
  end
23
23
  end
@@ -120,7 +120,6 @@ module Jekyll
120
120
  else
121
121
  msginit("--input", path.source_pot_file.to_s,
122
122
  "--locale", locale,
123
- "--no-wrap",
124
123
  "--output", path.edit_po_file.to_s)
125
124
  end
126
125
  end
@@ -190,8 +189,8 @@ module Jekyll
190
189
 
191
190
  CLEAN << path.time_stamp_file.to_s if path.time_stamp_file.exist?
192
191
  file po_file => [path.edit_po_file.to_s] do
193
- msgcat("--no-all-comments",
194
- "--no-fuzzy",
192
+ msgcat("--no-fuzzy",
193
+ "--no-location",
195
194
  "--no-obsolete-entries",
196
195
  "--no-report-warning",
197
196
  "--no-wrap",
@@ -199,6 +198,21 @@ module Jekyll
199
198
  "--remove-header-field=POT-Creation-Date",
200
199
  "--sort-by-file",
201
200
  path.edit_po_file.to_s)
201
+ mv(po_file, path.tmp_po_file.to_s)
202
+ begin
203
+ # GNU msgcat
204
+ sh("msgcat",
205
+ "--output", po_file,
206
+ path.tmp_po_file.to_s)
207
+ rescue => error
208
+ if error.message.start_with?("Command failed with status")
209
+ mv(path.tmp_po_file.to_s, po_file)
210
+ else
211
+ raise
212
+ end
213
+ else
214
+ rm(path.tmp_po_file.to_s)
215
+ end
202
216
  touch(path.time_stamp_file.to_s)
203
217
  end
204
218
  end
@@ -354,6 +368,10 @@ module Jekyll
354
368
  po_dir + "#{target_file_base}.edit.po"
355
369
  end
356
370
 
371
+ def tmp_po_file
372
+ po_dir + "#{target_file_base}.tmp.po"
373
+ end
374
+
357
375
  def pot_file
358
376
  po_dir + "#{target_file_base}.pot"
359
377
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-task-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-13 00:00:00.000000000 Z
11
+ date: 2023-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gettext