relaton-render 3.0.0.pre.alpha.19 → 3.0.0.pre.alpha.21
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfc55ca6da22673e6173486336211c48510588218d75e08672e8b3cfc09308cd
|
|
4
|
+
data.tar.gz: 0a338c96b9ec80bbd6b345c86d6fa15a9b14810db27729104f1386391f46de69
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d172ba4dd2697389d3372a37eaf460d7673ab7a2ba693e8365f8777f241c8dc19df5b2dc9082563aaeeb08866634318dccfbed54d61a378b341ee0c7b88e954
|
|
7
|
+
data.tar.gz: c0258407ac4ca2672164299ffe50b4ea671498dced9f653b06eb818e448e824e405b77e321a4e756f17710aba74a7f2892d69dfea3d7e6e216f84e23c6e6b190
|
|
@@ -84,11 +84,22 @@ module Relaton
|
|
|
84
84
|
sep = @style.scheme.name_form.initials_separator.to_s
|
|
85
85
|
return reinitials(localized(person.name&.formatted_initials)) if
|
|
86
86
|
parts.empty?
|
|
87
|
-
return parts
|
|
87
|
+
return given_with_first_full(parts, sep) if initials?
|
|
88
88
|
|
|
89
89
|
parts.join(" ")
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
# The document-history name form: the first forename cites in
|
|
93
|
+
# full, the rest as initials ("Milena S.")
|
|
94
|
+
def given_with_first_full(parts, sep)
|
|
95
|
+
initials = parts.map { |p| initial(p) }
|
|
96
|
+
return initials.join(sep) unless
|
|
97
|
+
@style.scheme.name_form.subsequent_initials
|
|
98
|
+
|
|
99
|
+
rest = parts.drop(1).map { |p| initial(p) }.join(sep)
|
|
100
|
+
rest.empty? ? parts.first : "#{parts.first}#{sep}#{rest}"
|
|
101
|
+
end
|
|
102
|
+
|
|
92
103
|
# Declared initials are a list in string form; rejoin them with
|
|
93
104
|
# the style's separator
|
|
94
105
|
def reinitials(raw)
|
|
@@ -130,7 +130,9 @@ module Relaton
|
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
# The declared creator fallback for items with no personal
|
|
133
|
-
# creators: the
|
|
133
|
+
# creators: the publishers' abbreviation or full name — all
|
|
134
|
+
# publishers cite, joined per the style's list style ("ISO and
|
|
135
|
+
# IEC")
|
|
134
136
|
def fallback_name
|
|
135
137
|
orgs = contributors("publisher")
|
|
136
138
|
name = case name_form.creator_fallback
|
|
@@ -145,7 +147,7 @@ module Relaton
|
|
|
145
147
|
else
|
|
146
148
|
[]
|
|
147
149
|
end
|
|
148
|
-
name.reject(&:empty?)
|
|
150
|
+
join_names(name.reject(&:empty?))
|
|
149
151
|
end
|
|
150
152
|
|
|
151
153
|
def names
|
|
@@ -38,6 +38,9 @@ module Relaton
|
|
|
38
38
|
attribute :surname_upcase, :boolean, default: -> { true }
|
|
39
39
|
# Initials are a list; this separates them ("J. K." vs "J.K.")
|
|
40
40
|
attribute :initials_separator, :string, default: " "
|
|
41
|
+
# The first forename cites in full, the rest as initials
|
|
42
|
+
# ("Milena S."; document-history name forms)
|
|
43
|
+
attribute :subsequent_initials, :boolean, default: -> { false }
|
|
41
44
|
# The direct-order surname casing after the first creator:
|
|
42
45
|
# the name-date convention upcases
|
|
43
46
|
attribute :subsequent_surname_upcase, :boolean,
|
|
@@ -69,6 +72,7 @@ module Relaton
|
|
|
69
72
|
map "initialsPeriod", to: :initials_period
|
|
70
73
|
map "surnameUpcase", to: :surname_upcase
|
|
71
74
|
map "initialsSeparator", to: :initials_separator
|
|
75
|
+
map "subsequentInitials", to: :subsequent_initials
|
|
72
76
|
map "subsequentSurnameUpcase", to: :subsequent_surname_upcase
|
|
73
77
|
map "etalCount", to: :etal_count
|
|
74
78
|
map "etalDisplay", to: :etal_display
|
|
@@ -9,6 +9,9 @@ scheme:
|
|
|
9
9
|
nameForm:
|
|
10
10
|
initials: false
|
|
11
11
|
givenNameFirst: false
|
|
12
|
+
# ISO 690 marks an editor list's role ("(éd.)") also when the list
|
|
13
|
+
# holds a single editor; flavors opt out per their own style
|
|
14
|
+
loneEditorMarked: true
|
|
12
15
|
templates:
|
|
13
16
|
titleOpen: "_"
|
|
14
17
|
titleClose: "_"
|