relaton-render 3.0.0.pre.alpha.30 → 3.0.0.pre.alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1de79ada3cccc90471f663c3279aafbf1134ff0da0bbb09197c6565e2382f17
4
- data.tar.gz: 9459a2816d7d6b280891adfb5f4b020e1df1388ae6b0b2b6e6f4032645a6b020
3
+ metadata.gz: a4910f5153470cbaeb2050385fe5b2fb310f0d8028e64a946c419b3fd3d772df
4
+ data.tar.gz: ea045152f9a08da7b2548df4c41bcd39fa6195d4bcffc9119231ccdd85a91743
5
5
  SHA512:
6
- metadata.gz: 6726afa5506d3532ac980f9f180b063c7886437aabf01d34664c40edec23656377974ee9b19fd64d32aa712fa97fdeeb2b1e4395c2e5bce33b126d7c8de04b9a
7
- data.tar.gz: 5226d40e0f5549cda5d6cefdf1f834a6d76fb4caf3aa231f69f21119b96876d91736cdded924557aeb35669f0c6002850a9f3d8fd585a3cdc000f46222cc9ab0
6
+ metadata.gz: 99e29f76607ff8c1e0b84ef5fbf9fb56c9291bb87c0ecb6d771679d2a9a7f12aaa0140692fdef6f665bdd9b9e278feaf59d2466591843ada74fc4d68740bd951
7
+ data.tar.gz: b5a937aae90ad6771126ece89b64bce89dc92f7fa60bebdca3719885197878125fa4d579e89990f13bc94111fc0b82dcb901d59b490ea00acca95cf8c6fccce5
@@ -14,14 +14,16 @@ module Relaton
14
14
  def render
15
15
  return "#{@i18n.label('version')} #{raw}" unless word_edition?
16
16
 
17
- # The worded forms first ("First edition", "第N版" via the
18
- # ordinal template), the cardinal last
19
- ordinal = locale_template("edition_ordinal", number)
20
- return ordinal if ordinal
21
-
17
+ # The exact worded forms first ("first edition", "第1版"),
18
+ # then the generic ordinal template, the cardinal last: a
19
+ # specific label outranks a template that would apply to
20
+ # any number
22
21
  word = @i18n.label("edition_#{number}")
23
22
  return word unless word == "edition_#{number}"
24
23
 
24
+ ordinal = locale_template("edition_ordinal", number)
25
+ return ordinal if ordinal
26
+
25
27
  cardinal_form || "#{ordinalize(number)} #{@i18n.label('edition')}"
26
28
  end
27
29
 
@@ -39,12 +39,18 @@ module Relaton
39
39
  "available_at" => "available_from",
40
40
  }.freeze
41
41
 
42
- def label_map
43
- base = LABEL_FOR.filter_map do |attr, label|
42
+ # The named attributes' label map alone: a delta's named
43
+ # attribute (availableAt) outranks the base pack's labels
44
+ # hash carrying the same label key
45
+ def named_label_map
46
+ LABEL_FOR.filter_map do |attr, label|
44
47
  value = public_send(attr)
45
48
  [label, value] unless value.nil?
46
49
  end.to_h
47
- base.merge(labels || {})
50
+ end
51
+
52
+ def label_map
53
+ named_label_map.merge(labels || {})
48
54
  end
49
55
  end
50
56
  end
@@ -176,7 +176,12 @@ module Relaton
176
176
  locale.in_str ||= base_locale.in_str
177
177
  locale.at ||= base_locale.at
178
178
  locale.available_at ||= base_locale.available_at
179
- locale.labels.merge!(base_locale.label_map) { |_k, _b, d| d }
179
+ # delta labels win per key; the base's label map only fills
180
+ # gaps. Hash#merge! yields |key, receiver, other|, so the
181
+ # delta value is the second argument.
182
+ locale.labels.merge!(base_locale.label_map) { |_k, delta, _base| delta }
183
+ # a delta's named attributes assert over the inherited labels
184
+ locale.named_label_map.each_key { |k| locale.labels.delete(k) }
180
185
  locale.punct = (base_locale.punct || {}).merge(locale.punct || {})
