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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 463f69ee3cd8df231fa7b558afa3fdff0213a04619b9141ffd58d145ba9ad799
4
- data.tar.gz: be68264b538433ac5ff334c18c19557743b3aeba46e773943ee93bcb11233d13
3
+ metadata.gz: be0824c3523bcd05d90124be3d8c36b496803edd2322b7128e0e47f759309d25
4
+ data.tar.gz: 65f3c1fc7900217391a1f291ae57323823e8e1f8559e8b135b1e4e7563a3f19b
5
5
  SHA512:
6
- metadata.gz: f2e68aa2f72a5afa9668bf2855a058bcc9d82b67648bcfc35bbe665e9894eea4b30d74c060dad833849c4236604efb24436fdf42f3f4683c2ef187807945a903
7
- data.tar.gz: b9371ae7c68ab965722c9a5b11fb569828deb2a8a113853ab7c54aef09025d9eecd8097aa0cfdaf52216f8bc598b1939b4654441c64b96017448736d39f9ae2c
6
+ metadata.gz: b283ddeb4b4c0045cb8f4da3356093040408949f39e28da7db6c7f6807f3ed21dac4db520631e8db9b61a4cc98dcee4b83bacc06ca489295f2ee10745657f94a
7
+ data.tar.gz: 8394b5b4f72f01819cdff6754a46a281e89685b68f869a1615efc53388f751c43c6b36d3c4ff734fded3a7f9e3ad62b6e282d27c0e203aa88110dde7d2526277
@@ -10,6 +10,4 @@ on:
10
10
 
11
11
  jobs:
12
12
  rake:
13
- uses: metanorma/metanorma-build-scripts/.github/workflows/generic-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
13
+ uses: relaton/support/.github/workflows/rake.yml@master
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
 
@@ -4,7 +4,7 @@ and: و
4
4
  updated: محدث
5
5
  viewed: ينظر
6
6
  version: الإصدار
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: und
4
4
  updated: aktualisiert
5
5
  viewed: angesehen
6
6
  version: Version
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: and
4
4
  updated: updated
5
5
  viewed: viewed
6
6
  version: version
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: y
4
4
  updated: actualizado
5
5
  viewed: visto
6
6
  version: versión
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: et
4
4
  updated: mise à jour
5
5
  viewed: vu
6
6
  version: version
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: и
4
4
  updated: обновлен
5
5
  viewed: просмотрено
6
6
  version: версия
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -4,7 +4,7 @@ and: 和
4
4
  updated: 更新
5
5
  viewed: 看过
6
6
  version: 版本
7
- date:
7
+ date_formats:
8
8
  month_year: yMMMM
9
9
  day_month_year: to_long_s
10
10
  date_time: to_long_s
@@ -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 = i18n_klass(opt["language"], opt["script"])
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.date
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)
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.3.5.1".freeze
3
+ VERSION = "0.3.7".freeze
4
4
  end
5
5
  end
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.5.1
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-03 00:00:00.000000000 Z
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.9
239
+ rubygems_version: 3.3.14
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Rendering of ISO 690 XML