metanorma-bipm 2.6.9 → 2.7.0

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: d3f1182d7c8100e7cdb4c7e35b27e5df664f847af0a2bb5b2250fee2d1d72abd
4
- data.tar.gz: a90b1bfa1d976a0174952f15a3fb2b43d403872e67510bd829bcd5d49b103665
3
+ metadata.gz: 243bb92d777033b554b303bab0f2a4671dd0368197c62f25c5bf728c1ee81860
4
+ data.tar.gz: 22da95ca5d0f70f8f0089306269793f5c9730a60d3cbc3e89f362fef7c1312f6
5
5
  SHA512:
6
- metadata.gz: 249d0ff9f81db67baf9bfacfd3132fc1ec72b01c7ee7a19d42c71b74a79a074fba98c08010ef1930211e99a23f81975d625e9c90a8f7d1feec1e602a31d4bdfd
7
- data.tar.gz: de203eebec4e1c68cd70f635e8cb92a972bf7beaaf29ef269b6ac3cec96e0516171825782a5a33fefad3a459631c9294327be61fbad403b9ccfc46b24f8dbd71
6
+ metadata.gz: ae953bd7af98c52ff5c3666a58aa90c0903db302f656babc0adbb2005ea693ef6260f38c4a75ba2370761abef7b9f7672b4d963c82b5b199301ac1c4652bbf4c
7
+ data.tar.gz: 524d813e92cc86aa321acbfcd657b3c2e78760f176c350c31b816a434cbe702ca6b00aa863528bd62d9370003d7fc64a8f10bae0c175e060653f7d4efd9c40ab
@@ -9,15 +9,38 @@ module IsoDoc
9
9
  Metanorma::Bipm.configuration
10
10
  end
11
11
 
12
- #TOP_ELEMENTS = IsoDoc::Function::ToWordHtml::TOP_ELEMENTS +
13
- #" | //doccontrol[@displayorder]".freeze
14
-
15
12
  def convert1(docxml, filename, dir)
16
13
  @jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/" \
17
14
  "@acronym"))&.value == "JCGM"
18
15
  super
19
16
  end
17
+ =begin
18
+ def update_i18n(i18n)
19
+ #require "debug"; binding.b
20
+ if %w(2019).include?(@docscheme)
21
+ %w(level2_ancillary level3_ancillary level2_ancillary_alt
22
+ level3_ancillary_alt).each do |w|
23
+ i18n_conditional_set(i18n, w, "#{w}_2019")
24
+ end
25
+ end
26
+ i18n.set("annex", i18n.get["level2_ancillary"])
27
+ i18n.set("appendix", i18n.get["level3_ancillary"])
28
+ end
20
29
 
30
+ def convert_i18n_init(docxml)
31
+ #require "debug"; binding.b
32
+ @docscheme =
33
+ docxml.at(ns("//presentation-metadata[name" \
34
+ "[text() = 'document-scheme']]/value"))&.text || "2021"
35
+ super
36
+ update_i18n(@i18n)
37
+ end
38
+
39
+ def i18n_conditional_set(i18n, old, new)
40
+ i18n.get[new] or return
41
+ i18n.set(old, i18n.get[new])
42
+ end
43
+ =end
21
44
  def middle_clause(_docxml)
22
45
  if @jcgm
23
46
  "//clause[parent::sections][not(@type = 'scope')]" \
@@ -31,30 +54,6 @@ module IsoDoc
31
54
  @jcgm ? docxml : super
32
55
  end
33
56
 
34
- # KILL
35
- def error_parsex(node, out)
36
- case node.name
37
- when "blacksquare" then blacksquare_parse(node, out)
38
- else super
39
- end
40
- end
41
-
42
- #KILL
43
- def blacksquare_parse(_node, out)
44
- out << "&#x25a0;"
45
- end
46
-
47
- #def sections_names
48
- #super + %w[doccontrol]
49
- #end
50
-
51
- #def top_element_render(elem, out)
52
- #case elem.name
53
- #when "doccontrol" then doccontrol elem, out
54
- #else super
55
- #end
56
- #end
57
-
58
57
  def table_footnote?(node)
59
58
  super && !node.ancestors.map(&:name).include?("quote")
60
59
  end