isodoc 3.6.3 → 3.6.4

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: 9e9e4612fb1a8151ba500dfc561dca2f22434b6b4981b842a3188d1203226a85
4
- data.tar.gz: d7cd554782c88320a59b7bf5d0240c7d81deffdfb4e90861618d01e9f6690c7d
3
+ metadata.gz: bbef10c1b48e76bcdc86a92373281615568abc1071f9cdec9da4573abf977389
4
+ data.tar.gz: 673b18c0b04aab2fdb06430c7aa048b8dd89cf2a9ef8d7dcde05c0593153c832
5
5
  SHA512:
6
- metadata.gz: 3fc09b5a526d031454b9c28f43e1bd1d682120bc9c3014ecc49deb9b9d82728e79f6b0e6410e1b3c5c0913a06499bc6b36b21ee447c8597e37152bd571182a54
7
- data.tar.gz: 8dac1e10327f3b69ec52011f5ab4754726cc0973b31bcfebf594778672b5f487b3caba951bb636df3266959853c00fcdbf1b40940ab6e71885dc2c23c1a554f3
6
+ metadata.gz: 8ca8e03077152b0ad5cd65b7662bb3955d058d7fd8d9e8d64ee9ce9d657290379b7e961ee3acd21726a128fdf307780faa125304f77fdb15b94475d3ac2fee9c
7
+ data.tar.gz: b128cec20abd8b0557497cac5f63784a228d1ff7a28cc0d849e73af99fa6486325ced1d3a9ebd4903e9206840ca10cc58cc74c0ccec31b11e60408b02cecbad2
@@ -109,8 +109,10 @@ module IsoDoc
109
109
  end
110
110
 
111
111
  def note_attrs(node)
112
- attr_code(id: node["id"], class: "Note", style: keep_style(node),
113
- coverpage: node["coverpage"])
112
+ classes = node["type"]&.split(",") || []
113
+ classes << "Note"
114
+ attr_code(id: node["id"], class: classes.join(" "),
115
+ style: keep_style(node), coverpage: node["coverpage"])
114
116
  end
115
117
 
116
118
  def note_parse(node, out)
@@ -74,32 +74,46 @@ module IsoDoc
74
74
  end
75
75
 
76
76
  def admonition1(elem)
