relaton-render 0.3.6.1 → 0.3.9

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: 878e2dbeb1c5571bfc619872e1c195baa08095cea46dbf5ee26d67e1aad2185d
4
- data.tar.gz: 17c6d2fd34334f23d4c2fe9e8dea4525ed15923b3574e189fdd4c1df3b0e357b
3
+ metadata.gz: 996ff1407f710b0195189008ac136236c636591071f5b1b6a93117d63f9bebda
4
+ data.tar.gz: 538d2fb64f5ab0c9bcebf81dc0ae718199ee380bb882177a6ddfb064d7abe03b
5
5
  SHA512:
6
- metadata.gz: 541bd02b23d5b02fcc4369e19977de9abc4c40fe41f990bb2b6d23f5dec5dc05501ef40d2eb43da1c04083a8ff7cb71c9b7d059f5903172f6f457adc36ec3f37
7
- data.tar.gz: 351b500e32b7a09d561f21591e675097477e7b2d7b08e20ccf3a6924c29b108de8e698e8430a95242c2a4c4a2bc5271ecc7da5c59d40f136a7cb50307fe7414f
6
+ metadata.gz: 29448a51ba2bef275849506b3658e31eaa742514295b33d0ca0a9d4e9a2dabe30b0e83fc7570312a498c8fedbefe76ca98c7a660c54eea448128fa2d8f78d527
7
+ data.tar.gz: 70d0b1a5705983207fa485d146a25534a02e403b3d8c7720142f22bab38690d26d6f7eb2ed5dc8d53d51b80e6c15f3038fe8a95a0249b3144a54c07cb586856c
@@ -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
@@ -223,11 +223,11 @@ The extent of a bibliographic item may be expressed differently depending on the
223
223
 
224
224
  To capture this, a separate template is supplied under `extenttemplate` for each bibliographic item type. For those types where none is supplied, the template given for `misc` is used as the default.
225
225
 
226
- The template draws on the defined types of locality of extents; the most common of these is `page` and `volume`. Locality types are the fields used in the Liquid templates; for example:
226
+ The template draws on the defined types of locality of extents; the most common of these is `volume`, `issue` (within volume; "number" for journals), and `page`. Locality types are the fields used in the Liquid templates; for example:
227
227
 
228
228
  ....
229
229
  {
230
- article: "{{ volume_raw }}: {{ page_raw }}"
230
+ article: "{{ volume_raw }}|({{ issue_raw }}) : {{ page_raw }}"
231
231
  misc: "{{ volume }}, {{ page }}"
232
232
  }
233
233
  ....
@@ -237,7 +237,7 @@ The internationalisation files define a singular and a plural version of the loc
237
237
  * The plural label is always used if the extent is a range (with a `<from>` and `<to>`).
238
238
  * The singular label is used if the extent is not a range (_pp. 2–4_ vs. _p. 3_).
239
239
  * The internationalisation files include a slot where the number or number range is inserted, indicated by `%`, since this varies by language. (For instance, English has `pp. %`, whereas Chinese has `第%页`.)
240
- * The number of the volume or page, without accompanying labels, is given in `volume_raw` and `page_raw`.
240
+ * The number of the volume, issue/number, or page, without accompanying labels, is given in `volume_raw`, `issue_raw`, and `page_raw`.
241
241
 
242
242
  === Size template
243
243
 
@@ -252,6 +252,8 @@ The template draws on the defined types of locality of extents; the following ar
252
252
 
253
253
  | volume | ./medium/size[@type = 'volume'] | With internationalisation of label
254
254
  | volume_raw | ./medium/size[@type = 'volume'] |
255
+ | issue | ./medium/size[@type = 'issue'] | With internationalisation of label
256
+ | issue_raw | ./medium/size[@type = 'issue'] |
255
257
  | page | ./medium/size[@type = 'page'] | With internationalisation of label
256
258
  | page_raw | ./medium/size[@type = 'page'] |
257
259
  | data | ./medium/size[@type = 'data'] | Unit of size is included in value
@@ -23,6 +23,9 @@ extent:
23
23
  volume:
24
24
  sg: "% المجلد"
25
25
  pl: "% المجلدين"
26
+ issue:
27
+ sg: "% عدد"
28
+ pl: "% عدد"
26
29
  size:
27
30
  page:
28
31
  sg: "ص؜ %"
@@ -30,6 +33,9 @@ size:
30
33
  volume:
31
34
  sg: "المجلد %"
32
35
  pl: "المجلدين %"
36
+ issue:
37
+ sg: "% عدد"
38
+ pl: "% عدد"
33
39
  inflection:
34
40
  الطبعة؜:
35
41
  gender: f
@@ -22,6 +22,9 @@ extent:
22
22
  volume:
23
23
  sg: "Bd. %"
24
24
  pl: "Bde. %"
25
+ issue:
26
+ sg: "Nr. %"
27
+ pl: "Nr. %"
25
28
  size:
26
29
  page:
27
30
  sg: "% S."
@@ -29,6 +32,9 @@ size:
29
32
  volume:
30
33
  sg: "% Bd."
31
34
  pl: "% Bde."
35
+ issue:
36
+ sg: "% Nr."
37
+ pl: "% Nr."
32
38
  inflection:
33
39
  Auflage:
34
40
  gender: f
@@ -23,6 +23,9 @@ extent:
23
23
  volume:
24
24
  sg: "vol. %"
