metanorma-un 0.11.4 → 0.11.6

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: c2cd25bae43933dc01cf94b5ec520f8256f6666f1347de87c3e780075b7dd7bb
4
- data.tar.gz: b1daa1f704b95231892d971b57a0c604eedc3b72802fe27c1128e486b4581510
3
+ metadata.gz: 685e31d7fc85ce0a52b12083277ac402cb5b6b83986e475e12b73404f352ef51
4
+ data.tar.gz: 4ee46f06018b888e6278c2f8fe26b1873f2d13bd10d12e8bea6ffdd620f12876
5
5
  SHA512:
6
- metadata.gz: 3a7536d448c4518a056f0bbf0a31b14459a9e188de88ad0b094119588eedb3fd8fd41b5cdcb407c4cab0067a633477625c4c1adbfdaab760142dccc09d9294b3
7
- data.tar.gz: 0a3c9c4a39e5ea3561e532d3abd7b8e33027f65c9d2377fe8b68c5a59b6a405bea1d79d6b1ee8ba70a65a19fe265cb89db16f81d8e54e006e910e58ca81d05cd
6
+ metadata.gz: 2fa2d63b98276010c9096b5807606074d5f9dccad511d1704248d442fc4685a289a208d2e260e0d55e2682915923206a3d8d3ae94bdea5a95051ee8b94c0e042
7
+ data.tar.gz: f0f2c9d4256a130eb5e17c85b2ef53b9df9f933b51989cec546c40537242549f900a12efd4964089e7df68952f550aa4fda34f73a675272d6abcc13f6fa3ed1b
data/Gemfile CHANGED
@@ -4,8 +4,12 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- gemspec
7
+ group :development, :test do
8
+ gem "rspec"
9
+ end
8
10
 
9
11
  if File.exist? "Gemfile.devel"
10
12
  eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
11
13
  end
14
+
15
+ gemspec
@@ -1,9 +1,14 @@
1
1
  module IsoDoc
2
2
  module UN
3
3
  class I18n < IsoDoc::I18n
4
+ def load_file(fname)
5
+ f = File.join(File.dirname(__FILE__), fname)
6
+ File.exist?(f) ? YAML.load_file(f) : {}
7
+ end
8
+
4
9
  def load_yaml1(lang, script)
5
- y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
- super.deep_merge(y)
10
+ y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
11
+ y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
7
12
  end
8
13
  end
9
14
  end
@@ -159,11 +159,12 @@ module IsoDoc
159
159
  ]
160
160
  end
161
161
 
162
- def sequential_admonition_names(clause)
162
+ def sequential_admonition_names(clause, container: false)
163
163
  i = 0
164
164
  clause.xpath(ns(".//admonition")).noblank.each do |t|
165
165
  i += 1 unless t["unnumbered"] == "true"
166
- @anchors[t["id"]] = anchor_struct(i.to_s, nil, @labels["admonition"],
166
+ @anchors[t["id"]] =
167
+ anchor_struct(i.to_s, container ? t : nil, @labels["admonition"],
167
168
  "box", t["unnumbered"])
168
169
  end
169
170
  end
@@ -178,9 +179,9 @@ module IsoDoc
178
179
  end
179
180
  end
180
181
 
181
- def sequential_asset_names(clause)
182
+ def sequential_asset_names(clause, container: false)
182
183
  super
183
- sequential_admonition_names(clause)
184
+ sequential_admonition_names(clause, container: container)
184
185
  end
185
186
 
186
187
  def hierarchical_asset_names(clause, num)
@@ -374,6 +374,16 @@
374
374
  <ref name="image"/>
375
375
  </element>
376
376
  </define>
377
+ <define name="depiction">
378
+ <element name="depiction">
379
+ <optional>
380
+ <attribute name="scope"/>
381
+ </optional>
382
+ <zeroOrMore>
383
+ <ref name="image"/>
384
+ </zeroOrMore>
385
+ </element>
386
+ </define>
377
387
  <define name="NameWithVariants">
378
388
  <element name="primary">
379
389
  <ref name="LocalizedString"/>
@@ -760,6 +770,9 @@
760
770
  <optional>
761
771
  <ref name="validity"/>
762
772
  </optional>
773
+ <optional>
774
+ <ref name="depiction"/>
775
+ </optional>
763
776
  </define>
764
777
  <define name="ReducedBibliographicItem">
765
778
  <optional>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.8 -->
20
+ <!-- VERSION v1.2.9 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -1958,6 +1958,16 @@
1958
1958
  <data type="boolean"/>
1959
1959
  </attribute>
1960
1960
  </optional>
1961
+ <optional>
1962
+ <attribute name="type">
1963
+ <choice>
1964
+ <value>letter</value>
1965
+ <value>symbol</value>
1966
+ <value>formula</value>
1967
+ <value>equation</value>
1968
+ </choice>
1969
+ </attribute>
1970
+ </optional>
1961
1971
  <element name="name">
1962
1972
  <oneOrMore>
1963
1973
  <choice>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.11.4".freeze
3
+ VERSION = "0.11.6".freeze
4
4
  end
5
5
  end
data/metanorma-un.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "roman-numerals"
32
32
  spec.add_dependency "twitter_cldr"
33
33
 
34
- spec.add_dependency "metanorma-standoc", "~> 2.6.3"
34
+ spec.add_dependency "metanorma-standoc", "~> 2.7.0"
35
35
 
36
36
  spec.add_development_dependency "debug"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-20 00:00:00.000000000 Z
11
+ date: 2023-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.6.3
61
+ version: 2.7.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.6.3
68
+ version: 2.7.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: debug
71
71
  requirement: !ruby/object:Gem::Requirement