relaton-render 0.3.5.1 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -3
- data/README.adoc +1 -0
- data/lib/isodoc-yaml/i18n-ar.yaml +1 -1
- data/lib/isodoc-yaml/i18n-de.yaml +1 -1
- data/lib/isodoc-yaml/i18n-en.yaml +1 -1
- data/lib/isodoc-yaml/i18n-es.yaml +1 -1
- data/lib/isodoc-yaml/i18n-fr.yaml +1 -1
- data/lib/isodoc-yaml/i18n-ru.yaml +1 -1
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -1
- data/lib/relaton/render/general/render.rb +8 -5
- data/lib/relaton/render/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be0824c3523bcd05d90124be3d8c36b496803edd2322b7128e0e47f759309d25
|
4
|
+
data.tar.gz: 65f3c1fc7900217391a1f291ae57323823e8e1f8559e8b135b1e4e7563a3f19b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b283ddeb4b4c0045cb8f4da3356093040408949f39e28da7db6c7f6807f3ed21dac4db520631e8db9b61a4cc98dcee4b83bacc06ca489295f2ee10745657f94a
|
7
|
+
data.tar.gz: 8394b5b4f72f01819cdff6754a46a281e89685b68f869a1615efc53388f751c43c6b36d3c4ff734fded3a7f9e3ad62b6e282d27c0e203aa88110dde7d2526277
|
data/.github/workflows/rake.yml
CHANGED
data/README.adoc
CHANGED
@@ -37,6 +37,7 @@ The parameters are:
|
|
37
37
|
`sizetemplate`:: templates for rendering sizes
|
38
38
|
`edition_ordinal`:: override formatting of edition with ordinal
|
39
39
|
`date`:: default date format (from Twitter CLDR)
|
40
|
+
`i18nhash`:: Metanorma internationalisation hash
|
40
41
|
|
41
42
|
== Configuration
|
42
43
|
|
@@ -19,7 +19,6 @@ module Relaton
|
|
19
19
|
root_initalize(options)
|
20
20
|
render_initialize(options)
|
21
21
|
@parse ||= options["parse"]
|
22
|
-
@i18n ||= options["i18n"]
|
23
22
|
end
|
24
23
|
|
25
24
|
def read_config
|
@@ -52,10 +51,14 @@ module Relaton
|
|
52
51
|
def i18n_initialize(opt)
|
53
52
|
@lang = opt["language"]
|
54
53
|
@script = opt["script"]
|
55
|
-
@i18n =
|
54
|
+
@i18n = opt["i18n"] ||
|
55
|
+
i18n_klass(opt["language"], opt["script"], opt["i18nhash"])
|
56
56
|
@edition_ordinal = opt["edition_ordinal"] || @i18n.edition_ordinal
|
57
57
|
@edition = opt["edition"] || @i18n.edition
|
58
|
-
@date = opt["date"] || @i18n.
|
58
|
+
@date = opt["date"] || @i18n.get["date_formats"] ||
|
59
|
+
{ "month_year" => "yMMMM",
|
60
|
+
"day_month_year" => "to_long_s",
|
61
|
+
"date_time" => "to_long_s" }
|
59
62
|
end
|
60
63
|
|
61
64
|
def render_initialize(opt)
|
@@ -91,8 +94,8 @@ module Relaton
|
|
91
94
|
"{{creatornames}}. {{title}}. {{date}}."
|
92
95
|
end
|
93
96
|
|
94
|
-
def i18n_klass(lang = "en", script = "Latn")
|
95
|
-
::IsoDoc::RelatonRenderI18n.new(lang, script)
|
97
|
+
def i18n_klass(lang = "en", script = "Latn", i18nhash = nil)
|
98
|
+
::IsoDoc::RelatonRenderI18n.new(lang, script, i18nhash: i18nhash)
|
96
99
|
end
|
97
100
|
|
98
101
|
def render(bib, embedded: false)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-render
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
236
|
- !ruby/object:Gem::Version
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
|
-
rubygems_version: 3.3.
|
239
|
+
rubygems_version: 3.3.14
|
240
240
|
signing_key:
|
241
241
|
specification_version: 4
|
242
242
|
summary: Rendering of ISO 690 XML
|