isodoc 3.2.7 → 3.3.1
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 +4 -4
- data/isodoc.gemspec +1 -1
- data/lib/isodoc/convert.rb +3 -2
- data/lib/isodoc/function/terms.rb +6 -0
- data/lib/isodoc/function/to_word_html.rb +1 -0
- data/lib/isodoc/init.rb +5 -4
- data/lib/isodoc/metadata.rb +4 -3
- data/lib/isodoc/presentation_function/autonum.rb +2 -2
- data/lib/isodoc/presentation_function/bibdata.rb +1 -0
- data/lib/isodoc/presentation_function/block.rb +20 -7
- data/lib/isodoc/presentation_function/concepts.rb +0 -148
- data/lib/isodoc/presentation_function/designations.rb +158 -0
- data/lib/isodoc/presentation_function/docid.rb +5 -3
- data/lib/isodoc/presentation_function/erefs.rb +17 -113
- data/lib/isodoc/presentation_function/erefs_locality.rb +113 -0
- data/lib/isodoc/presentation_function/image.rb +1 -1
- data/lib/isodoc/presentation_function/list.rb +14 -1
- data/lib/isodoc/presentation_function/refs.rb +2 -1
- data/lib/isodoc/presentation_function/reqt.rb +1 -1
- data/lib/isodoc/presentation_function/terms.rb +19 -8
- data/lib/isodoc/presentation_function/xrefs.rb +10 -6
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_anchor.rb +1 -2
- data/lib/isodoc/xref/xref_gen.rb +0 -1
- data/lib/isodoc/xref/xref_gen_seq.rb +27 -30
- data/lib/isodoc/xref/xref_util.rb +6 -4
- data/lib/isodoc/xref.rb +9 -6
- data/lib/isodoc-yaml/i18n-ja.yaml +25 -3
- data/lib/isodoc-yaml/i18n-ko.yaml +22 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +24 -2
- data/lib/isodoc-yaml/i18n-zh-Hant.yaml +22 -0
- metadata +8 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
module Enumerable
|
|
2
2
|
def noblank
|
|
3
3
|
reject do |n|
|
|
4
|
-
n["id"].nil? || n["id"].empty?
|
|
4
|
+
(n["id"].nil? || n["id"].empty?) &&
|
|
5
|
+
# deal with possible temporary swap of id to original-id
|
|
6
|
+
(n["original-id"].nil? || n["original-id"].empty?)
|
|
5
7
|
end
|
|
6
8
|
end
|
|
7
9
|
end
|
|
@@ -122,7 +124,7 @@ module IsoDoc
|
|
|
122
124
|
# leave alone, else wrap in semx
|
|
123
125
|
def semx(node, label, element = "autonum")
|
|
124
126
|
label = label.to_s
|
|
125
|
-
id = node["id"] || node[:id]
|
|
127
|
+
id = node["id"] || node[:id] || node["original-id"]
|
|
126
128
|
/<semx element='[^']+' source='#{id}'/.match?(label) and return label
|
|
127
129
|
l = stripsemx(label)
|
|
128
130
|
%(<semx element='#{element}' source='#{id}'>#{l}</semx>)
|
|
@@ -136,7 +138,7 @@ module IsoDoc
|
|
|
136
138
|
|
|
137
139
|
def delim_wrap(delim, klass = "fmt-autonum-delim")
|
|
138
140
|
delim.blank? and return ""
|
|
139
|
-
"<span class='#{klass}'>#{delim}</span>"
|
|
141
|
+
"<span class='#{klass}'><esc>#{delim}</esc></span>"
|
|
140
142
|
end
|
|
141
143
|
|
|
142
144
|
def stripsemx(elem)
|
|
@@ -153,7 +155,7 @@ module IsoDoc
|
|
|
153
155
|
|
|
154
156
|
def labelled_autonum(label, autonum)
|
|
155
157
|
label.blank? and return autonum
|
|
156
|
-
|
|
158
|
+
"<span class='fmt-element-name'>#{label}</span> #{autonum}"
|
|
157
159
|
end
|
|
158
160
|
|
|
159
161
|
def increment_label(elems, node, counter, increment: true)
|
data/lib/isodoc/xref.rb
CHANGED
|
@@ -78,11 +78,13 @@ module IsoDoc
|
|
|
78
78
|
@parse_settings = {}
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
def localise_anchors
|
|
81
|
+
def localise_anchors(type = nil)
|
|
82
82
|
@anchors.each_value do |v|
|
|
83
|
-
v[:
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
type && v[:type] != type and next
|
|
84
|
+
%i(label value xref xref_bare modspec).each do |t|
|
|
85
|
+
v[t] && !v[t].empty? or next
|
|
86
|
+
v[t] = @i18n.l10n(v[t])
|
|
87
|
+
end
|
|
86
88
|
end
|
|
87
89
|
end
|
|
88
90
|
|
|
@@ -90,8 +92,9 @@ module IsoDoc
|
|
|
90
92
|
Common::ns(xpath)
|
|
91
93
|
end
|
|
92
94
|
|
|
93
|
-
def l10n(
|
|
94
|
-
|
|
95
|
+
def l10n(expr, lang = @lang, script = @script, opt = {})
|
|
96
|
+
opt[:locale] ||= @locale
|
|
97
|
+
@i18n.l10n(expr, lang, script, opt)
|
|
95
98
|
end
|
|
96
99
|
|
|
97
100
|
include ::IsoDoc::XrefGen::Util
|
|
@@ -39,9 +39,9 @@ internal_external_terms_boilerplate: |
|
|
|
39
39
|
no_information_available: "[情報はありません]"
|
|
40
40
|
term_defined_in: "(%)"
|
|
41
41
|
binary_and: "%1 <conn>及び</conn> %2"
|
|
42
|
-
multiple_and: "%1<enum-comma
|
|
42
|
+
multiple_and: "%1<enum-comma>#{ self.punct['enum-comma'] }</enum-comma>%2"
|
|
43
43
|
binary_or: "%1 <conn>または</conn> %2"
|
|
44
|
-
multiple_or: "%1<enum-comma
|
|
44
|
+
multiple_or: "%1<enum-comma>#{ self.punct['enum-comma'] }</enum-comma> <conn>または</conn> %2"
|
|
45
45
|
chain_and: "%1 <conn>及び</conn> %2"
|
|
46
46
|
chain_or: "%1 <conn>または</conn> %2"
|
|
47
47
|
chain_from: "%1 <conn>から</conn> %2"
|
|
@@ -96,7 +96,6 @@ no_identifier: (識別子なし)
|
|
|
96
96
|
all_parts: 規格群
|
|
97
97
|
edition_ordinal: "第{{ var1 }}版"
|
|
98
98
|
edition: 版
|
|
99
|
-
version: version
|
|
100
99
|
toc_figures: List of figures
|
|
101
100
|
toc_tables: List of tables
|
|
102
101
|
toc_recommendations: List of recommendations
|
|
@@ -225,3 +224,26 @@ doctype_dict:
|
|
|
225
224
|
amendment: 追補
|
|
226
225
|
technical-corrigendum: Technical Corrigendum
|
|
227
226
|
directive: Directive
|
|
227
|
+
punct:
|
|
228
|
+
colon: ":"
|
|
229
|
+
comma: "、"
|
|
230
|
+
enum-comma: "、"
|
|
231
|
+
semicolon: ";"
|
|
232
|
+
period: "。"
|
|
233
|
+
close-paren: ")"
|
|
234
|
+
open-paren: "("
|
|
235
|
+
close-bracket: "]"
|
|
236
|
+
open-bracket: "["
|
|
237
|
+
question-mark: "?"
|
|
238
|
+
exclamation-mark: "!"
|
|
239
|
+
emphasis-mark: •
|
|
240
|
+
em-dash: ⸺
|
|
241
|
+
en-dash: "〜"
|
|
242
|
+
number-en-dash: "〜"
|
|
243
|
+
open-quote: "「"
|
|
244
|
+
close-quote: "」"
|
|
245
|
+
open-nested-quote: "『"
|
|
246
|
+
close-nested-quote: "』"
|
|
247
|
+
ellipse: ⋯⋯
|
|
248
|
+
cjk-latin-separator: " "
|
|
249
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
punct:
|
|
2
|
+
colon: ":"
|
|
3
|
+
comma: ","
|
|
4
|
+
enum-comma: ","
|
|
5
|
+
semicolon: ";"
|
|
6
|
+
period: "."
|
|
7
|
+
close-paren: ")"
|
|
8
|
+
open-paren: "("
|
|
9
|
+
close-bracket: "]"
|
|
10
|
+
open-bracket: "["
|
|
11
|
+
question-mark: "?"
|
|
12
|
+
exclamation-mark: "!"
|
|
13
|
+
emphasis-mark: •
|
|
14
|
+
em-dash: ⸺
|
|
15
|
+
en-dash: "–"
|
|
16
|
+
number-en-dash: "〜"
|
|
17
|
+
open-quote: "“"
|
|
18
|
+
close-quote: "”"
|
|
19
|
+
open-nested-quote: "’"
|
|
20
|
+
close-nested-quote: "’"
|
|
21
|
+
ellipse: ⋯⋯
|
|
22
|
+
|
|
@@ -41,9 +41,9 @@ internal_external_terms_boilerplate: |
|
|
|
41
41
|
no_information_available: "[无资料]"
|
|
42
42
|
term_defined_in: "(%)"
|
|
43
43
|
binary_and: "%1<conn>和</conn>%2"
|
|
44
|
-
multiple_and: "%1<enum-comma
|
|
44
|
+
multiple_and: "%1<enum-comma>#{ self.punct['enum-comma'] }</enum-comma><conn>和</conn>%2"
|
|
45
45
|
binary_or: "%1<conn>或</conn>%2"
|
|
46
|
-
multiple_or: "%1<enum-comma
|
|
46
|
+
multiple_or: "%1<enum-comma>#{ self.punct['enum-comma'] }</enum-comma><conn>或</conn>%2"
|
|
47
47
|
chain_and: "%1<conn>和</conn>%2"
|
|
48
48
|
chain_or: "%1<conn>或</conn>%2"
|
|
49
49
|
chain_from: "%1<conn>从</conn>%2"
|
|
@@ -147,4 +147,26 @@ relatedterms:
|
|
|
147
147
|
contrast: 对比
|
|
148
148
|
see: 见
|
|
149
149
|
seealso: 参见
|
|
150
|
+
punct:
|
|
151
|
+
colon: ":"
|
|
152
|
+
comma: ","
|
|
153
|
+
enum-comma: "、"
|
|
154
|
+
semicolon: ";"
|
|
155
|
+
period: "。"
|
|
156
|
+
close-paren: ")"
|
|
157
|
+
open-paren: "("
|
|
158
|
+
close-bracket: "]"
|
|
159
|
+
open-bracket: "["
|
|
160
|
+
question-mark: "?"
|
|
161
|
+
exclamation-mark: "!"
|
|
162
|
+
emphasis-mark: •
|
|
163
|
+
em-dash: ⸺
|
|
164
|
+
en-dash: "–"
|
|
165
|
+
number-en-dash: "〜"
|
|
166
|
+
open-quote: "“"
|
|
167
|
+
close-quote: "”"
|
|
168
|
+
open-nested-quote: "’"
|
|
169
|
+
close-nested-quote: "’"
|
|
170
|
+
ellipse: ⋯⋯
|
|
171
|
+
cjk-latin-separator: ""
|
|
150
172
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
punct:
|
|
2
|
+
colon: ":"
|
|
3
|
+
comma: ","
|
|
4
|
+
enum-comma: "、"
|
|
5
|
+
semicolon: ";"
|
|
6
|
+
period: "。"
|
|
7
|
+
close-paren: ")"
|
|
8
|
+
open-paren: "("
|
|
9
|
+
close-bracket: "]"
|
|
10
|
+
open-bracket: "["
|
|
11
|
+
question-mark: "?"
|
|
12
|
+
exclamation-mark: "!"
|
|
13
|
+
emphasis-mark: •
|
|
14
|
+
em-dash: ⸺
|
|
15
|
+
en-dash: "–"
|
|
16
|
+
number-en-dash: "〜"
|
|
17
|
+
open-quote: "「"
|
|
18
|
+
close-quote: "」"
|
|
19
|
+
open-nested-quote: "『"
|
|
20
|
+
close-nested-quote: "』"
|
|
21
|
+
ellipse: ⋯⋯
|
|
22
|
+
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: isodoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-10-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.
|
|
89
|
+
version: 0.10.0
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.
|
|
96
|
+
version: 0.10.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: roman-numerals
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -372,8 +372,10 @@ files:
|
|
|
372
372
|
- lib/isodoc-yaml/i18n-es.yaml
|
|
373
373
|
- lib/isodoc-yaml/i18n-fr.yaml
|
|
374
374
|
- lib/isodoc-yaml/i18n-ja.yaml
|
|
375
|
+
- lib/isodoc-yaml/i18n-ko.yaml
|
|
375
376
|
- lib/isodoc-yaml/i18n-ru.yaml
|
|
376
377
|
- lib/isodoc-yaml/i18n-zh-Hans.yaml
|
|
378
|
+
- lib/isodoc-yaml/i18n-zh-Hant.yaml
|
|
377
379
|
- lib/isodoc.rb
|
|
378
380
|
- lib/isodoc/base_style/all.css
|
|
379
381
|
- lib/isodoc/base_style/all.scss
|
|
@@ -440,8 +442,10 @@ files:
|
|
|
440
442
|
- lib/isodoc/presentation_function/block.rb
|
|
441
443
|
- lib/isodoc/presentation_function/cleanup.rb
|
|
442
444
|
- lib/isodoc/presentation_function/concepts.rb
|
|
445
|
+
- lib/isodoc/presentation_function/designations.rb
|
|
443
446
|
- lib/isodoc/presentation_function/docid.rb
|
|
444
447
|
- lib/isodoc/presentation_function/erefs.rb
|
|
448
|
+
- lib/isodoc/presentation_function/erefs_locality.rb
|
|
445
449
|
- lib/isodoc/presentation_function/footnotes.rb
|
|
446
450
|
- lib/isodoc/presentation_function/ids.rb
|
|
447
451
|
- lib/isodoc/presentation_function/image.rb
|