metanorma-ietf 2.1.3 → 2.2.0

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: ea1c57c13cc70de322dae0d520d9643b939a5835975c49cfb64de8dbadad906b
4
- data.tar.gz: 9c34b9675c03e4c35754fa1f3e2826d1f7837521e4d82e9e76c3f0876fbd7c40
3
+ metadata.gz: 64b7510c103e030759b4c5430edf1165dd55859f28a6914f091a8f028400ef95
4
+ data.tar.gz: '088ba7ce77c62226026e0fab41af28429a16623bc6379cc95d99f4bfa1a8fbe9'
5
5
  SHA512:
6
- metadata.gz: 8c38a69f9cdac8106505836f5f95e76c5d03600fba62d2ba3a90021292c794d36ece9e6658a581697cb06c29aa8ebdb083e99d94cbb0155f43ae89787fac9d1f
7
- data.tar.gz: 678ffc85d78c890e304475f9e0e387287399131e1259d7f034980840157dc488f2de0687291faf0b02de3c617098d7f0f0ed616e95f7fe28b77f95d50c4f2bfc
6
+ metadata.gz: c12d417a764debe8f8c4003e88730df92e34168c6fa85ecb322f94f63c7775c5c3d425faf2096b561edc7bd1598e95157a07bca6833acb26e2b7e5903b768ceb
7
+ data.tar.gz: 7117f344165e8150e0acd0fbc397cb73a2ec12e22763c4069d8d05e6f283df5622b998f7ed83eb067730f51e596ed8d9874ced2389e5a8f0d05da286f0bf82d4
@@ -922,6 +922,9 @@
922
922
  <optional>
923
923
  <attribute name="script"/>
924
924
  </optional>
925
+ <optional>
926
+ <attribute name="type"/>
927
+ </optional>
925
928
  <optional>
926
929
  <attribute name="obligation">
927
930
  <choice>
@@ -961,9 +964,6 @@
961
964
  </define>
962
965
  <define name="content-subsection">
963
966
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
967
  <ref name="Content-Section"/>
968
968
  </element>
969
969
  </define>
@@ -992,6 +992,9 @@
992
992
  </choice>
993
993
  </attribute>
994
994
  </optional>
995
+ <optional>
996
+ <attribute name="type"/>
997
+ </optional>
995
998
  <optional>
996
999
  <ref name="section-title"/>
997
1000
  </optional>
@@ -1011,9 +1014,6 @@
1011
1014
  </define>
1012
1015
  <define name="clause">
1013
1016
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1017
  <ref name="Clause-Section"/>
1018
1018
  </element>
1019
1019
  </define>
@@ -1042,6 +1042,9 @@
1042
1042
  </choice>
1043
1043
  </attribute>
1044
1044
  </optional>
1045
+ <optional>
1046
+ <attribute name="type"/>
1047
+ </optional>
1045
1048
  <optional>
1046
1049
  <ref name="section-title"/>
1047
1050
  </optional>
@@ -1180,6 +1183,9 @@
1180
1183
  <optional>
1181
1184
  <attribute name="script"/>
1182
1185
  </optional>
1186
+ <optional>
1187
+ <attribute name="type"/>
1188
+ </optional>
1183
1189
  <optional>
1184
1190
  <attribute name="obligation">
1185
1191
  <choice>
@@ -73,8 +73,8 @@ module IsoDoc::Ietf
73
73
 
74
74
  def note_label(node)
75
75
  n = @xrefs.get[node["id"]]
76
- return l10n("#{@note_lbl}: ") if n.nil? || n[:label].nil? || n[:label].empty?
77
- l10n("#{@note_lbl} #{n[:label]}: ")
76
+ return l10n("#{@i18n.note}: ") if n.nil? || n[:label].nil? || n[:label].empty?
77
+ l10n("#{@i18n.note} #{n[:label]}: ")
78
78
  end
79
79
 
80
80
  def note_parse(node, out)
@@ -98,8 +98,8 @@ module IsoDoc::Ietf
98
98
  def example_label(node, div, name)
99
99
  n = @xrefs.get[node["id"]]
100
100
  div.t **attr_code(anchor: node["id"], keepWithNext: "true") do |p|
101
- lbl = (n.nil? || n[:label].nil? || n[:label].empty?) ? @example_lbl :
102
- l10n("#{@example_lbl} #{n[:label]}")
101
+ lbl = (n.nil? || n[:label].nil? || n[:label].empty?) ? @i18n.example :
102
+ l10n("#{@i18n.example} #{n[:label]}")
103
103
  p << lbl
