polytypo 1.30.0 → 1.31.0
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 +4 -4
- data/lib/polytypo/data/VERSION +1 -1
- data/lib/polytypo/data/fixtures/bg.json +1 -1
- data/lib/polytypo/data/fixtures/ca.json +309 -0
- data/lib/polytypo/data/fixtures/cs.json +1 -1
- data/lib/polytypo/data/fixtures/da.json +1 -1
- data/lib/polytypo/data/fixtures/de-CH.json +1 -1
- data/lib/polytypo/data/fixtures/de-DE.json +1 -1
- data/lib/polytypo/data/fixtures/el.json +1 -1
- data/lib/polytypo/data/fixtures/en-GB.json +1 -1
- data/lib/polytypo/data/fixtures/en-US.json +1 -1
- data/lib/polytypo/data/fixtures/es.json +1 -1
- data/lib/polytypo/data/fixtures/et.json +1 -1
- data/lib/polytypo/data/fixtures/fi.json +1 -1
- data/lib/polytypo/data/fixtures/fr-CA.json +1 -1
- data/lib/polytypo/data/fixtures/fr.json +1 -1
- data/lib/polytypo/data/fixtures/hr.json +1 -1
- data/lib/polytypo/data/fixtures/hu.json +1 -1
- data/lib/polytypo/data/fixtures/it.json +1 -1
- data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
- data/lib/polytypo/data/fixtures/lt.json +1 -1
- data/lib/polytypo/data/fixtures/lv.json +1 -1
- data/lib/polytypo/data/fixtures/nb.json +1 -1
- data/lib/polytypo/data/fixtures/nl.json +1 -1
- data/lib/polytypo/data/fixtures/nn.json +1 -1
- data/lib/polytypo/data/fixtures/pl.json +1 -1
- data/lib/polytypo/data/fixtures/pt-BR.json +1 -1
- data/lib/polytypo/data/fixtures/pt-PT.json +1 -1
- data/lib/polytypo/data/fixtures/ro.json +1 -1
- data/lib/polytypo/data/fixtures/ru.json +1 -1
- data/lib/polytypo/data/fixtures/sk.json +1 -1
- data/lib/polytypo/data/fixtures/sl.json +1 -1
- data/lib/polytypo/data/fixtures/sq.json +1 -1
- data/lib/polytypo/data/fixtures/sr.json +1 -1
- data/lib/polytypo/data/fixtures/sv.json +1 -1
- data/lib/polytypo/data/fixtures/tr.json +1 -1
- data/lib/polytypo/data/fixtures/uk.json +1 -1
- data/lib/polytypo/data/locales/ca.json +97 -0
- data/lib/polytypo/data/locales/registry.json +3 -2
- data/lib/polytypo/data/rules/order.json +1 -1
- data/lib/polytypo/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a1c3b8515eee1b8ab84525f19b2e51d48dd9d9fcd760b147f6527b09d343744
|
|
4
|
+
data.tar.gz: 44dfe2576cfd1479886cad21f52a071022811ac2afd689995d52000b6b6b274b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9df56562bf727721e69c1fbbb0b972a30497a4422f524c9661e121bc9973dc7a7116d891fe8e3092e5581111a22c34c06cabb7f6cc259acaa3af335bd6f66807
|
|
7
|
+
data.tar.gz: 37e05d03bc3c3d35014e45be4ce2bb22828bc7208ec49a56c162ac5fa143b9e58511dae6434113fd3280d9fe6781685b358e4f6da1b453565bf4c689a70841fa
|
data/lib/polytypo/data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.31.0
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec": "1.31.0",
|
|
3
|
+
"locale": "ca",
|
|
4
|
+
"cases": [
|
|
5
|
+
{
|
|
6
|
+
"id": "ca-quotes-primary",
|
|
7
|
+
"rule": "quotes",
|
|
8
|
+
"mode": "text",
|
|
9
|
+
"in": "Va dir \"estic cansat\" i va marxar.",
|
|
10
|
+
"out": "Va dir «estic cansat» i va marxar.",
|
|
11
|
+
"note": "Manual d'estil (IEC), cap. VII §10, p. 215: «cometes baixes» are the first level."
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "ca-quotes-nested",
|
|
15
|
+
"rule": "quotes",
|
|
16
|
+
"mode": "text",
|
|
17
|
+
"in": "Va escriure: \"Em va dir 'arribo de seguida' i va desaparèixer.\"",
|
|
18
|
+
"out": "Va escriure: «Em va dir “arribo de seguida” i va desaparèixer.»",
|
|
19
|
+
"note": "Manual d'estil (IEC), cap. VII §10, p. 215: «cometes baixes, cometes altes i cometes simples»; the second level is “…”. The third level ‘…’ is not expressible in the schema."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "ca-quotes-inner-space-deleted",
|
|
23
|
+
"rule": "quotes",
|
|
24
|
+
"mode": "text",
|
|
25
|
+
"in": "Va dir « estic cansat » i va marxar.",
|
|
26
|
+
"out": "Va dir «estic cansat» i va marxar.",
|
|
27
|
+
"note": "Manual d'estil (IEC), cap. VII §1.5, p. 171: the double signs sit immediately against the words they enclose, so innerSpace is none."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "ca-quotes-punctuation-stays-outside",
|
|
31
|
+
"rule": "quotes",
|
|
32
|
+
"mode": "text",
|
|
33
|
+
"in": "Va dir \"hola\", després va marxar.",
|
|
34
|
+
"out": "Va dir «hola», després va marxar.",
|
|
35
|
+
"note": "Manual d'estil (IEC), cap. VII §10.6 a): comma, semicolon, full stop and colon follow the closing mark, so punctuationPlacement is none and nothing is moved."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "ca-quotes-apostrophe-inside",
|
|
39
|
+
"rule": "quotes",
|
|
40
|
+
"mode": "text",
|
|
41
|
+
"in": "Va dir \"l'escola és a prop\" ahir.",
|
|
42
|
+
"out": "Va dir «l’escola és a prop» ahir.",
|
|
43
|
+
"note": "Ortografia catalana (IEC 2017) §4.1.1: the apostrophe is the «coma volada (’)»; it does not open a quotation."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "ca-apostrophe-elision",
|
|
47
|
+
"rule": "apostrophe",
|
|
48
|
+
"mode": "text",
|
|
49
|
+
"in": "Aquesta és l'escola d'en Pere i m'agrada.",
|
|
50
|
+
"out": "Aquesta és l’escola d’en Pere i m’agrada.",
|
|
51
|
+
"note": "Ortografia catalana (IEC 2017) §4.1.1, pp. 105-106: l', d', m' are elided forms written with the «coma volada»."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "ca-apostrophe-reduced-forms",
|
|
55
|
+
"rule": "apostrophe",
|
|
56
|
+
"mode": "text",
|
|
57
|
+
"in": "Dóna-me'n un i porta-'ls.",
|
|
58
|
+
"out": "Dóna-me’n un i porta-’ls.",
|
|
59
|
+
"note": "Ortografia catalana (IEC 2017) §4.1.1: the reduced forms 'n and 'ls take the same sign. Not a verified boundary case; the fixture pins that the apostrophe rule converts them."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "ca-apostrophe-before-span-quote",
|
|
63
|
+
"rule": "apostrophe",
|
|
64
|
+
"mode": "text",
|
|
65
|
+
"in": "Parla d'\"estabornir\" sovint.",
|
|
66
|
+
"out": "Parla d’«estabornir» sovint.",
|
|
67
|
+
"note": "Manual d'estil (IEC), cap. VII §14.2.5-14.2.6 [686a], [685]: an apostrophe flush against a quotation mark is kept as an apostrophe in text mode; the span-boundary cases below are what quotes.elisionClitics.before changes."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "ca-quotes-span-boundary-elision-declined",
|
|
71
|
+
"rule": "quotes",
|
|
72
|
+
"mode": "html",
|
|
73
|
+
"in": "Va dir 'que l'<em>home</em>' ara.",
|
|
74
|
+
"out": "Va dir «que l’<em>home</em>» ara.",
|
|
75
|
+
"note": "quotes.md §3.2's span-boundary elision veto: the elided l' stands flush against the emphasis boundary, so the cited quotes.elisionClitics.before entry l declines the mark and the author's own pair keeps its meaning. Ortografia catalana (IEC 2017) §4.1.1, pp. 105-106: l' is an elided form; Manual d'estil (IEC) cap. VII §14.2.5 attests an apostrophe against a span boundary («d'El Temps»)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "ca-quotes-span-boundary-elision-declined-markdown",
|
|
79
|
+
"rule": "quotes",
|
|
80
|
+
"mode": "markdown",
|
|
81
|
+
"dialect": "commonmark",
|
|
82
|
+
"in": "Va dir 'res d'*El Temps*' ara.",
|
|
83
|
+
"out": "Va dir «res d’*El Temps*» ara.",
|
|
84
|
+
"note": "Same veto in markdown mode, on the entry d: Manual d'estil (IEC) cap. VII §14.2.5 «d'El Temps» (italic) is written with the apostrophe flush against the span."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "ca-punt-volat-kept",
|
|
88
|
+
"rule": "symbols",
|
|
89
|
+
"mode": "text",
|
|
90
|
+
"in": "El col·legi i la il·lusió.",
|
|
91
|
+
"out": "El col·legi i la il·lusió.",
|
|
92
|
+
"note": "Ortografia catalana (IEC 2017) §2.1.2, Quadre 3: the punt volat (U+00B7) is part of the spelling (l·l); no rule may touch it."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "ca-punt-volat-capitals",
|
|
96
|
+
"rule": "symbols",
|
|
97
|
+
"mode": "text",
|
|
98
|
+
"in": "AL·LEGORIA i COL·LEGI.",
|
|
99
|
+
"out": "AL·LEGORIA i COL·LEGI.",
|
|
100
|
+
"note": "Ortografia catalana (IEC 2017) §2.1.2, Quadre 3: L·L in capitals."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "ca-punt-volat-after-apostrophe",
|
|
104
|
+
"rule": "apostrophe",
|
|
105
|
+
"mode": "text",
|
|
106
|
+
"in": "Parla de l'il·lusió i de s'il·luminar.",
|
|
107
|
+
"out": "Parla de l’il·lusió i de s’il·luminar.",
|
|
108
|
+
"note": "Ortografia catalana (IEC 2017) §4.1.1 with §2.1.2: the elision before a word that contains the punt volat is converted and the punt volat is left alone."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "ca-punt-volat-inside-quotes",
|
|
112
|
+
"rule": "quotes",
|
|
113
|
+
"mode": "text",
|
|
114
|
+
"in": "Va dir \"col·legi\" i va marxar.",
|
|
115
|
+
"out": "Va dir «col·legi» i va marxar.",
|
|
116
|
+
"note": "Ortografia catalana (IEC 2017) §2.1.2: the punt volat inside a quoted word."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "ca-middle-dot-multiplication",
|
|
120
|
+
"rule": "symbols",
|
|
121
|
+
"mode": "text",
|
|
122
|
+
"in": "El resultat de 4 · 2 = 8.",
|
|
123
|
+
"out": "El resultat de 4 · 2 = 8.",
|
|
124
|
+
"note": "Manual d'estil (IEC), cap. VII §15.1 b): U+00B7 as a multiplication sign is written with spaces; it is left as typed."
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "ca-ellipsis-three-dots",
|
|
128
|
+
"rule": "ellipsis",
|
|
129
|
+
"mode": "text",
|
|
130
|
+
"in": "Doncs... no ho sé.",
|
|
131
|
+
"out": "Doncs… no ho sé.",
|
|
132
|
+
"note": "Manual d'estil (IEC), cap. VII §6, p. 194: «Els punts suspensius són únicament tres»; the single character is recommended."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "ca-ellipsis-not-abbreviated-after-terminal",
|
|
136
|
+
"rule": "ellipsis",
|
|
137
|
+
"mode": "text",
|
|
138
|
+
"in": "De veritat?..",
|
|
139
|
+
"out": "De veritat?…",
|
|
140
|
+
"note": "Manual d'estil (IEC), cap. VII §6, p. 194: examples «vindries?…» and «enamorat!…» use three dots after a terminal mark."
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "ca-dashes-paired-spaced-hyphens",
|
|
144
|
+
"rule": "dashes",
|
|
145
|
+
"mode": "text",
|
|
146
|
+
"in": "El llibre - publicat abans de la guerra - és bo.",
|
|
147
|
+
"out": "El llibre —publicat abans de la guerra— és bo.",
|
|
148
|
+
"note": "Manual d'estil (IEC), cap. VII §8, p. 206: in an incís the first dash is attached to the first letter of the following word and the second to the last letter of the preceding word."
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "ca-dashes-paired-double-hyphen",
|
|
152
|
+
"rule": "dashes",
|
|
153
|
+
"mode": "text",
|
|
154
|
+
"in": "Vam caminar -- gairebé 3 km -- i era tancat.",
|
|
155
|
+
"out": "Vam caminar —gairebé 3 km— i era tancat.",
|
|
156
|
+
"note": "Manual d'estil (IEC), cap. VII §8, p. 206, examples [284a], [33b]. The space before km is bound by the nbsp rule."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "ca-dashes-paired-already-correct",
|
|
160
|
+
"rule": "dashes",
|
|
161
|
+
"mode": "text",
|
|
162
|
+
"in": "Va arribar —per fi— a casa.",
|
|
163
|
+
"out": "Va arribar —per fi— a casa.",
|
|
164
|
+
"note": "Manual d'estil (IEC), cap. VII §8, p. 206: the closed-up form is already correct."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "ca-dashes-single-hyphen-untouched",
|
|
168
|
+
"rule": "dashes",
|
|
169
|
+
"mode": "text",
|
|
170
|
+
"in": "Barcelona - la capital de Catalunya.",
|
|
171
|
+
"out": "Barcelona - la capital de Catalunya.",
|
|
172
|
+
"note": "Manual d'estil (IEC), cap. VII §8.6 b): an incís at the end of the sentence omits the closing dash; a single stroke is left unconverted by construction (dashes.md §3.4a), an accepted cost."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "ca-dashes-spaced-hyphens-between-places",
|
|
176
|
+
"rule": "dashes",
|
|
177
|
+
"mode": "text",
|
|
178
|
+
"in": "De la plaça de Catalunya - plaça de la Bonanova - i tornem.",
|
|
179
|
+
"out": "De la plaça de Catalunya —plaça de la Bonanova— i tornem.",
|
|
180
|
+
"note": "Manual d'estil (IEC), cap. VII §9.2 allows an ordinary space around a hyphen that joins multi-word elements («plaça de Catalunya - plaça de la Bonanova»). Two such hyphens in one segment are read as an incís and converted (dashes.md §3.4a); this is the accepted cost of em-paired for a locale whose authority allows the spaced hyphen. A single such hyphen is left as typed."
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "ca-ranges-none-hyphen-untouched",
|
|
184
|
+
"rule": "ranges",
|
|
185
|
+
"mode": "text",
|
|
186
|
+
"in": "Vegeu les pàgines 153-174 i el curs 1990-1991.",
|
|
187
|
+
"out": "Vegeu les pàgines 153-174 i el curs 1990-1991.",
|
|
188
|
+
"note": "Manual d'estil (IEC), cap. VII §9.2.2 a), p. 213: ranges are written with the hyphen (guionet); ranges.md §2: dash.range \"none\" disables the rule, so the hyphen is left as typed.",
|
|
189
|
+
"rules": {
|
|
190
|
+
"ranges": true
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "ca-hyphen-compound-untouched",
|
|
195
|
+
"rule": "hyphen",
|
|
196
|
+
"mode": "text",
|
|
197
|
+
"in": "Gira-sol i tornem-hi.",
|
|
198
|
+
"out": "Gira-sol i tornem-hi.",
|
|
199
|
+
"note": "Ortografia catalana (IEC 2017) §3.2.1, p. 101: line breaks use the existing hyphens; the hyphen lists are empty."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "ca-nbsp-percent",
|
|
203
|
+
"rule": "nbsp",
|
|
204
|
+
"mode": "text",
|
|
205
|
+
"in": "El 80 % dels alumnes ho va aprovar.",
|
|
206
|
+
"out": "El 80 % dels alumnes ho va aprovar.",
|
|
207
|
+
"note": "Manual d'estil (IEC), cap. VI §14.3, p. 161: «No podem separar les quantitats dels símbols que acompanyen» («* 50 || %»)."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "ca-nbsp-per-mille",
|
|
211
|
+
"rule": "nbsp",
|
|
212
|
+
"mode": "text",
|
|
213
|
+
"in": "Un 13 ‰ del total.",
|
|
214
|
+
"out": "Un 13 ‰ del total.",
|
|
215
|
+
"note": "Manual d'estil (IEC), cap. XII §4.1 h-i, p. 490: «13 ‰» is written with a space; the space is kept together with the number."
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"id": "ca-nbsp-celsius",
|
|
219
|
+
"rule": "nbsp",
|
|
220
|
+
"mode": "text",
|
|
221
|
+
"in": "Fa −15 °C a la nit.",
|
|
222
|
+
"out": "Fa −15 °C a la nit.",
|
|
223
|
+
"note": "Manual d'estil (IEC), cap. XII §4.1 g-i and cap. VII [186a]: «−15 °C», «28 °C»."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "ca-nbsp-kilometre-and-kilogram",
|
|
227
|
+
"rule": "nbsp",
|
|
228
|
+
"mode": "text",
|
|
229
|
+
"in": "Pesa 850 kg i fa 3 km.",
|
|
230
|
+
"out": "Pesa 850 kg i fa 3 km.",
|
|
231
|
+
"note": "Manual d'estil (IEC), cap. VI §14.3: [315] «* 850 || kg»; cap. VII [186a]: «2 km»."
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "ca-nbsp-degree-tight",
|
|
235
|
+
"rule": "nbsp",
|
|
236
|
+
"mode": "text",
|
|
237
|
+
"in": "Va néixer a 43° 50′ 30″ nord.",
|
|
238
|
+
"out": "Va néixer a 43° 50′ 30″ nord.",
|
|
239
|
+
"note": "Manual d'estil (IEC), cap. XII §4.1: the degree sign alone is written closed up («43° 50′ 30″»), so ° is not in beforeUnits."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "ca-nbsp-abbreviation-p-ex",
|
|
243
|
+
"rule": "nbsp",
|
|
244
|
+
"mode": "text",
|
|
245
|
+
"in": "en alguns casos, p. ex. aquest",
|
|
246
|
+
"out": "en alguns casos, p. ex. aquest",
|
|
247
|
+
"note": "Manual d'estil (IEC), cap. IX §3 and cap. VI §14.1: composite abbreviations are not split."
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "ca-nbsp-abbreviation-titles",
|
|
251
|
+
"rule": "nbsp",
|
|
252
|
+
"mode": "text",
|
|
253
|
+
"in": "Va parlar el M. I. Sr. Pere.",
|
|
254
|
+
"out": "Va parlar el M. I. Sr. Pere.",
|
|
255
|
+
"note": "Manual d'estil (IEC), cap. VI §14.1: «Les abreviatures compostes, especialment les dels tractaments […] no s'han de separar» («* M. I. || Sra.»). The initials M. I. chain: the space before the first initial is bound too (initialBinding chain)."
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"id": "ca-nbsp-initials-chain",
|
|
259
|
+
"rule": "nbsp",
|
|
260
|
+
"mode": "text",
|
|
261
|
+
"in": "Ho va escriure J. V. Foix ahir.",
|
|
262
|
+
"out": "Ho va escriure J. V. Foix ahir.",
|
|
263
|
+
"note": "Manual d'estil (IEC), cap. VI §14.1: [304a] «* J. || V. Foix» and [304b] «~ J. V. || Foix» are both rejected, so the whole chain binds, including the space before the first initial, (initialBinding chain, a pick-and-pin: a lone initial before a surname is not exemplified)."
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"id": "ca-nbsp-no-space-before-punctuation",
|
|
267
|
+
"rule": "nbsp",
|
|
268
|
+
"mode": "text",
|
|
269
|
+
"in": "Què vols? Vine: veuràs; no cal dir res!",
|
|
270
|
+
"out": "Què vols? Vine: veuràs; no cal dir res!",
|
|
271
|
+
"note": "Manual d'estil (IEC), cap. VII §1.5, §5, §7: the simple signs, the colon, ? and ! are written immediately after the last word; no space is inserted."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "ca-spaces-before-punctuation-deleted",
|
|
275
|
+
"rule": "spaces",
|
|
276
|
+
"mode": "text",
|
|
277
|
+
"in": "Què vols ? Vine : veuràs ; no cal dir res !",
|
|
278
|
+
"out": "Què vols? Vine: veuràs; no cal dir res!",
|
|
279
|
+
"note": "Manual d'estil (IEC), cap. VII §1.5: no space precedes the punctuation, so the ordinary spaces typed before it are deleted."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"id": "ca-roundtrip-noop",
|
|
283
|
+
"rule": "quotes",
|
|
284
|
+
"mode": "text",
|
|
285
|
+
"in": "Va dir «estic cansat» i va marxar…",
|
|
286
|
+
"out": "Va dir «estic cansat» i va marxar…",
|
|
287
|
+
"note": "Already-typeset text is a fixed point."
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "ca-symbols-copyright-and-dimensions",
|
|
291
|
+
"rule": "symbols",
|
|
292
|
+
"mode": "text",
|
|
293
|
+
"in": "Copyright (c) 2026, mida 40x60 cm",
|
|
294
|
+
"out": "Copyright © 2026, mida 40×60 cm",
|
|
295
|
+
"note": "Symbols are locale-independent; the cm after the dimension is not in beforeUnits for ca, so the space is left as typed."
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"id": "ca-quote-punctuation-none",
|
|
299
|
+
"rule": "quote-punctuation",
|
|
300
|
+
"mode": "text",
|
|
301
|
+
"in": "alfa «beta», gamma",
|
|
302
|
+
"out": "alfa «beta», gamma",
|
|
303
|
+
"note": "Manual d'estil (IEC), cap. VII §10.6 a): comma, semicolon, full stop and colon follow the closing quotation mark, so punctuationPlacement is none and the rule does not move the comma.",
|
|
304
|
+
"rules": {
|
|
305
|
+
"quote-punctuation": true
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"locale": "ca",
|
|
3
|
+
"name": "Catalan",
|
|
4
|
+
"quotes": {
|
|
5
|
+
"primary": {
|
|
6
|
+
"open": "«",
|
|
7
|
+
"close": "»",
|
|
8
|
+
"innerSpace": "none"
|
|
9
|
+
},
|
|
10
|
+
"secondary": {
|
|
11
|
+
"open": "“",
|
|
12
|
+
"close": "”",
|
|
13
|
+
"innerSpace": "none"
|
|
14
|
+
},
|
|
15
|
+
"punctuationPlacement": "none",
|
|
16
|
+
"elisionIdioms": [],
|
|
17
|
+
"elisionClitics": {
|
|
18
|
+
"before": ["l", "d", "m", "t", "s", "n"],
|
|
19
|
+
"after": []
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dash": {
|
|
23
|
+
"parenthetical": "em-paired",
|
|
24
|
+
"range": "none"
|
|
25
|
+
},
|
|
26
|
+
"ellipsis": {
|
|
27
|
+
"abbreviatedAfterTerminal": false
|
|
28
|
+
},
|
|
29
|
+
"hyphen": {
|
|
30
|
+
"prefixes": [],
|
|
31
|
+
"suffixes": [],
|
|
32
|
+
"compounds": []
|
|
33
|
+
},
|
|
34
|
+
"nbsp": {
|
|
35
|
+
"beforePunctuation": [],
|
|
36
|
+
"narrowBeforePunctuation": [],
|
|
37
|
+
"afterShortWords": [],
|
|
38
|
+
"abbreviations": ["p. ex.", "M. I. Sr.", "M. I. Sra.", "M. H. Sr.", "M. H. Sra.", "S. A. R."],
|
|
39
|
+
"beforeUnits": ["%", "‰", "°C", "km", "kg"],
|
|
40
|
+
"spacedUnits": [],
|
|
41
|
+
"closedUnits": [],
|
|
42
|
+
"beforeNumber": [],
|
|
43
|
+
"beforeWord": [],
|
|
44
|
+
"afterSymbols": [],
|
|
45
|
+
"initialBinding": "chain"
|
|
46
|
+
},
|
|
47
|
+
"sources": [
|
|
48
|
+
{
|
|
49
|
+
"rule": "quotes",
|
|
50
|
+
"cite": "Mestres, Costa, Oliva, Fité, Manual d'estil (IEC, 5a ed. en línia 2019; paginació 4a ed.), cap. VII §10, p. 215: «En català se n'utilitzen tradicionalment tres tipus: les cometes baixes o llatines (« »), les cometes altes o angleses […] i les cometes simples […]. Mantenen una relació de jerarquia […]: cometes baixes, cometes altes i cometes simples»; §1.5, p. 171: «Els signes dobles es col·loquen immediatament abans del mot que precedeixen i immediatament després del mot que segueixen»",
|
|
51
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/07_Pag_167-278_p.pdf",
|
|
52
|
+
"note": "Manual d'estil editat per l'IEC, no obra normativa: l'Ortografia catalana no té capítol de puntuació, i Optimot i la GIEC no han pogut ser consultats. Es fixa (pick-and-pin) aquest manual com a autoritat de puntuació. L'espai fi de §1.5.1 hi és marcat «~» (menys bo). punctuationPlacement = \"none\": §10.6 a) posa coma, punt i coma, punt i dos punts FORA de les cometes de tancament (usos no citacionals); les citacions (§13.5) no s'han llegit. El tercer nivell (‘ ’) no és expressable en l'esquema. Consultat el 2026-11-23."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"rule": "quotes",
|
|
56
|
+
"cite": "Institut d'Estudis Catalans, Ortografia catalana (2017), §4.1.1, pp. 105-106: «L'apòstrof és un signe ortogràfic consistent en una coma volada (’)»; formes elidides l', n', s', d', m', t'; formes reduïdes «'m, 'ns, 't, 'l, 'ls, 's i 'n»",
|
|
57
|
+
"url": "https://aplicacions.llengua.gencat.cat/llc/AppJava/pdf/ortografia_catalana_versio_digital.pdf",
|
|
58
|
+
"note": "elisionClitics.before = l, d, m, t, s, n. El conjunt tancat de formes reduïdes (after) és a l'Ortografia però no s'hi ha trobat cap cas atestat en contacte amb un límit de span, de manera que after queda buit (com en-US). Contacte amb límit de span atestat al Manual d'estil VII §14.2.5-14.2.6 («d'El Temps», «d'«El Quadrat d'Or»»). Consultat el 2026-11-23."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"rule": "dashes",
|
|
62
|
+
"cite": "Manual d'estil (IEC), cap. VII §8, p. 206: «El guió […] consisteix en una ratlla horitzontal de la llargada equivalent a un quadratí o una mica més. En un incís, el primer guió s'escriu enganxat a la primera lletra del mot que el segueix, i el segon, enganxat a l'última lletra del mot que el precedeix»",
|
|
63
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/07_Pag_167-278_p.pdf",
|
|
64
|
+
"note": "em-paired (U+2014). Cost acceptat: el Manual d'estil VII §9.2 admet un guionet amb espais entre elements de diverses paraules («plaça de Catalunya - plaça de la Bonanova»), que la regla de guions pot llegir com a incís; es fixa amb un fixture. Un incís amb un sol guió (§8.6 b) queda sense convertir. Consultat el 2026-11-23."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"rule": "ranges",
|
|
68
|
+
"cite": "Manual d'estil (IEC), cap. VII §9.2.2 a), p. 213: el guionet uneix «dues xifres correlatives i també xifres que comprenen els nombres intermedis»: «p. 153-174»; «el curs 1990-1991»",
|
|
69
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/07_Pag_167-278_p.pdf",
|
|
70
|
+
"note": "range = \"none\": el signe és U+002D, el que l'autor ja escriu. Consultat el 2026-11-23."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"rule": "ellipsis",
|
|
74
|
+
"cite": "Manual d'estil (IEC), cap. VII §6, p. 194: «Els punts suspensius són únicament tres»; «hi ha un caràcter que conté aquests tres punts, i és recomanable de fer-lo servir»",
|
|
75
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/07_Pag_167-278_p.pdf",
|
|
76
|
+
"note": "Consultat el 2026-11-23."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"rule": "hyphen",
|
|
80
|
+
"cite": "Institut d'Estudis Catalans, Ortografia catalana (2017), §3.2.1, p. 101: «La partició a final de ratlla se sol fer aprofitant els guionets existents (gira-|sol, tornem-|hi)»",
|
|
81
|
+
"url": "https://aplicacions.llengua.gencat.cat/llc/AppJava/pdf/ortografia_catalana_versio_digital.pdf",
|
|
82
|
+
"note": "Les tres llistes queden buides: el català no segueix la convenció russa. Consultat el 2026-11-23."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"rule": "nbsp",
|
|
86
|
+
"cite": "Manual d'estil (IEC), cap. VI §14.1: «Les abreviatures compostes, especialment les dels tractaments i les dels noms de persona, no s'han de separar» («* M. I. || Sra.», «* J. || V. Foix», «~ J. V. || Foix»); §14.3: «No podem separar les quantitats dels símbols que acompanyen» («* 50 || %», «* 850 || kg»)",
|
|
87
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/06_Pag_143-166_p.pdf",
|
|
88
|
+
"note": "L'espai entre nombre i símbol només és atestat en exemples (cap. XII §4.1 g-i: «80 %», «13 ‰», «−15 °C»), per tant beforeUnits i no spacedUnits. «°» sol va enganxat («43° 50′ 30″»). initialBinding \"chain\" és una tria (pick-and-pin) com en es: una inicial sola davant del cognom no hi és exemplificada. beforeNumber, beforeWord, afterShortWords i afterSymbols queden buits: el manual no els tracta. Consultat el 2026-11-23."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"rule": "nbsp",
|
|
92
|
+
"cite": "Manual d'estil (IEC), cap. VII §1.5, p. 171: els signes senzills «es col·loquen immediatament després de l'última lletra del mot al qual s'ajunten»; §1.5.1: l'espai fi és un «costum […] adquirit per imitació d'altres llengües»",
|
|
93
|
+
"url": "https://estil.iec.cat/wp-content/uploads/sites/24/2019/02/07_Pag_167-278_p.pdf",
|
|
94
|
+
"note": "beforePunctuation i narrowBeforePunctuation buits. Consultat el 2026-11-23."
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.31.0",
|
|
3
3
|
"$comment": "Locale resolution input. Algorithm is specified in spec/rules/locale-resolution.md and is identical in every runtime — never delegate it to a platform locale-negotiation library. \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
|
|
4
4
|
"locales": [
|
|
5
5
|
"en-US",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"da",
|
|
35
35
|
"nb",
|
|
36
36
|
"nn",
|
|
37
|
-
"sq"
|
|
37
|
+
"sq",
|
|
38
|
+
"ca"
|
|
38
39
|
],
|
|
39
40
|
"aliases": {
|
|
40
41
|
"en": "en-US",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.31.0",
|
|
3
3
|
"$comment": "Single source of truth for pipeline order. Rules run in ascending `order`. Disabling a rule removes it from the sequence and never reorders the rest. Rule ids are public API (see docs/ARCHITECTURE.md section 5). \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
|
|
4
4
|
"rules": [
|
|
5
5
|
{
|
data/lib/polytypo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polytypo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.31.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iurii Rogulia
|
|
@@ -41,6 +41,7 @@ files:
|
|
|
41
41
|
- lib/polytypo/data/UNICODE
|
|
42
42
|
- lib/polytypo/data/VERSION
|
|
43
43
|
- lib/polytypo/data/fixtures/bg.json
|
|
44
|
+
- lib/polytypo/data/fixtures/ca.json
|
|
44
45
|
- lib/polytypo/data/fixtures/cs.json
|
|
45
46
|
- lib/polytypo/data/fixtures/da.json
|
|
46
47
|
- lib/polytypo/data/fixtures/de-CH.json
|
|
@@ -75,6 +76,7 @@ files:
|
|
|
75
76
|
- lib/polytypo/data/fixtures/tr.json
|
|
76
77
|
- lib/polytypo/data/fixtures/uk.json
|
|
77
78
|
- lib/polytypo/data/locales/bg.json
|
|
79
|
+
- lib/polytypo/data/locales/ca.json
|
|
78
80
|
- lib/polytypo/data/locales/cs.json
|
|
79
81
|
- lib/polytypo/data/locales/da.json
|
|
80
82
|
- lib/polytypo/data/locales/de-CH.json
|