relaton-render 3.0.0.pre.alpha.36 → 3.0.0.pre.alpha.38
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: 6424aa7a105bde95ad6f7ea6f69c168d01b01523def7a5a411cbe29eaad26a84
|
|
4
|
+
data.tar.gz: 42831281b057b96f276f0975cd0458d39770dd693d1e69c5c6fb7acbdc2b6e81
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ef4a73a3af7c897c96ca1d8cac4cf2cf90f23b05def0649565d1ff7330a0ee8f6c3efd4402ce8f1b28caef20e965b60d40162c8c4ddefb54510011d6e817bb9
|
|
7
|
+
data.tar.gz: 6608d2265699eda9a0d52a1fe26a263bb00a7144c76fd3639fb7dc0b8de37c4e855b052f769359efdd4114c6da970d7c469273ab71fb1d9ff146abbf642119db
|
|
@@ -30,8 +30,12 @@ module Relaton
|
|
|
30
30
|
unit = type && @i18n.label("size_#{type}")
|
|
31
31
|
return content if unit.nil? || unit == "size_#{type}"
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
# "
|
|
33
|
+
# A %-template places the value at its % (the extent
|
|
34
|
+
# precedent: "% vol." cites "1 vol."); the value/unit glue
|
|
35
|
+
# is otherwise locale-declared (CJK cites tight, "巻1"
|
|
36
|
+
# over "vol. 1")
|
|
37
|
+
return unit.gsub("%", content) if unit.include?("%")
|
|
38
|
+
|
|
35
39
|
"#{unit}#{@i18n.punct_fetch('size-join', ' ')}#{content}"
|
|
36
40
|
end
|
|
37
41
|
end
|
|
@@ -96,7 +96,10 @@ module Relaton
|
|
|
96
96
|
"#{from}#{@i18n.label('date_range')}#{to}"
|
|
97
97
|
return text if item_kind == "serial_part"
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
label = @i18n.label(to.empty? || to == from ? "page" : "pages")
|
|
100
|
+
# the page labels are %-templates ("pp. %"); the block
|
|
101
|
+
# form keeps a % in the cited text from re-expanding
|
|
102
|
+
label.include?("%") ? label.gsub("%") { text } : "#{label} #{text}"
|
|
100
103
|
end
|
|
101
104
|
end
|
|
102
105
|
|