jekyll-task-i18n 1.0.7 → 1.0.8

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: ccde0bcf94a7d7df2a51a4e3905a5cc1905caad5d79583c52943a3685fd0d4f6
4
+ data.tar.gz: 846f6647e66517d5e199501871026c723ec0f845f620735bb129fa38da8cf510
5
5
  SHA512:
6
- metadata.gz: 916b255b12f5746a0ae237da0755ee8007643b2738fa354cdf4c6d086cd777b245b23982a182672f452c15d06349195f569a166d48aa99e6e3bbe525e396901f
7
- data.tar.gz: 71c8534505fcf2ff0e083cfb80d6b5aa1e623c16b6c3535dec592ef9dcda315a213f8e5598aab67127c21034cc749a2d25d4bde97a8d16c423bd38b26094edb5
6
+ metadata.gz: da1755d26acbd973acacca0969f79e33be335fc8847322ce05599f2ac65429bedd281421f941217eac54f0c04a5d5302a166b51c8d401ed28bd6debfb7dc6042
7
+ data.tar.gz: bdd1dad6dc4e16dcbf676756ac480964dd55efc16c5f8ae978761b5a15bf987109174046958847beac51cac668418f94cf3828e2cbae5e6a571dfa254672480e
@@ -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.8"
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
@@ -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.8
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