77
- if elem["type"] == "box"
78
- admonition_numbered1(elem)
79
- elsif elem["notag"] == "true" || elem.at(ns("./name"))
80
- prefix_name(elem, { label: admonition_delim(elem) }, nil, "name")
81
- else
82
- label = admonition_label(elem, nil)
83
- prefix_name(elem, { label: admonition_delim(elem) }, label, "name")
84
- end
85
- end
86
-
87
- def admonition_numbered1(elem)
88
- label = admonition_label(elem,
77
+ lbl = if elem["type"] == "box"
78
+ admonition_label(elem,
89
79
  @xrefs.anchor(elem["id"] || elem["original-id"],
90
80
  :label, false))
91
- prefix_name(elem, { caption: block_delim }, label, "name")
81
+ elsif elem["notag"] == "true" then nil
82
+ elsif elem.at(ns("./name"))
83
+ admonition_icon(elem)
84
+ else admonition_label(elem, nil)
85
+ end
86
+ prefix_name(elem, admonition_options(elem), lbl, "name")
87
+ end
88
+
89
+ def admonition_options(elem)
90
+ options = { label: admonition_delim(elem) }
91
+ elem["type"] == "box" and options = { caption: block_delim }
92
+ options
92
93
  end
93
94
 
94
95
  def admonition_label(elem, num)
95
96
  lbl = if elem["type"] == "box" then @i18n.box
96
- else @i18n.admonition[elem["type"]]&.upcase
97
+ else @i18n.labels.dig("admonition", elem["type"])&.upcase
97
98
  end
99
+ icon = admonition_icon(elem)
100
+ lbl = (icon || "") + (lbl || "")
98
101
  labelled_autonum(lbl, elem["id"] || elem["original-id"], num)
99
102
  end
100
103
 
101
- def admonition_delim(_elem)
102
- ""
104
+ def admonition_icon(elem)
105
+ icon = elem.document
106
+ .at(ns("//presentation-metadata/admonition-icon-#{elem['type']}"))&.text
107
+ icon ||= @i18n.labels.dig("admonition-icon", elem["type"])
108
+ icon and return "<span class='fmt-admonition-icon'>#{icon}</span>"
109
+ end
110
+
111
+ def admonition_delim(elem)
112
+ if elem["type"] == "box"
113
+ block_delim
114
+ else
115
+ ""
116
+ end
103
117
  end
104
118
 
105
119
  def table(docxml)
@@ -104,7 +104,6 @@ module IsoDoc
104
104
  end
105
105
 
106
106
  def designation_annotate(desgn, name, orig)
107
- # designation_boldface(desgn)
108
107
  designation_expression(desgn, name, orig)
109
108
  designation_field(desgn, name, orig)
110
109
  designation_grammar(desgn, name)
@@ -114,13 +113,6 @@ module IsoDoc
114
113
  desgn.children = name.children
115
114
  end
116
115
 
117
- # KILL
118
- def designation_boldfacex(desgn)
119
- desgn["element"] == "preferred" or return
120
- name = desgn.at(ns("./expression/name | ./letter-symbol/name")) or return
121
- name.children = "<strong>#{name.children}</strong>"
122
- end
123
-
124
116
  def designation_expression(desgn, name, orig)
125
117
  if origname = orig.at(ns("./expression/name"))
126
118
  element = "expression/name"
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.6.3".freeze
2
+ VERSION = "3.6.4".freeze
3
3
  end
@@ -22,14 +22,14 @@ preface: 序文
22
22
  section: セクション
23
23
  clause: 箇条
24
24
  annex: 附属書
25
- appendix: Appendix
25
+ appendix: 付録
26
26
  continued: 続き
27
27
  no_terms_boilerplate: |
28
28
  この規格には,定義する用語はない。
29
29
  internal_terms_boilerplate: |
30
30
  この規格で用いる主な用語及び定義は,次による。
31
31
  norm_with_refs_pref:
32
- 次に掲げる引用規格は,この規格に引用されることによって,その一部又は全部がこの規格の要 求事項を構成している。これらの引用規格のうち,西暦年を付記してあるものは,記載の年の版を適 用し,その後の改正版(追補を含む。)は適用しない。西暦年の付記がない引用規格は,その最新版(追 補を含む。)を適用する。
32
+ 次に掲げる引用規格は,この規格に引用されることによって,その一部又は全部がこの規格の要求事項を構成している。これらの引用規格のうち,西暦年を付記してあるものは,記載の年の版を適用し,その後の改正版(追補を含む。)は適用しない。西暦年の付記がない引用規格は,その最新版(追補を含む。)を適用する。
33
33
  norm_empty_pref:
34
34
  この規格には,引用規格はない。
35
35
  external_terms_boilerplate: |
@@ -59,15 +59,14 @@ para_xref: 段落
59
59
  list: リスト
60
60
  deflist: 定義リスト
61
61
  figure: 図
62
- diagram: Diagram
62
+ diagram: 図式
63
63
  formula: 式
64
64
  inequality: 式
65
65
  table: 表
66
66
  requirement: 要求
67
67
  recommendation: 推奨
68
68
  permission: 許可
69
- box: Box
70
- index: 索引
69
+ box:
71
70
  standard_no: 規格番号
72
71
  number: 番号
73
72
  # Modspec
@@ -84,24 +83,24 @@ example: 例
84
83
  example_xref: 例
85
84
  where: ここで,
86
85
  where_one: ここで,
87
- wholeoftext: Whole of text
88
- draft_label: draft
86
+ wholeoftext: 全文
87
+ draft_label:
89
88
  inform_annex: 参考
90
89
  norm_annex: 規定
91
90
  modified: を変更
92
91
  adapted: 適合しました
93
92
  deprecated: 推奨しない用語
94
93
  source: 出典
95
- and: and
94
+ and: 及び
96
95
  no_identifier: (識別子なし)
97
96
  all_parts: 規格群
98
97
  edition_ordinal: "第{{ var1 }}版"
99
98
  edition_cardinal: "第{{ var1 }}版"
100
99
  edition: 版
101
100
  version: 版
102
- toc_figures: List of figures
103
- toc_tables: List of tables
104
- toc_recommendations: List of recommendations
101
+ toc_figures: 図一覧
102
+ toc_tables: 表一覧
103
+ toc_recommendations: 推奨一覧
105
104
  month_january: 1月
106
105
  month_february: 2月
107
106
  month_march: 3月
@@ -114,7 +113,7 @@ month_september: 9月
114
113
  month_october: 10月
115
114
  month_november: 11月
116
115
  month_december: 12月
117
- obligation: Obligation
116
+ obligation: 義務
118
117
  admonition: {
119
118
  danger: 危険です,
120
119
  warning: 警告,
@@ -124,20 +123,20 @@ admonition: {
124
123
  editorial: 編集者注
125
124
  }
126
125
  title_prefixes:
127
- part: その
128
- amendment: Amendment
129
- corrigendum: Corrigendum
130
- addendum: Addendum
131
- supplement: Supplement
132
- annex: Annex
133
- appendix: Appendix
126
+ part: "第{{ var1 }}部"
127
+ amendment: "追補{{ var1 }}"
128
+ corrigendum: "正誤票{{ var1 }}"
129
+ addendum: "追録{{ var1 }}"
130
+ supplement: "補遺{{ var1 }}"
131
+ annex: "附属書{{ var1 }}"
132
+ appendix: "付録{{ var1 }}"
134
133
  locality: {
135
134
  section: セクション,
136
135
  clause: 箇条,
137
136
  subclause: 細分箇条,
138
137
  part: 部,
139
138
  paragraph: 段落,
140
- chapter: 第章,
139
+ chapter: 章,
141
140
  page: ページ,
142
141
  table: 表,
143
142
  annex: 附属書,
@@ -147,94 +146,39 @@ locality: {
147
146
  formula: 式,
148
147
  }
149
148
  grammar_abbrevs:
150
- masculine: m
151
- feminine: f
152
- neuter: n
153
- common: common
154
- singular: sg
155
- dual: dual
156
- pl: pl
157
- isPreposition: prep
158
- isParticiple: part
159
- isAdjective: adj
160
- isAdverb: adv
161
- isNoun: noun
162
- isVerb: verb
149
+ masculine:
150
+ feminine:
151
+ neuter:
152
+ common:
153
+ singular:
154
+ dual:
155
+ pl:
156
+ isPreposition:
157
+ isParticiple:
158
+ isAdjective:
159
+ isAdverb:
160
+ isNoun:
161
+ isVerb:
163
162
  relatedterms:
164
- deprecates: deprecates
165
- supersedes: supersedes
166
- narrower: narrower
167
- broader: broader
168
- equivalent: equivalent
169
- compare: compare
170
- contrast: contrast
163
+ deprecates: 廃止
164
+ supersedes: 置換
165
+ narrower: 下位語
166
+ broader: 上位語
167
+ equivalent: 等価
168
+ compare: 比較
169
+ contrast: 対比
171
170
  see: 参照
172
- seealso: see also
173
- inflection:
174
- Clause:
175
- sg: Clause
176
- pl: Clauses
177
- Annex:
178
- sg: Annex
179
- pl: Annexes
180
- Appendix:
181
- sg: Appendix
182
- pl: Appendixes
183
- Note:
184
- sg: Note
185
- pl: Notes
186
- "Note % to entry":
187
- sg: Note % to entry
188
- pl: Notes % to entry
189
- List:
190
- sg: List
191
- pl: Lists
192
- Figure:
193
- sg: Figure
194
- pl: Figures
195
- Formula:
196
- sg: Formula
197
- pl: Formulas
198
- Table:
199
- sg: Table
200
- pl: Tables
201
- Requirement:
202
- sg: Requirement
203
- pl: Requirements
204
- Recommendation:
205
- sg: Recommendation
206
- pl: Recommendations
207
- Permission:
208
- sg: Permission
209
- pl: Permissions
210
- Example:
211
- sg: Example
212
- pl: Examples
213
- Part:
214
- sg: Part
215
- pl: Parts
216
- Section:
217
- sg: Section
218
- pl: Sections
219
- Paragraph:
220
- sg: Paragraph
221
- pl: Paragraphs
222
- Chapter:
223
- sg: Chapter
224
- pl: Chapters
225
- Page:
226
- sg: Page
227
- pl: Pages
171
+ seealso: 追加参照
228
172
  doctype_dict:
229
173
  international-standard: 日本産業規格
230
174
  technical-specification: 標準仕様書
231
175
  technical-report: 標準報告書
232
- publicly-available-specification: Publicly Available Specification
233
- international-workshop-agreement: International Workshop Agreement
234
- guide: Guide
176
+ publicly-available-specification: 公開仕様書
177
+ international-workshop-agreement: 国際ワークショップ協定
178
+ guide: 指針
235
179
  amendment: 追補
236
- technical-corrigendum: Technical Corrigendum
237
- directive: Directive
180
+ technical-corrigendum: 技術正誤票
181
+ directive: 指令
238
182
  punct:
239
183
  colon: ":"
240
184
  comma: "、"
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.6.3
4
+ version: 3.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-25 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64