jekyll-task-i18n 1.0.3 → 1.0.5

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: 585b7ce7e204ee64a7112c99d6d068f3be8f84861952662a4d852284854510a3
4
- data.tar.gz: cfcfd8c80633017306653540e1103c745b263025f2abcc4128557205801685fe
3
+ metadata.gz: 70be42a58d86e88d1f0a6b5fda69bac024984bfe43b1b2494419acefdc508cbe
4
+ data.tar.gz: 40e16e1e6b3f99e156fece4b8c4feaaf6d8153d52f14dea2903e79014942ffa2
5
5
  SHA512:
6
- metadata.gz: 8de29dcf9f73b51b44c607b48b9fce13d39b8127d73b64b87bcf27d78ac0f0e3f290760156b5fe143b140b8cc8da767dcb3e29e30b9d550df1669b662f7ae221
7
- data.tar.gz: d243fdd45958bd2aad7d16355a9fc8948cf16111d151dfb0423ae1c6c701436f9ddf8c5870c63731040e68dc329e65891114241d1cb9205846a92cdb436140b8
6
+ metadata.gz: 3a9dd14631d1b0ad38574a4a5361440901870225618ad6b9bd6461697370af6bb37a8ec7e09e6166b097d4d4ba2a8cdf760f3468a05bc22eaf081359b03726dc
7
+ data.tar.gz: e8dc1540410346550c6a28caf18667bd5c410e676aa26e2c3e229dea35a0cae8365a4ded44a3f2fef67e4904d44cae003f2baa4fcc47e6df944cfb2f5376ee56
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014 The ruby-gettext project
1
+ # Copyright (C) 2014-2018 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
@@ -45,7 +45,7 @@ Gem::Specification.new do |spec|
45
45
  spec.licenses = ["LGPLv2"]
46
46
  spec.require_paths = ["lib"]
47
47
 
48
- spec.add_runtime_dependency("gettext", ">= 3.1.1")
48
+ spec.add_runtime_dependency("gettext", ">= 3.2.8")
49
49
  spec.add_runtime_dependency("yard")
50
50
 
51
51
  spec.add_development_dependency("rake")
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2015 The ruby-gettext project
1
+ # Copyright (C) 2014-2018 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.3"
20
+ VERSION = "1.0.5"
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
- # Copyright (C) 2014 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,18 +96,28 @@ 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)
105
113
  end
106
114
  unless path.edit_po_file.exist?
107
115
  if path.po_file.exist?
108
- cp(path.po_file.to_s, path.edit_po_file.to_s)
116
+ msgcat("--output", path.edit_po_file.to_s,
117
+ "--update-po-revision-date",
118
+ path.po_file.to_s)
109
119
  else
110
- msginit("--input", path.pot_file.to_s,
120
+ msginit("--input", path.source_pot_file.to_s,
111
121
  "--output", path.edit_po_file.to_s,
112
122
  "--locale", locale)
113
123
  end
@@ -118,13 +128,16 @@ module Jekyll
118
128
  "--sort-by-file",
119
129
  "--no-wrap",
120
130
  path.edit_po_file.to_s,
121
- path.pot_file.to_s)
131
+ path.source_pot_file.to_s)
122
132
  if path.po_file.exist? and path.po_file.mtime > edit_po_file_mtime
123
133
  msgmerge("--output", path.edit_po_file.to_s,
124
134
  "--sort-by-file",
125
135
  "--no-obsolete-entries",
126
136
  path.po_file.to_s,
127
137
  path.edit_po_file.to_s)
138
+ msgcat("--output", path.edit_po_file.to_s,
139
+ "--update-po-revision-date",
140
+ path.edit_po_file.to_s)
128
141
  end
129
142
  if path.all_po_file.exist?
130
143
  msgmerge("--output", path.edit_po_file.to_s,
@@ -133,6 +146,9 @@ module Jekyll
133
146
  "--no-obsolete-entries",
134
147
  path.all_po_file.to_s,
135
148
  path.edit_po_file.to_s)
149
+ msgcat("--output", path.edit_po_file.to_s,
150
+ "--update-po-revision-date",
151
+ path.edit_po_file.to_s)
136
152
  end
137
153
  end
138
154
  end
@@ -176,11 +192,7 @@ module Jekyll
176
192
  "--no-all-comments",
177
193
  "--no-report-warning",
178
194
  "--no-obsolete-entries",
179
- "--remove-header-field=Report-Msgid-Bugs-To",
180
- "--remove-header-field=Last-Translator",
181
- "--remove-header-field=Language-Team",
182
195
  "--remove-header-field=POT-Creation-Date",
183
- "--remove-header-field=PO-Revision-Date",
184
196
  path.edit_po_file.to_s)
185
197
  touch(path.time_stamp_file.to_s)
186
198
  end
@@ -340,6 +352,10 @@ module Jekyll
340
352
  po_dir + "#{target_file_base}.pot"
341
353
  end
342
354
 
355
+ def source_pot_file
356
+ po_dir + "#{target_file_base}.source.pot"
357
+ end
358
+
343
359
  def translated_file
344
360
  Pathname(@locale) + @target_file_path
345
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.3
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
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.1
19
+ version: 3.2.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.1.1
26
+ version: 3.2.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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: []