relaton-render 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton/render/general/render.rb +7 -5
- data/lib/relaton/render/version.rb +1 -1
- data/relaton-render.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecff36647696036f6f4cb66699ebf76cf395420fbbe69a7399c67545cdf47a8d
|
4
|
+
data.tar.gz: 5a9c9404da6ca40bb41b1dd02d01f253bd7f5aaf6a7df84514e98716880d8841
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 998a52d231fd4053e54e7eb266ab7a351b1e70492b5cfe0c6c258b1493cf8df30b45762b00bae5ec1ab0f7a2e1be6125d066383e255cf160994b9d4ee1b47a7e
|
7
|
+
data.tar.gz: 5370302566a4fd84843d61a509709285a48f9e18e60a778ad7b2d49b5a45a2a81ebd8e10fcd7750efa2e02f33730da5fe18e417926b69088aab8308b8cd7356a
|
@@ -56,13 +56,14 @@ module Relaton
|
|
56
56
|
def i18n_initialize(opt)
|
57
57
|
@lang = opt["language"]
|
58
58
|
@script = opt["script"]
|
59
|
+
@locale = opt["locale"]
|
59
60
|
@i18n = opt["i18n"] ||
|
60
|
-
i18n_klass(
|
61
|
+
i18n_klass(language: @lang, script: @script, locale: @locale,
|
62
|
+
i18nhash: opt["i18nhash"])
|
61
63
|
@edition_ordinal = opt["edition_ordinal"] || @i18n.edition_ordinal
|
62
64
|
@edition = opt["edition"] || @i18n.edition
|
63
65
|
@date = opt["date"] || @i18n.get["date_formats"] ||
|
64
|
-
{ "month_year" => "yMMMM",
|
65
|
-
"day_month_year" => "to_long_s",
|
66
|
+
{ "month_year" => "yMMMM", "day_month_year" => "to_long_s",
|
66
67
|
"date_time" => "to_long_s" }
|
67
68
|
end
|
68
69
|
|
@@ -99,8 +100,9 @@ module Relaton
|
|
99
100
|
"{{creatornames}}. {{title}}. {{date}}."
|
100
101
|
end
|
101
102
|
|
102
|
-
def i18n_klass(
|
103
|
-
::IsoDoc::RelatonRenderI18n.new(
|
103
|
+
def i18n_klass(language: "en", script: "Latn", locale: nil, i18nhash: nil)
|
104
|
+
::IsoDoc::RelatonRenderI18n.new(language, script, locale: locale,
|
105
|
+
i18nhash: i18nhash)
|
104
106
|
end
|
105
107
|
|
106
108
|
def render(bib, embedded: false)
|
data/relaton-render.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
spec.add_development_dependency "simplecov"
|
30
30
|
|
31
|
-
spec.add_dependency "isodoc-i18n"
|
31
|
+
spec.add_dependency "isodoc-i18n", "~> 1.1.0"
|
32
32
|
spec.add_dependency "liquid", "~> 4"
|
33
33
|
spec.add_dependency "nokogiri"
|
34
34
|
spec.add_dependency "relaton-bib", ">= 1.13.0"
|
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.5.
|
4
|
+
version: 0.5.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: 2022-09-
|
11
|
+
date: 2022-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: isodoc-i18n
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.1.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.1.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: liquid
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|