104
104
  name and !lbl.nil? and p << ": "
105
105
  name and name.children.each { |n| parse(n, p) }
@@ -139,7 +139,7 @@ module IsoDoc::Ietf
139
139
 
140
140
  def formula_where(dl, out)
141
141
  return unless dl
142
- out.t { |p| p << @where_lbl }
142
+ out.t { |p| p << @i18n.where }
143
143
  parse(dl, out)
144
144
  end
145
145
 
@@ -32,7 +32,7 @@ module IsoDoc::Ietf
32
32
  end
33
33
 
34
34
  def recommendation_parse(node, out)
35
- recommendation_name(node, out, @recommendation_lbl)
35
+ recommendation_name(node, out, @i18n.recommendation)
36
36
  recommendation_attributes(node, out)
37
37
  node.children.each do |n|
38
38
  parse(n, out) unless %w(label title).include? n.name
@@ -40,7 +40,7 @@ module IsoDoc::Ietf
40
40
  end
41
41
 
42
42
  def requirement_parse(node, out)
43
- recommendation_name(node, out, @requirement_lbl)
43
+ recommendation_name(node, out, @i18n.requirement)
44
44
  recommendation_attributes(node, out)
45
45
  node.children.each do |n|
46
46
  parse(n, out) unless %w(label title).include? n.name
@@ -48,7 +48,7 @@ module IsoDoc::Ietf
48
48
  end
49
49
 
50
50
  def permission_parse(node, out)
51
- recommendation_name(node, out, @permission_lbl)
51
+ recommendation_name(node, out, @i18n.permission)
52
52
  recommendation_attributes(node, out)
53
53
  node.children.each do |n|
54
54
  parse(n, out) unless %w(label title).include? n.name
@@ -27,12 +27,12 @@ module IsoDoc::Ietf
27
27
  set_pis(docxml, Nokogiri::XML(xml))
28
28
  end
29
29
 
30
- def metadata_init(lang, script, labels)
31
- @meta = Metadata.new(lang, script, labels)
30
+ def metadata_init(lang, script, i18n)
31
+ @meta = Metadata.new(lang, script, i18n)
32
32
  end
33
33
 
34
- def xref_init(lang, script, klass, labels, options)
35
- @xrefs = Xref.new(lang, script, klass, labels, options)
34
+ def xref_init(lang, script, klass, i18n, options)
35
+ @xrefs = Xref.new(lang, script, klass, i18n, options)
36
36
  end
37
37
 
38
38
  def extract_delims(text)
@@ -132,7 +132,7 @@ module IsoDoc::Ietf
132
132
  end
133
133
  end
134
134
 
135
- def clause_parse_title(node, div, c1, out)
135
+ def clause_parse_title(node, div, c1, out, _heading_attrs = {})
136
136
  return unless c1
137
137
  div.name do |n|
138
138
  c1&.children&.each { |c2| parse(c2, n) }
@@ -13,7 +13,7 @@ module IsoDoc::Ietf
13
13
 
14
14
  def deprecated_term_parse(node, out)
15
15
  out.t do |p|
16
- p << l10n("#{@deprecated_lbl}: ")
16
+ p << l10n("#{@i18n.deprecated}: ")
17
17
  node.children.each { |c| parse(c, p) }
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "2.1.3".freeze
3
+ VERSION = "2.2.0".freeze
4
4
  end
5
5
  end
@@ -35,8 +35,8 @@ Gem::Specification.new do |spec|
35
35
  spec.require_paths = ["lib"]
36
36
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
37
37
 
38
- spec.add_dependency "metanorma-standoc", "~> 1.4.0"
39
- spec.add_dependency "isodoc", "~> 1.1.0"
38
+ spec.add_dependency "metanorma-standoc", "~> 1.5.0"
39
+ spec.add_dependency "isodoc", "~> 1.2.0"
40
40
  spec.add_dependency "mathml2asciimath"
41
41
 
42
42
  spec.add_development_dependency "byebug"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.0
19
+ version: 1.5.0
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: 1.4.0
26
+ version: 1.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.0
33
+ version: 1.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.0
40
+ version: 1.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mathml2asciimath
43
43
  requirement: !ruby/object:Gem::Requirement