jekyll-task-i18n 1.0.4 → 1.0.6

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: 8c3feb5503aca93b8fe22a0032c612d7b031cabc9c7732634dc9b7019526f625
4
- data.tar.gz: b011601d206d1298d1017d63c5be82dd0d9b67aae4abeab7a17594ffa2ac314d
3
+ metadata.gz: 9ff116bf9cf461203311021442cf75cf0e28f87d18230976c57bceb6bff28ed7
4
+ data.tar.gz: 38beaef7b8f32d4e6d66ceded9363dd8d4a2e6d329c95f4a5d9165eea9fd29f9
5
5
  SHA512:
6
- metadata.gz: 3468e2b3a4acdb38fcd88d3d694d3cfa09496e35739f6c6a432eed2df10f24f3b4239ee1bb3f90e5108cc66c8328784d768bc3b514b61d8503c7c16b3f67c5ad
7
- data.tar.gz: 7cb8e15519a4995aa28419acfc289cfa58c582782b06f17d889f4138604a0bc180c9f88b68c505e00d41ef159ded473ce678b3af5393f8d012205744f572aa62
6
+ metadata.gz: a7d66e47684af7905ecd70443917e63d350cf29d05b388475e7a1b9dcaf4412086bed762104df23384ad7df983e869cac5275f982c2eeab62cf6589ce6f1e0cc
7
+ data.tar.gz: 71cb0a8effe098a40940f0d72491515ab2dd8805d6d431f8ffcf57f46f9af37087fca5613cc8c1a4ded8c1fa84c82098bb2d26edf02928f4cbd58088adad45a7
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2018 The ruby-gettext project
1
+ # Copyright (C) 2014-2023 The ruby-gettext project
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
17
17
  module Jekyll
18
18
  module Task
19
19
  class I18n
20
- VERSION = "1.0.4"
20
+ VERSION = "1.0.6"
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
- # Copyright (C) 2014-2018 The ruby-gettext project
2
- # Copyright (C) 2013-2014 Droonga Project
1
+ # Copyright (C) 2014-2023 The ruby-gettext project
2
+ # Copyright (C) 2013-2014 Droonga Project
3
3
  #
4
4
  # This library is free software; you can redistribute it and/or
5
5
  # modify it under the terms of the GNU Lesser General Public
@@ -96,49 +96,64 @@ module Jekyll
96
96
  generator = YARD::I18n::PotGenerator.new(relative_base_path.to_s)
97
97
  yard_file = YARD::CodeObjects::ExtraFileObject.new(target_file)
98
98
  generator.parse_files([yard_file])
99
- path.pot_file.open("w") do |pot_file|
100
- pot_file.puts(generator.generate)
99
+ path.source_pot_file.open("w") do |output|
100
+ output.puts(generator.generate)
101
101
  end
102
+ msgcat("--output", path.pot_file.to_s,
103
+ "--no-all-comments",
104
+ "--no-wrap",
105
+ "--remove-header-field=Language-Team",
106
+ "--remove-header-field=Last-Translator",
107
+ "--remove-header-field=POT-Creation-Date",
108
+ "--remove-header-field=Report-Msgid-Bugs-To",
109
+ "--sort-by-file",
110
+ path.source_pot_file.to_s)
102
111
  if po_file_is_updated?(path)
103
112
  rm_f(path.edit_po_file.to_s)
104
113
  rm_f(path.all_po_file.to_s)
105
114
  end
106
115
  unless path.edit_po_file.exist?
107
116
  if path.po_file.exist?