25
25
  pl: "vols. %"
26
+ issue:
27
+ sg: "no. %"
28
+ pl: "nos. %"
26
29
  size:
27
30
  page:
28
31
  sg: "% p."
@@ -30,4 +33,6 @@ size:
30
33
  volume:
31
34
  sg: "% vol."
32
35
  pl: "% vols."
33
-
36
+ issue:
37
+ sg: "% no."
38
+ pl: "% nos."
@@ -25,6 +25,9 @@ extent:
25
25
  volume:
26
26
  sg: "vol. %"
27
27
  pl: "vols. %"
28
+ issue:
29
+ sg: "núm. %"
30
+ pl: "núms. %"
28
31
  size:
29
32
  page:
30
33
  sg: "% pág."
@@ -32,6 +35,10 @@ size:
32
35
  volume:
33
36
  sg: "% vol."
34
37
  pl: "% vols."
38
+ issue:
39
+ sg: "% núm."
40
+ pl: "% núms."
41
+
35
42
  inflection:
36
43
  edición:
37
44
  gender: f
@@ -27,6 +27,9 @@ extent:
27
27
  volume:
28
28
  sg: "vol. %"
29
29
  pl: "vol. %"
30
+ issue:
31
+ sg: "nᵒ %"
32
+ pl: "nᵒˢ %"
30
33
  size:
31
34
  page:
32
35
  sg: "% p."
@@ -34,6 +37,9 @@ size:
34
37
  volume:
35
38
  sg: "% vol."
36
39
  pl: "% vol."
40
+ issue:
41
+ sg: "% nᵒ"
42
+ pl: "% nᵒˢ"
37
43
  inflection:
38
44
  édition:
39
45
  gender: f
@@ -29,6 +29,10 @@ extent:
29
29
  volume:
30
30
  sg: "т. %"
31
31
  pl: "тт. %"
32
+ issue:
33
+ sg: "шт. %"
34
+ pl: "шт. %"
35
+
32
36
  size:
33
37
  page:
34
38
  sg: "% стр."
@@ -36,6 +40,9 @@ size:
36
40
  volume:
37
41
  sg: "% т."
38
42
  pl: "% тт."
43
+ issue:
44
+ sg: "% шт."
45
+ pl: "% шт."
39
46
  inflection:
40
47
  издание:
41
48
  gender: n
@@ -23,6 +23,9 @@ extent:
23
23
  volume:
24
24
  sg: "第%卷"
25
25
  pl: "第%卷"
26
+ issue:
27
+ sg: "第%期"
28
+ pl: "第%期"
26
29
  size:
27
30
  page:
28
31
  sg: "%页"
@@ -30,3 +33,6 @@ size:
30
33
  volume:
31
34
  sg: "%卷"
32
35
  pl: "%卷"
36
+ issue:
37
+ sg: "%期"
38
+ pl: "%期"
@@ -133,7 +133,7 @@ module Relaton
133
133
  end
134
134
 
135
135
  def extentformat1(key, val, hash, norm_hash)
136
- if %i(volume page).include?(key)
136
+ if %i(volume issue page).include?(key)
137
137
  hash["#{key}_raw".to_sym] = norm_hash[key]
138
138
  hash[key] = pagevolformat(norm_hash[key], val, key.to_s, false)
139
139
  end
@@ -164,6 +164,9 @@ module Relaton
164
164
  when "volume"
165
165
  hash[:volume_raw] = val
166
166
  hash[:volume] = pagevolformat(val, nil, "volume", true)
167
+ when "issue"
168
+ hash[:issue_raw] = val
169
+ hash[:issue] = pagevolformat(val, nil, "issue", true)
167
170
  when "page"
168
171
  hash[:page_raw] = val
169
172
  hash[:page] = pagevolformat(val, nil, "page", true)
@@ -15,12 +15,12 @@ extenttemplate:
15
15
  standard: book
16
16
  techreport: book
17
17
  inbook: "{{ volume }}: {{ page }}"
18
- misc: "{{ volume }}, {{ page }}, {{ duration }}"
18
+ misc: "{{ volume }} {{issue}} , {{ page }}, {{ duration }}"
19
19
  sizetemplate:
20
20
  dataset: "{{ data }}"
21
21
  electronic resource: dataset
22
22
  webresource: dataset
23
- misc: "{{ volume }}, {{ page }}, {{ data }}, {{ duration }}"
23
+ misc: "{{ volume }}, {{ issue }}, {{ page }}, {{ data }}, {{ duration }}"
24
24
  language: en
25
25
  script: Latn
26
26
  template:
@@ -55,7 +55,10 @@ module Relaton
55
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_formats
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)
@@ -115,7 +115,10 @@ module Relaton
115
115
  x = pick_contributor(doc, "publisher")
116
116
  host and x ||= pick_contributor(host, "publisher")
117
117
  x.nil? and return nil
118
- x.map { |c| c.entity.abbreviation&.content }
118
+ x.map do |c|
119
+ c.entity.abbreviation&.content ||
120
+ c.entity.name.first&.content
121
+ end
119
122
  end
120
123
 
121
124
  def distributor(doc, host)
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.3.6.1".freeze
3
+ VERSION = "0.3.9".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.6.1
4
+ version: 0.3.9
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-06 00:00:00.000000000 Z
11
+ date: 2022-06-24 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.16
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Rendering of ISO 690 XML