Skip to content

Commit 4ecf542

Browse files
committed
1 parent b90445b commit 4ecf542

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

Gemfile.devel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "fix/i18n-yaml-inheritance"
1+
gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main"

lib/isodoc/iso/i18n.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ def load_file(fname)
66
File.exist?(f) ? YAML.load_file(f) : {}
77
end
88

9+
alias :local_load_file :load_file
10+
911
def load_yaml1(lang, script)
10-
y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
11-
y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
12+
y = local_load_file("i18n-#{yaml_lang(lang, script)}.yaml")
13+
y.empty? and return local_load_file("i18n-en.yaml").deep_merge(super)
14+
super.deep_merge(y)
1215
end
1316
end
1417
end

lib/metanorma/iso/isodoc.rng

+11-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
these elements; we just want one namespace for any child grammars
1818
of this.
1919
-->
20-
<!-- VERSION v1.2.8 -->
20+
<!-- VERSION v1.2.9 -->
2121
<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">
2222
<include href="reqt.rng"/>
2323
<include href="basicdoc.rng">
@@ -1958,6 +1958,16 @@
19581958
<data type="boolean"/>
19591959
</attribute>
19601960
</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>
19611971
<element name="name">
19621972
<oneOrMore>
19631973
<choice>

0 commit comments

Comments
 (0)