108
- msgcat("--output", path.edit_po_file.to_s,
117
+ msgcat("--no-wrap",
118
+ "--output", path.edit_po_file.to_s,
109
119
  "--update-po-revision-date",
110
120
  path.po_file.to_s)
111
121
  else
112
- msginit("--input", path.pot_file.to_s,
113
- "--output", path.edit_po_file.to_s,
114
- "--locale", locale)
122
+ msginit("--input", path.source_pot_file.to_s,
123
+ "--locale", locale,
124
+ "--no-wrap",
125
+ "--output", path.edit_po_file.to_s)
115
126
  end
116
127
  end
117
128
 
118
129
  edit_po_file_mtime = path.edit_po_file.mtime
119
- msgmerge("--update",
130
+ msgmerge("--no-wrap",
120
131
  "--sort-by-file",
121
- "--no-wrap",
132
+ "--update",
122
133
  path.edit_po_file.to_s,
123
- path.pot_file.to_s)
134
+ path.source_pot_file.to_s)
124
135
  if path.po_file.exist? and path.po_file.mtime > edit_po_file_mtime
125
- msgmerge("--output", path.edit_po_file.to_s,
136
+ msgmerge("--no-obsolete-entries",
137
+ "--no-wrap",
138
+ "--output", path.edit_po_file.to_s,
126
139
  "--sort-by-file",
127
- "--no-obsolete-entries",
128
140
  path.po_file.to_s,
129
141
  path.edit_po_file.to_s)
130
- msgcat("--output", path.edit_po_file.to_s,
142
+ msgcat("--no-wrap",
143
+ "--output", path.edit_po_file.to_s,
131
144
  "--update-po-revision-date",
132
145
  path.edit_po_file.to_s)
133
146
  end
134
147
  if path.all_po_file.exist?
135
- msgmerge("--output", path.edit_po_file.to_s,
136
- "--sort-by-file",
137
- "--no-fuzzy-matching",
148
+ msgmerge("--no-fuzzy-matching",
138
149
  "--no-obsolete-entries",
150
+ "--no-wrap",
151
+ "--output", path.edit_po_file.to_s,
152
+ "--sort-by-file",
139
153
  path.all_po_file.to_s,
140
154
  path.edit_po_file.to_s)
141
- msgcat("--output", path.edit_po_file.to_s,
155
+ msgcat("--no-wrap",
156
+ "--output", path.edit_po_file.to_s,
142
157
  "--update-po-revision-date",
143
158
  path.edit_po_file.to_s)
144
159
  end
@@ -178,17 +193,14 @@ module Jekyll
178
193
 
179
194
  CLEAN << path.time_stamp_file.to_s if path.time_stamp_file.exist?
180
195
  file po_file => [path.edit_po_file.to_s] do
181
- msgcat("--output", po_file,
196
+ msgcat("--no-all-comments",
182
197
  "--no-fuzzy",
183
- "--sort-by-file",
184
- "--no-all-comments",
185
- "--no-report-warning",
186
198
  "--no-obsolete-entries",
187
- "--remove-header-field=Report-Msgid-Bugs-To",
188
- "--remove-header-field=Last-Translator",
189
- "--remove-header-field=Language-Team",
199
+ "--no-report-warning",
200
+ "--no-wrap",
201
+ "--output", po_file,
190
202
  "--remove-header-field=POT-Creation-Date",
191
- "--remove-header-field=PO-Revision-Date",
203
+ "--sort-by-file",
192
204
  path.edit_po_file.to_s)
193
205
  touch(path.time_stamp_file.to_s)
194
206
  end
@@ -201,11 +213,12 @@ module Jekyll
201
213
  sorted_po_files = po_files.sort_by do |po_file|
202
214
  -File.mtime(po_file).to_f
203
215
  end
204
- msgcat("--output", all_po_file,
216
+ msgcat("--no-all-comments",
205
217
  "--no-fuzzy",
206
- "--no-all-comments",
207
- "--sort-by-msgid",
208
218
  "--no-obsolete-entries",
219
+ "--no-wrap",
220
+ "--output", all_po_file,
221
+ "--sort-by-msgid",
209
222
  *sorted_po_files)
210
223
  end
211
224
 
@@ -348,6 +361,10 @@ module Jekyll
348
361
  po_dir + "#{target_file_base}.pot"
349
362
  end
350
363
 
364
+ def source_pot_file
365
+ po_dir + "#{target_file_base}.source.pot"
366
+ end
367
+
351
368
  def translated_file
352
369
  Pathname(@locale) + @target_file_path
353
370
  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.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-05 00:00:00.000000000 Z
11
+ date: 2023-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gettext
@@ -113,7 +113,7 @@ homepage: https://github.com/ruby-gettext/jekyll-task-i18n
113
113
  licenses:
114
114
  - LGPLv2
115
115
  metadata: {}
116
- post_install_message:
116
+ post_install_message:
117
117
  rdoc_options: []
118
118
  require_paths:
119
119
  - lib
@@ -128,9 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubyforge_project:
132
- rubygems_version: 2.7.6
133
- signing_key:
131
+ rubygems_version: 3.5.0.dev
132
+ signing_key:
134
133
  specification_version: 4
135
134
  summary: Preprocessor for Jekyll to support i18n
136
135
  test_files: []