jekyll-task-i18n 1.0.4 → 1.0.5

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: 70be42a58d86e88d1f0a6b5fda69bac024984bfe43b1b2494419acefdc508cbe
4
+ data.tar.gz: 40e16e1e6b3f99e156fece4b8c4feaaf6d8153d52f14dea2903e79014942ffa2
5
5
  SHA512:
6
- metadata.gz: 3468e2b3a4acdb38fcd88d3d694d3cfa09496e35739f6c6a432eed2df10f24f3b4239ee1bb3f90e5108cc66c8328784d768bc3b514b61d8503c7c16b3f67c5ad
7
- data.tar.gz: 7cb8e15519a4995aa28419acfc289cfa58c582782b06f17d889f4138604a0bc180c9f88b68c505e00d41ef159ded473ce678b3af5393f8d012205744f572aa62
6
+ metadata.gz: 3a9dd14631d1b0ad38574a4a5361440901870225618ad6b9bd6461697370af6bb37a8ec7e09e6166b097d4d4ba2a8cdf760f3468a05bc22eaf081359b03726dc
7
+ data.tar.gz: e8dc1540410346550c6a28caf18667bd5c410e676aa26e2c3e229dea35a0cae8365a4ded44a3f2fef67e4904d44cae003f2baa4fcc47e6df944cfb2f5376ee56
@@ -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.5"
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,9 +96,17 @@ 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
+ "--remove-header-field=Language-Team",
105
+ "--remove-header-field=Last-Translator",
106
+ "--remove-header-field=POT-Creation-Date",
107
+ "--remove-header-field=Report-Msgid-Bugs-To",
108
+ "--sort-by-file",
109
+ path.source_pot_file.to_s)
102
110
  if po_file_is_updated?(path)
103
111
  rm_f(path.edit_po_file.to_s)
104
112
  rm_f(path.all_po_file.to_s)
@@ -109,7 +117,7 @@ module Jekyll
109
117
  "--update-po-revision-date",
110
118
  path.po_file.to_s)
111
119
  else
112
- msginit("--input", path.pot_file.to_s,
120
+ msginit("--input", path.source_pot_file.to_s,
113
121
  "--output", path.edit_po_file.to_s,
114
122
  "--locale", locale)
115
123
  end
@@ -120,7 +128,7 @@ module Jekyll
120
128
  "--sort-by-file",
121
129
  "--no-wrap",
122
130
  path.edit_po_file.to_s,
123
- path.pot_file.to_s)
131
+ path.source_pot_file.to_s)
124
132
  if path.po_file.exist? and path.po_file.mtime > edit_po_file_mtime
125
133
  msgmerge("--output", path.edit_po_file.to_s,
126
134
  "--sort-by-file",
@@ -184,11 +192,7 @@ module Jekyll
184
192
  "--no-all-comments",
185
193
  "--no-report-warning",
186
194
  "--no-obsolete-entries",
187
- "--remove-header-field=Report-Msgid-Bugs-To",
188
- "--remove-header-field=Last-Translator",
189
- "--remove-header-field=Language-Team",
190
195
  "--remove-header-field=POT-Creation-Date",
191
- "--remove-header-field=PO-Revision-Date",
192
196
  path.edit_po_file.to_s)
193
197
  touch(path.time_stamp_file.to_s)
194
198
  end
@@ -348,6 +352,10 @@ module Jekyll
348
352
  po_dir + "#{target_file_base}.pot"
349
353
  end
350
354
 
355
+ def source_pot_file
356
+ po_dir + "#{target_file_base}.source.pot"
357
+ end
358
+
351
359
  def translated_file
352
360
  Pathname(@locale) + @target_file_path
353
361
  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.5
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: []