metanorma-iso 2.3.6 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/base_convert.rb +1 -15
- data/lib/isodoc/iso/html/style-human.css +4 -0
- data/lib/isodoc/iso/html/style-iso.css +4 -0
- data/lib/isodoc/iso/html_convert.rb +4 -3
- data/lib/isodoc/iso/i18n-ja.yaml +39 -0
- data/lib/isodoc/iso/i18n.rb +6 -1
- data/lib/isodoc/iso/iso.amendment.xsl +551 -104
- data/lib/isodoc/iso/iso.international-standard.xsl +551 -104
- data/lib/isodoc/iso/metadata.rb +3 -3
- data/lib/isodoc/iso/presentation_xml_convert.rb +16 -0
- data/lib/isodoc/iso/sections.rb +6 -6
- data/lib/isodoc/iso/word_cleanup.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +1 -1
- data/lib/metanorma/iso/cleanup.rb +8 -10
- data/lib/metanorma/iso/isodoc.rng +46 -296
- data/lib/metanorma/iso/isostandard.rng +1 -8
- data/lib/metanorma/iso/validate.rb +5 -4
- data/lib/metanorma/iso/validate_list.rb +3 -1
- data/lib/metanorma/iso/validate_requirements.rb +1 -0
- data/lib/metanorma/iso/validate_section.rb +12 -12
- data/lib/metanorma/iso/validate_style.rb +8 -8
- data/lib/metanorma/iso/validate_title.rb +5 -4
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f76b4a2d9cc268099b20ca2fa32965d1baa2573dbd696170412ba717ae726b
|
4
|
+
data.tar.gz: 4d7c46a0cedf41d5466030d6e4e5ea8956cdce2081d4d24be581eafae3a71c4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1651fd7ed1c7216292a542dd4a1e5be937807afe1728675633287e507100b0c9979fd58afb682e6ba271d0021313ef1e92f04dc8a14f6d9ad2778fc6cd7eed2a
|
7
|
+
data.tar.gz: 5c195c5207ca60ea89789d9ba82723788f01e85ac9e576d03d27c2449a2fe6ee1bf2fd479809a7813865821e1107b257cc64cdf0f7bb6e59603696602bc30b28
|
@@ -86,20 +86,6 @@ module IsoDoc
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
def formula_where(dlist, out)
|
90
|
-
return if dlist.nil?
|
91
|
-
return super unless dlist.xpath(ns("./dt"))&.size == 1 &&
|
92
|
-
dlist.at(ns("./dd"))&.elements&.size == 1 &&
|
93
|
-
dlist.at(ns("./dd/p"))
|
94
|
-
|
95
|
-
out.span class: "zzMoveToFollowing" do |s|
|
96
|
-
s << "#{@i18n.where} "
|
97
|
-
dlist.at(ns("./dt")).children.each { |n| parse(n, s) }
|
98
|
-
s << " "
|
99
|
-
end
|
100
|
-
parse(dlist.at(ns("./dd/p")), out)
|
101
|
-
end
|
102
|
-
|
103
89
|
def admonition_parse(node, out)
|
104
90
|
type = node["type"]
|
105
91
|
name = admonition_name(node, type)
|
@@ -168,7 +154,7 @@ module IsoDoc
|
|
168
154
|
class: clause.name == "definitions" ? "Symbols" : nil,
|
169
155
|
) do |div|
|
170
156
|
num = num + 1
|
171
|
-
clause_name(
|
157
|
+
clause_name(clause, clause&.at(ns("./title")), div, nil)
|
172
158
|
clause.elements.each do |e|
|
173
159
|
parse(e, div) unless %w{title source}.include? e.name
|
174
160
|
end
|
@@ -61,6 +61,7 @@ module IsoDoc
|
|
61
61
|
content = header.at("./following-sibling::p" \
|
62
62
|
"[@class = 'variant-title-toc']") || header
|
63
63
|
if level == "h1" &&
|
64
|
+
header.parent.name != "main" &&
|
64
65
|
header.parent.at(".//h2#{toc_exclude_class}")
|
65
66
|
<<~HDR
|
66
67
|
<li class="#{level}"><div class="collapse-group"><a href="##{header['id']}">#{header_strip(content)}</a>
|
@@ -83,9 +84,9 @@ module IsoDoc
|
|
83
84
|
def middle(isoxml, out)
|
84
85
|
middle_title(isoxml, out)
|
85
86
|
middle_admonitions(isoxml, out)
|
86
|
-
|
87
|
-
|
88
|
-
clause_etc isoxml, out,
|
87
|
+
scope isoxml, out, 0
|
88
|
+
norm_ref isoxml, out, 0
|
89
|
+
clause_etc isoxml, out, 0
|
89
90
|
annex isoxml, out
|
90
91
|
bibliography isoxml, out
|
91
92
|
indexsect isoxml, out
|
@@ -0,0 +1,39 @@
|
|
1
|
+
stage_dict:
|
2
|
+
"00": Preliminary work item
|
3
|
+
"10": New work item proposal
|
4
|
+
"20": Working draft
|
5
|
+
"30": Committee draft
|
6
|
+
"40":
|
7
|
+
international-standard: Draft International Standard
|
8
|
+
technical-specification: Draft Technical Specification
|
9
|
+
technical-report: Draft Technical Report
|
10
|
+
publicly-available-specification: Draft Publicly Available Specification
|
11
|
+
international-workshop-agreement: Draft International Workshop Agreement
|
12
|
+
guide: Draft Guide
|
13
|
+
amendment: Draft Amendment
|
14
|
+
technical-corrigendum: Draft Technical Corrigendum
|
15
|
+
directive: Draft Directive
|
16
|
+
"50":
|
17
|
+
international-standard: Final Draft International Standard
|
18
|
+
technical-specification: Final Draft Technical Specification
|
19
|
+
technical-report: Final Draft Technical Report
|
20
|
+
publicly-available-specification: Final Draft Publicly Available Specification
|
21
|
+
international-workshop-agreement: Final Draft International Workshop Agreement
|
22
|
+
guide: Final Draft Guide
|
23
|
+
amendment: Final Draft Amendment
|
24
|
+
technical-corrigendum: Final Draft Technical Corrigendum
|
25
|
+
directive: Final Draft Directive
|
26
|
+
"60":
|
27
|
+
international-standard: International Standard
|
28
|
+
technical-specification: Technical Specification
|
29
|
+
technical-report: Technical Report
|
30
|
+
publicly-available-specification: Publicly Available Specification
|
31
|
+
international-workshop-agreement: International Workshop Agreement
|
32
|
+
guide: Guide
|
33
|
+
amendment: Amendment
|
34
|
+
technical-corrigendum: Technical Corrigendum
|
35
|
+
directive: Directive
|
36
|
+
"90": Review
|
37
|
+
"95": Withdrawal
|
38
|
+
|
39
|
+
|
data/lib/isodoc/iso/i18n.rb
CHANGED
@@ -2,13 +2,18 @@ module IsoDoc
|
|
2
2
|
module Iso
|
3
3
|
class I18n < IsoDoc::I18n
|
4
4
|
def load_file(fname)
|
5
|
-
YAML.load_file(File.join(File.dirname(__FILE__), fname))
|
5
|
+
YAML.load_file(File.join(File.dirname(__FILE__), fname)) ||
|
6
|
+
{}
|
6
7
|
end
|
7
8
|
|
9
|
+
# all gems inheriting from ISO need to be represented here,
|
10
|
+
# even if the file is empty
|
11
|
+
# e.g. JA for metanorma-jis
|
8
12
|
def load_yaml1(lang, script)
|
9
13
|
y = if lang == "en" then load_file("i18n-en.yaml")
|
10
14
|
elsif lang == "fr" then load_file("i18n-fr.yaml")
|
11
15
|
elsif lang == "ru" then load_file("i18n-ru.yaml")
|
16
|
+
elsif lang == "ja" then load_file("i18n-ja.yaml")
|
12
17
|
elsif lang == "zh" && script == "Hans"
|
13
18
|
load_file("i18n-zh-Hans.yaml")
|
14
19
|
else load_file("i18n-en.yaml")
|