jekyll-task-i18n 1.0.6 → 1.0.8

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
  SHA256:
3
- metadata.gz: 9ff116bf9cf461203311021442cf75cf0e28f87d18230976c57bceb6bff28ed7
4
- data.tar.gz: 38beaef7b8f32d4e6d66ceded9363dd8d4a2e6d329c95f4a5d9165eea9fd29f9
3
+ metadata.gz: ccde0bcf94a7d7df2a51a4e3905a5cc1905caad5d79583c52943a3685fd0d4f6
4
+ data.tar.gz: 846f6647e66517d5e199501871026c723ec0f845f620735bb129fa38da8cf510
5
5
  SHA512:
6
- metadata.gz: a7d66e47684af7905ecd70443917e63d350cf29d05b388475e7a1b9dcaf4412086bed762104df23384ad7df983e869cac5275f982c2eeab62cf6589ce6f1e0cc
7
- data.tar.gz: 71cb0a8effe098a40940f0d72491515ab2dd8805d6d431f8ffcf57f46f9af37087fca5613cc8c1a4ded8c1fa84c82098bb2d26edf02928f4cbd58088adad45a7
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.6"
20
+ VERSION = "1.0.8"
21
21
  end
22
22
  end
23
23
  end
@@ -116,12 +116,10 @@ module Jekyll
116
116
  if path.po_file.exist?
117
117
  msgcat("--no-wrap",
118
118
  "--output", path.edit_po_file.to_s,
119
- "--update-po-revision-date",
120
119
  path.po_file.to_s)
121
120
  else
122
121
  msginit("--input", path.source_pot_file.to_s,
123
122
  "--locale", locale,
124
- "--no-wrap",
125
123
  "--output", path.edit_po_file.to_s)
126
124
  end
127
125
  end
@@ -141,7 +139,6 @@ module Jekyll
141
139
  path.edit_po_file.to_s)
142
140
  msgcat("--no-wrap",
143
141
  "--output", path.edit_po_file.to_s,
144
- "--update-po-revision-date",
145
142
  path.edit_po_file.to_s)
146
143
  end
147
144
  if path.all_po_file.exist?
@@ -154,7 +151,6 @@ module Jekyll
154
151
  path.edit_po_file.to_s)
155
152
  msgcat("--no-wrap",
156
153
  "--output", path.edit_po_file.to_s,
157
- "--update-po-revision-date",
158
154
  path.edit_po_file.to_s)
159
155
  end
160
156
  end
@@ -202,6 +198,21 @@ module Jekyll
202
198
  "--remove-header-field=POT-Creation-Date",
203
199
  "--sort-by-file",
204
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
205
216
  touch(path.time_stamp_file.to_s)
206
217
  end
207
218
  end
@@ -357,6 +368,10 @@ module Jekyll
357
368
  po_dir + "#{target_file_base}.edit.po"
358
369
  end
359
370
 
371
+ def tmp_po_file
372
+ po_dir + "#{target_file_base}.tmp.po"
373
+ end
374
+
360
375
  def pot_file
361
376
  po_dir + "#{target_file_base}.pot"
362
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.6
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