metanorma-ietf 2.1.0 → 2.1.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/ietf/blocks.rb +3 -1
- data/lib/isodoc/ietf/front.rb +13 -8
- data/lib/isodoc/ietf/reqt.rb +5 -0
- data/lib/isodoc/ietf/section.rb +4 -4
- data/lib/metanorma/ietf/processor.rb +4 -0
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e247eb259866b4caae32725e9d508603a2ef5ede6d72fa9558366249f93fa45f
|
4
|
+
data.tar.gz: bfde54f8d5b35adbe3e9f4bfa6d915f49aeac78df5fc0d6bd189d242798d0871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e863071188dfb05b1636eeb9a7307a453e65dfb61497a13e6a33b946e7c1d02c634210c8f2d5083c6f29702607989402cf874e83c92e59bd115142d3ee218f2
|
7
|
+
data.tar.gz: 15a0e135e9985c2a2995b85c8bea4b9bd84f9149874e4fc35a7c476684162a65018a54d73e073639bbea0cbae0b8846e54388b9695d8839bc0ad426699fa0d9f
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
@@ -72,7 +72,9 @@ module IsoDoc::Ietf
|
|
72
72
|
end
|
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
78
|
end
|
77
79
|
|
78
80
|
def note_parse(node, out)
|
data/lib/isodoc/ietf/front.rb
CHANGED
@@ -23,11 +23,16 @@ module IsoDoc::Ietf
|
|
23
23
|
super
|
24
24
|
end
|
25
25
|
|
26
|
+
def output_if_translit(text)
|
27
|
+
return nil if text.nil?
|
28
|
+
text.transliterate != text ? text.transliterate : nil
|
29
|
+
end
|
30
|
+
|
26
31
|
def title(isoxml, front)
|
27
32
|
title = @meta.get[:doctitle] or return
|
28
33
|
front.title title, **attr_code(abbrev: @meta.get[:docabbrev],
|
29
|
-
ascii: @meta.get[:docascii] ||
|
30
|
-
title
|
34
|
+
ascii: (@meta.get[:docascii] ||
|
35
|
+
output_if_translit(title)))
|
31
36
|
end
|
32
37
|
|
33
38
|
def seriesinfo(isoxml, front)
|
@@ -37,7 +42,7 @@ module IsoDoc::Ietf
|
|
37
42
|
|
38
43
|
def seriesinfo_attr(isoxml)
|
39
44
|
attr_code(value: @meta.get[:docnumber] || "",
|
40
|
-
asciiValue: @meta.get[:docnumber]
|
45
|
+
asciiValue: output_if_translit(@meta.get[:docnumber]),
|
41
46
|
status: @meta.get[:stage],
|
42
47
|
stream: isoxml&.at(ns("//bibdata/series[@type = 'stream']/"\
|
43
48
|
"title"))&.text)
|
@@ -82,9 +87,9 @@ module IsoDoc::Ietf
|
|
82
87
|
|
83
88
|
def pers_author_attrs1(ret, full, init, c)
|
84
89
|
full and ret.merge!(attr_code(
|
85
|
-
asciiFullname: full
|
86
|
-
asciiInitials: init
|
87
|
-
asciiSurname: c&.at(ns("./surname"))
|
90
|
+
asciiFullname: output_if_translit(full),
|
91
|
+
asciiInitials: output_if_translit(init),
|
92
|
+
asciiSurname: output_if_translit(c&.at(ns("./surname")))))
|
88
93
|
ret
|
89
94
|
end
|
90
95
|
|
@@ -113,8 +118,8 @@ module IsoDoc::Ietf
|
|
113
118
|
def organization(org, out, show)
|
114
119
|
name = org.at(ns("./name"))&.text
|
115
120
|
out.organization name, **attr_code(
|
116
|
-
showOnFrontPage: show&.text, ascii: name
|
117
|
-
asciiAbbrev: org
|
121
|
+
showOnFrontPage: show&.text, ascii: output_if_translit(name),
|
122
|
+
asciiAbbrev: output_if_translit(org.at(ns("./abbreviation"))),
|
118
123
|
abbrev: org.at(ns("./abbreviation")))
|
119
124
|
end
|
120
125
|
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
module IsoDoc::Ietf
|
2
2
|
class RfcConvert < ::IsoDoc::Convert
|
3
|
+
def recommendation_labels(node)
|
4
|
+
[node.at(ns("./label")), node.at(ns("./title")),
|
5
|
+
@xrefs.anchor(node['id'], :label, false)]
|
6
|
+
end
|
7
|
+
|
3
8
|
def recommendation_name(node, out, type)
|
4
9
|
label, title, lbl = recommendation_labels(node)
|
5
10
|
out.t **{ keepWithNext: "true" } do |b|
|
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -81,11 +81,11 @@ module IsoDoc::Ietf
|
|
81
81
|
|
82
82
|
def series2category(series)
|
83
83
|
case series&.downcase
|
84
|
-
when "standard" then "std"
|
85
|
-
when "informational" then "info"
|
86
|
-
when "experimental" then "exp"
|
84
|
+
when "standard", "std" then "std"
|
85
|
+
when "informational", "info" then "info"
|
86
|
+
when "experimental", "exp" then "exp"
|
87
87
|
when "bcp" then "bcp"
|
88
|
-
when "fyi" then "info"
|
88
|
+
when "fyi", "info" then "info"
|
89
89
|
when "full-standard" then "std"
|
90
90
|
when "historic" then "historic"
|
91
91
|
else
|
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.
|
4
|
+
version: 2.1.1
|
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-
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|