181
186
  end
182
187
 
@@ -0,0 +1,68 @@
1
+ # The metanorma-jis CitationStyle instance, English forms
2
+ # (relaton-render 3.0.0.pre Iso690 engine): the ISO 690 order with the
3
+ # Latin punctuation of the en language pack.
4
+ name: "ISO 690 (JIS, en)"
5
+ scheme:
6
+ system: name-date
7
+ shortFromReference: true
8
+ homeDocidType: []
9
+ nameForm:
10
+ initials: true
11
+ initialsSeparator: ""
12
+ initialsPeriod: true
13
+ surnameUpcase: false
14
+ subsequentSurnameUpcase: false
15
+ invertedAll: true
16
+ completenameUpcase: false
17
+ orgUpcase: false
18
+ editorsMarked: false
19
+ locale:
20
+ availableAt: "Available at:"
21
+ labels:
22
+ "and": "&"
23
+ oxford_comma: ""
24
+ series_no: ""
25
+ templates:
26
+ titleOpen: ""
27
+ titleClose: ""
28
+ identifierMode: first
29
+ citation: "{{surname}} {{date}}"
30
+ uri: "<span class='biburl'><fmt-link target='{{uri}}'>{{uri}}</fmt-link></span>"
31
+ reference: "{{creator}}{{role}}. {{title}}. {{edition}}. ({{series}}). {{production}}. {{date}}. {{size}}"
32
+ name: "{{surname}} {{givenNames}}"
33
+ perType:
34
+ - type: report
35
+ home: true
36
+ short: "<span class='stddocTitle'>{{title}}</span>, {{extent}}"
37
+ template: "{{title}}"
38
+ title: "<span class='stddocTitle'>{{title}}</span>"
39
+ - type: report
40
+ fallbacks:
41
+ date: "n.d"
42
+ template: "{{creator}}. {{title}}. {{edition}}. {{production}}. {{authorizer}}. {{location}}"
43
+ short: "{{creator}}. <span class='stddocTitle'>{{title}}</span>. {{edition}}. {{production}}"
44
+ title: "<span class='stddocTitle'>{{title}}</span>"
45
+ - type: monograph
46
+ noPlace: true
47
+ fallbacks:
48
+ date: "n.d"
49
+ template: "{{creator}}{{role}}. {{title}}. {{edition}}. ({{series}}). {{production}}. {{date}}. {{size}}. {{location}}"
50
+ - type: continuing
51
+ template: "{{title}}. {{date}}"
52
+ - type: online
53
+ fallbacks:
54
+ date: "n.d"
55
+ template: "{{creator}}. {{title}}. {{production}}. {{date}}. {{location}}"
56
+ - type: webdoc
57
+ fallbacks:
58
+ date: "n.d"
59
+ template: "{{creator}}. {{title}}. {{production}}. {{date}}. {{location}}"
60
+ - type: component_part
61
+ noPlace: true
62
+ template: "{{creator}}{{role}}. {{title}}. {{componentpart}}. {{edition}}. ({{series}}). {{production}}. {{date}}. {{extent}}. {{location}}"
63
+ - type: serial_part
64
+ template: "{{creator}}{{role}}. {{title}}. {{series}}. {{date}}, {{extent}}. {{location}}"
65
+ series: "{{seriestitle}} ({{seriesrun}})"
66
+ - type: article
67
+ template: "{{creator}}{{role}}. {{title}}. {{series}}. {{date}}, {{extent}}"
68
+ series: "{{seriestitle}} ({{seriesrun}})"
@@ -0,0 +1,67 @@
1
+ # The metanorma-jis CitationStyle instance, Japanese forms
2
+ # (relaton-render 3.0.0.pre Iso690 engine): the ISO 690 order with the
3
+ # Latin punctuation of the en language pack.
4
+ name: "ISO 690 (JIS, ja)"
5
+ scheme:
6
+ system: name-date
7
+ shortFromReference: true
8
+ homeDocidType: []
9
+ nameForm:
10
+ initials: true
11
+ initialsSeparator: ""
12
+ initialsPeriod: true
13
+ surnameUpcase: false
14
+ subsequentSurnameUpcase: false
15
+ invertedAll: true
16
+ completenameUpcase: false
17
+ orgUpcase: false
18
+ editorsMarked: false
19
+ locale:
20
+ labels:
21
+ "and": ""
22
+ oxford_comma: ""
23
+ series_no: ""
24
+ templates:
25
+ titleOpen: ""
26
+ titleClose: ""
27
+ identifierMode: first
28
+ citation: "{{surname}} {{date}}"
29
+ uri: "<span class='biburl'><fmt-link target='{{uri}}'>{{uri}}</fmt-link></span>"
30
+ reference: "{{creator}}{{role}}。 {{title}}。 {{edition}}。({{series}})。 {{production}}。 {{date}}。 {{size}}"
31
+ name: "{{surname}} {{givenNames}}"
32
+ perType:
33
+ - type: report
34
+ home: true
35
+ short: "<span class='stddocTitle'>{{title}}</span>、 {{extent}}"
36
+ template: "{{title}}"
37
+ title: "<span class='stddocTitle'>{{title}}</span>"
38
+ - type: report
39
+ fallbacks:
40
+ date: "日付なし"
41
+ template: "{{creator}}。 {{title}}。 {{edition}}。 {{production}}。 {{authorizer}}。 {{location}}"
42
+ short: "{{creator}}。 <span class='stddocTitle'>{{title}}</span>。 {{edition}}。 {{production}}"
43
+ title: "<span class='stddocTitle'>{{title}}</span>"
44
+ - type: monograph
45
+ noPlace: true
46
+ fallbacks:
47
+ date: "日付なし"
48
+ template: "{{creator}}{{role}}。 {{title}}。 {{edition}}。({{series}})。 {{production}}。 {{date}}。 {{size}}。 {{location}}"
49
+ - type: continuing
50
+ template: "{{title}}。 {{date}}"
51
+ - type: online
52
+ fallbacks:
53
+ date: "日付なし"
54
+ template: "{{creator}}。 {{title}}。 {{production}}。 {{date}}。 {{location}}"
55
+ - type: webdoc
56
+ fallbacks:
57
+ date: "日付なし"
58
+ template: "{{creator}}。 {{title}}。 {{production}}。 {{date}}。 {{location}}"
59
+ - type: component_part
60
+ noPlace: true
61
+ template: "{{creator}}{{role}}。 {{title}}。 {{componentpart}}。 {{edition}}。({{series}})。 {{production}}。 {{date}}。 {{extent}}。 {{location}}"
62
+ - type: serial_part
63
+ template: "{{creator}}{{role}}。 {{title}}。 {{series}}。 {{date}}、{{extent}}。 {{location}}"
64
+ series: "{{seriestitle}} ({{seriesrun}})"
65
+ - type: article
66
+ template: "{{creator}}{{role}}。 {{title}}。 {{series}}。 {{date}}、{{extent}}"
67
+ series: "{{seriestitle}} ({{seriesrun}})"
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "3.0.0.pre.alpha.30".freeze
3
+ VERSION = "3.0.0.pre.alpha.32".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: 3.0.0.pre.alpha.30
4
+ version: 3.0.0.pre.alpha.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-08 00:00:00.000000000 Z
11
+ date: 2026-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -159,6 +159,8 @@ files:
159
159
  - lib/relaton/render/iso690/styles/author-date.yml
160
160
  - lib/relaton/render/iso690/styles/chicago.yml
161
161
  - lib/relaton/render/iso690/styles/ieee-sa.yml
162
+ - lib/relaton/render/iso690/styles/jis-en.yml
163
+ - lib/relaton/render/iso690/styles/jis-ja.yml
162
164
  - lib/relaton/render/iso690/styles/lncs.yml
163
165
  - lib/relaton/render/iso690/template.rb
164
166
  - lib/relaton/render/version.rb