polytypo 1.27.0 → 1.29.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/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 +22 -4
- 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 +315 -0
- 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 +255 -0
- 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/nn.json +85 -0
- data/lib/polytypo/data/locales/registry.json +4 -2
- data/lib/polytypo/data/locales/sq.json +85 -0
- data/lib/polytypo/data/rules/locale-resolution.md +2 -2
- data/lib/polytypo/data/rules/order.json +1 -1
- data/lib/polytypo/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f78898e809a20abf58f74b52b924dab7bf6ce49d0ac8a6b9ff081d15597014ba
|
|
4
|
+
data.tar.gz: 57538c0a426cc846163be42ed480e8876a75b8a1f9692d4d5fa669a83ffb6ae2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a18978cb61cf598c837277d85f2f0d6885c03b612fe32dd06e5b12a63b67be585d2bac4db6bcaa40100d395902c0b460d0b86e1585a5708208335cfb6e37f02
|
|
7
|
+
data.tar.gz: 4a32ef57ae8e5ec76947a64579ff83261746d6c8d54ee42c9c17abf5a3a59f92651f8170b20a8b579aff4815fc7e13c12c2ae685109589eb0ef2e694e824c27c
|
data/lib/polytypo/data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.29.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.29.0",
|
|
3
3
|
"cases": [
|
|
4
4
|
{
|
|
5
5
|
"id": "exact-en-us",
|
|
@@ -146,10 +146,10 @@
|
|
|
146
146
|
"throws": "POLYTYPO_UNKNOWN_LOCALE"
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
|
-
"id": "unknown-
|
|
150
|
-
"tag": "
|
|
149
|
+
"id": "unknown-fo-fo",
|
|
150
|
+
"tag": "fo-FO",
|
|
151
151
|
"throws": "POLYTYPO_UNKNOWN_LOCALE",
|
|
152
|
-
"note": "section 4:
|
|
152
|
+
"note": "section 4: fo (Faroese) must not resolve to the nearest locale da"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"id": "unknown-ja",
|
|
@@ -313,6 +313,24 @@
|
|
|
313
313
|
"resolves": "nb",
|
|
314
314
|
"note": "section 3.4 step 3a: the region strip reaches nb, which needs no registry alias."
|
|
315
315
|
},
|
|
316
|
+
{
|
|
317
|
+
"id": "strip-nn-no",
|
|
318
|
+
"tag": "nn-NO",
|
|
319
|
+
"resolves": "nn",
|
|
320
|
+
"note": "section 3.4 step 3a: the region strip reaches nn, which needs no registry alias."
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "strip-sq-al",
|
|
324
|
+
"tag": "sq-AL",
|
|
325
|
+
"resolves": "sq",
|
|
326
|
+
"note": "section 3.4 step 3a: the region strip reaches sq, which needs no registry alias."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"id": "strip-sq-xk",
|
|
330
|
+
"tag": "sq-XK",
|
|
331
|
+
"resolves": "sq",
|
|
332
|
+
"note": "section 3.4 step 3a: the region strip reaches sq, which needs no registry alias."
|
|
333
|
+
},
|
|
316
334
|
{
|
|
317
335
|
"id": "alias-no",
|
|
318
336
|
"tag": "no",
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec": "1.29.0",
|
|
3
|
+
"locale": "nn",
|
|
4
|
+
"cases": [
|
|
5
|
+
{
|
|
6
|
+
"id": "nn-quotes-primary",
|
|
7
|
+
"rule": "quotes",
|
|
8
|
+
"mode": "text",
|
|
9
|
+
"in": "Han sa: \"Eg er trøytt.\" og gjekk.",
|
|
10
|
+
"out": "Han sa: «Eg er trøytt.» og gjekk.",
|
|
11
|
+
"note": "Språkrådet, «Hermeteikn»: «…» is the pinned primary form; the full stop of a quotation that is a sentence stays inside."
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "nn-quotes-nested-secondary",
|
|
15
|
+
"rule": "quotes",
|
|
16
|
+
"mode": "text",
|
|
17
|
+
"in": "Han sa: \"Ho sa 'ja' til meg\" og gjekk.",
|
|
18
|
+
"out": "Han sa: «Ho sa ‘ja’ til meg» og gjekk.",
|
|
19
|
+
"note": "Språkrådet, «Sitat i sitat»: a quotation inside a quotation takes single marks; ‘…’ is the pin among the three permitted single forms."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "nn-quotes-nested-at-end",
|
|
23
|
+
"rule": "quotes",
|
|
24
|
+
"mode": "text",
|
|
25
|
+
"in": "Han sa: \"Ho sa 'ja'\" og gjekk.",
|
|
26
|
+
"out": "Han sa: «Ho sa ‘ja’» og gjekk.",
|
|
27
|
+
"note": "Språkrådet, «Sitat i sitat»: a nest that ends against the outer closer is still paired."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "nn-quotes-already-typeset",
|
|
31
|
+
"rule": "quotes",
|
|
32
|
+
"mode": "text",
|
|
33
|
+
"in": "Han sa «ja» og gjekk.",
|
|
34
|
+
"out": "Han sa «ja» og gjekk.",
|
|
35
|
+
"note": "Språkrådet, «Hermeteikn»: text already carrying «…» is a fixed point."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "nn-quotes-already-typeset-nested",
|
|
39
|
+
"rule": "quotes",
|
|
40
|
+
"mode": "text",
|
|
41
|
+
"in": "Han sa «ho sa ‘ja’ til meg» og gjekk.",
|
|
42
|
+
"out": "Han sa «ho sa ‘ja’ til meg» og gjekk.",
|
|
43
|
+
"note": "Språkrådet, «Sitat i sitat»: already-typeset nesting is a fixed point."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "nn-quotes-double-curly-input",
|
|
47
|
+
"rule": "quotes",
|
|
48
|
+
"mode": "text",
|
|
49
|
+
"in": "Han sa “ja” og gjekk.",
|
|
50
|
+
"out": "Han sa «ja» og gjekk.",
|
|
51
|
+
"note": "Språkrådet, «Hermeteikn»: “…” is an equally correct form; the pin normalises it to «…»."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "nn-quotes-low-high-input",
|
|
55
|
+
"rule": "quotes",
|
|
56
|
+
"mode": "text",
|
|
57
|
+
"in": "Han sa „ja“ og gjekk.",
|
|
58
|
+
"out": "Han sa «ja» og gjekk.",
|
|
59
|
+
"note": "Språkrådet, «Hermeteikn»: „…“ (also „…”) was common in print until about 1900 and is less common now; it is normalised to the pinned pair."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "nn-quotes-danish-guillemets-input",
|
|
63
|
+
"rule": "quotes",
|
|
64
|
+
"mode": "text",
|
|
65
|
+
"in": "Han sa »ja« og gjekk.",
|
|
66
|
+
"out": "Han sa «ja» og gjekk.",
|
|
67
|
+
"note": "Språkrådet, «Hermeteikn»: the reversed pair »…« is not a Norwegian form in the pages read; it is normalised to «…»."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "nn-quotes-no-inner-space",
|
|
71
|
+
"rule": "quotes",
|
|
72
|
+
"mode": "text",
|
|
73
|
+
"in": "Han sa: \" ja \" og gjekk.",
|
|
74
|
+
"out": "Han sa: «ja» og gjekk.",
|
|
75
|
+
"note": "Språkrådet, «Hermeteikn»: no example carries a space inside the marks (innerSpace none)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "nn-quotes-question-inside",
|
|
79
|
+
"rule": "quotes",
|
|
80
|
+
"mode": "text",
|
|
81
|
+
"in": "\"Kva?\" spurde han.",
|
|
82
|
+
"out": "«Kva?» spurde han.",
|
|
83
|
+
"note": "Språkrådet, «Hermeteikn»: a question mark that belongs to the quotation stays before the closing mark."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "nn-ellipsis-three-dots",
|
|
87
|
+
"rule": "ellipsis",
|
|
88
|
+
"mode": "text",
|
|
89
|
+
"in": "Vent... og så.",
|
|
90
|
+
"out": "Vent… og så.",
|
|
91
|
+
"note": "Språkrådet, «Mellomrom», shows both three full stops («så ...») and the single character («Svarte f…!») without ruling between them; conversion to U+2026 is the engine's ellipsis rule (ellipsis.md), not a Språkrådet norm."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "nn-ellipsis-before-question",
|
|
95
|
+
"rule": "ellipsis",
|
|
96
|
+
"mode": "text",
|
|
97
|
+
"in": "Er det no...?",
|
|
98
|
+
"out": "Er det no…?",
|
|
99
|
+
"note": "Språkrådet, «Mellomrom»: «eller ...?» puts the terminal mark after the dots; abbreviatedAfterTerminal is false."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "nn-ellipsis-before-exclamation",
|
|
103
|
+
"rule": "ellipsis",
|
|
104
|
+
"mode": "text",
|
|
105
|
+
"in": "Kva no...!",
|
|
106
|
+
"out": "Kva no…!",
|
|
107
|
+
"note": "Språkrådet, «Mellomrom»: «Svarte f…!»: the terminal mark follows the dots."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "nn-dashes-parenthetical",
|
|
111
|
+
"rule": "dashes",
|
|
112
|
+
"mode": "text",
|
|
113
|
+
"in": "No - ikkje minst - går vi.",
|
|
114
|
+
"out": "No – ikkje minst – går vi.",
|
|
115
|
+
"note": "Språkrådet, «Tankestrek»: «med ett mellomrom på begge sider»; the short dash U+2013."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "nn-dashes-em-input",
|
|
119
|
+
"rule": "dashes",
|
|
120
|
+
"mode": "text",
|
|
121
|
+
"in": "No — ikkje minst — går vi.",
|
|
122
|
+
"out": "No – ikkje minst – går vi.",
|
|
123
|
+
"note": "Språkrådet, «Tankestrek»: «Vi bruker kort tankestrek (–), ikke lang (—)»; an em dash is normalised to the en dash."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "nn-dashes-existing-en",
|
|
127
|
+
"rule": "dashes",
|
|
128
|
+
"mode": "text",
|
|
129
|
+
"in": "No – ikkje minst – går vi.",
|
|
130
|
+
"out": "No – ikkje minst – går vi.",
|
|
131
|
+
"note": "Språkrådet, «Tankestrek»: the spaced en dash is a fixed point."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "nn-ranges-hyphen-converted",
|
|
135
|
+
"rule": "ranges",
|
|
136
|
+
"rules": {
|
|
137
|
+
"ranges": true
|
|
138
|
+
},
|
|
139
|
+
"mode": "text",
|
|
140
|
+
"in": "kapitla 2-10",
|
|
141
|
+
"out": "kapitla 2–10",
|
|
142
|
+
"note": "Språkrådet, «Tankestrek»: «kapitlene 2–10»: the range takes the en dash with no spaces; ranges.md §3.3.1 binds the dash with word joiners when a hyphen-typed range is converted."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "nn-ranges-opening-hours",
|
|
146
|
+
"rule": "ranges",
|
|
147
|
+
"rules": {
|
|
148
|
+
"ranges": true
|
|
149
|
+
},
|
|
150
|
+
"mode": "text",
|
|
151
|
+
"in": "opent 9-19",
|
|
152
|
+
"out": "opent 9–19",
|
|
153
|
+
"note": "Språkrådet, «Mellomrom»: «opningstid: 9–19»; ranges.md §3.2 G4's one-digit against two-digit branch admits it."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "nn-ranges-authored-unbound",
|
|
157
|
+
"rule": "ranges",
|
|
158
|
+
"rules": {
|
|
159
|
+
"ranges": true
|
|
160
|
+
},
|
|
161
|
+
"mode": "text",
|
|
162
|
+
"in": "kapitla 2–10",
|
|
163
|
+
"out": "kapitla 2–10",
|
|
164
|
+
"note": "Språkrådet, «Tankestrek»: an authored en-dash range is already correct and stays unbound; ranges.md §3.3.1 never makes an edit whose entire content is invisible."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "nn-ranges-date-words-untouched",
|
|
168
|
+
"rule": "ranges",
|
|
169
|
+
"rules": {
|
|
170
|
+
"ranges": true
|
|
171
|
+
},
|
|
172
|
+
"mode": "text",
|
|
173
|
+
"in": "1. mai–10. september",
|
|
174
|
+
"out": "1. mai–10. september",
|
|
175
|
+
"note": "Språkrådet, «Tankestrek»: «1. mai–10. september»; the dash is not digit-flanked and is left as typed (ranges.md §3)."
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "nn-ranges-abbreviated-year-declined",
|
|
179
|
+
"rule": "ranges",
|
|
180
|
+
"rules": {
|
|
181
|
+
"ranges": true
|
|
182
|
+
},
|
|
183
|
+
"mode": "text",
|
|
184
|
+
"in": "åra 1349-54",
|
|
185
|
+
"out": "åra 1349-54",
|
|
186
|
+
"note": "Språkrådet, «Tankestrek»: the source writes «1349–54» with an abbreviated second member; ranges.md §3.2 G4 declines a four-and-two digit pair, a recorded miss."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "nn-ranges-word-hyphen-untouched",
|
|
190
|
+
"rule": "ranges",
|
|
191
|
+
"rules": {
|
|
192
|
+
"ranges": true
|
|
193
|
+
},
|
|
194
|
+
"mode": "text",
|
|
195
|
+
"in": "e-post og EU-motstander",
|
|
196
|
+
"out": "e-post og EU-motstander",
|
|
197
|
+
"note": "Språkrådet, «Bindestrek»: a hyphen between letters is a compound hyphen and is untouched (ranges.md §3)."
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "nn-hyphen-noop",
|
|
201
|
+
"rule": "hyphen",
|
|
202
|
+
"mode": "text",
|
|
203
|
+
"in": "e-post og 50-årsdag og A4-format",
|
|
204
|
+
"out": "e-post og 50-årsdag og A4-format",
|
|
205
|
+
"note": "Språkrådet, «Bindestrek»: the hyphen is written in these compounds; the lists are empty, so nothing is bound."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "nn-nbsp-spaced-units",
|
|
209
|
+
"rule": "nbsp",
|
|
210
|
+
"mode": "text",
|
|
211
|
+
"in": "Prisen er 25 % og 10 kr og 3 km og 5 kg og 7 cm og 38 °C",
|
|
212
|
+
"out": "Prisen er 25 % og 10 kr og 3 km og 5 kg og 7 cm og 38 °C",
|
|
213
|
+
"note": "Språkrådet, «Mellomrom»: «Det skal vere mellomrom mellom tal og (forkorta) nemningar» (10 kr, 5,68 kg, 10 %, +5 °C); «Prosentteikn og mellomrom»: a hard space is welcome."
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "nn-nbsp-spaced-unit-inserted",
|
|
217
|
+
"rule": "nbsp",
|
|
218
|
+
"mode": "text",
|
|
219
|
+
"in": "Prisen 25% og 10kr her",
|
|
220
|
+
"out": "Prisen 25 % og 10 kr her",
|
|
221
|
+
"note": "Språkrådet, «Mellomrom»: a missing space between the number and % or kr is supplied, as a no-break space."
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"id": "nn-nbsp-spaced-unit-inserted-metric",
|
|
225
|
+
"rule": "nbsp",
|
|
226
|
+
"mode": "text",
|
|
227
|
+
"in": "Det er 3km og 5kg og 7cm og 38°C",
|
|
228
|
+
"out": "Det er 3 km og 5 kg og 7 cm og 38 °C",
|
|
229
|
+
"note": "Språkrådet, «Mellomrom»: the general rule for abbreviated designations, with °C exemplified."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "nn-nbsp-kr-with-full-stop",
|
|
233
|
+
"rule": "nbsp",
|
|
234
|
+
"mode": "text",
|
|
235
|
+
"in": "Det kostar 15 kr. i dag",
|
|
236
|
+
"out": "Det kostar 15 kr. i dag",
|
|
237
|
+
"note": "Språkrådet, «Kronebeløp: rekkjefølgje, komma og strek»: «Etter kr skal det ikkje stå punktum, bortsett frå til slutt i setningar»; the engine accepts a full stop after kr (nbsp.md §3.7) and does not remove it, so the space is bound and the full stop stays."
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"id": "nn-nbsp-single-letter-unit-inert",
|
|
241
|
+
"rule": "nbsp",
|
|
242
|
+
"mode": "text",
|
|
243
|
+
"in": "Det er 5 m og 3 g og 10 min",
|
|
244
|
+
"out": "Det er 5 m og 3 g og 10 min",
|
|
245
|
+
"note": "nbsp.md §3.7: single-letter and common-word units are not listed; min is also a Norwegian word."
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"id": "nn-nbsp-degree-bare-inert",
|
|
249
|
+
"rule": "nbsp",
|
|
250
|
+
"mode": "text",
|
|
251
|
+
"in": "I dag 18 °C, men i går berre 5°.",
|
|
252
|
+
"out": "I dag 18 °C, men i går berre 5°.",
|
|
253
|
+
"note": "Språkrådet, «Mellomrom»: «I dag er det 18 °C, men i går var det berre 5°»; a bare degree sign is written closed up and is not a listed unit."
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "nn-nbsp-abbreviations-inert",
|
|
257
|
+
"rule": "nbsp",
|
|
258
|
+
"mode": "text",
|
|
259
|
+
"in": "t.d. og m.a.o. og m.m.",
|
|
260
|
+
"out": "t.d. og m.a.o. og m.m.",
|
|
261
|
+
"note": "Språkrådet, «Punktum»: Norwegian abbreviations are written without an inner space, so there is nothing to bind."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "nn-nbsp-section-sign-inert",
|
|
265
|
+
"rule": "nbsp",
|
|
266
|
+
"mode": "text",
|
|
267
|
+
"in": "sjå § 10 og $ 10",
|
|
268
|
+
"out": "sjå § 10 og $ 10",
|
|
269
|
+
"note": "Språkrådet, «Mellomrom»: «§ 10» and «$ 10» are written with a space, but no source says the space is non-breaking, so it is left as typed."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "nn-spaces-before-punctuation",
|
|
273
|
+
"rule": "spaces",
|
|
274
|
+
"mode": "text",
|
|
275
|
+
"in": "Kva no ? Ikkje !",
|
|
276
|
+
"out": "Kva no? Ikkje!",
|
|
277
|
+
"note": "Språkrådet, «Mellomrom»: no space is written before ? or !."
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"id": "nn-spaces-brackets",
|
|
281
|
+
"rule": "spaces",
|
|
282
|
+
"mode": "text",
|
|
283
|
+
"in": "Han ( stille ) gjekk .",
|
|
284
|
+
"out": "Han (stille) gjekk.",
|
|
285
|
+
"note": "spaces.md: no space inside brackets or before a full stop."
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "nn-symbols-copyright",
|
|
289
|
+
"rule": "symbols",
|
|
290
|
+
"mode": "text",
|
|
291
|
+
"in": "(c) 2026",
|
|
292
|
+
"out": "© 2026",
|
|
293
|
+
"note": "symbols.md: (c) becomes ©."
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"id": "nn-apostrophe-foreign-name",
|
|
297
|
+
"rule": "apostrophe",
|
|
298
|
+
"mode": "text",
|
|
299
|
+
"in": "O'Brien kom.",
|
|
300
|
+
"out": "O’Brien kom.",
|
|
301
|
+
"note": "apostrophe.md: a straight apostrophe inside a word becomes U+2019."
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"id": "nn-quote-punctuation-none",
|
|
305
|
+
"rule": "quote-punctuation",
|
|
306
|
+
"rules": {
|
|
307
|
+
"quote-punctuation": true
|
|
308
|
+
},
|
|
309
|
+
"mode": "text",
|
|
310
|
+
"in": "alfa «beta», gamma",
|
|
311
|
+
"out": "alfa «beta», gamma",
|
|
312
|
+
"note": "Språkrådet, «Hermeteikn»: punctuationPlacement is none, because the full stop and question or exclamation mark go inside only when they belong to the quotation; the rule is a no-op and the comma stays where it stands."
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec": "1.29.0",
|
|
3
|
+
"locale": "sq",
|
|
4
|
+
"cases": [
|
|
5
|
+
{
|
|
6
|
+
"id": "sq-quotes-primary",
|
|
7
|
+
"rule": "quotes",
|
|
8
|
+
"mode": "text",
|
|
9
|
+
"in": "Ai tha: \"Jam i lodhur.\" dhe iku.",
|
|
10
|
+
"out": "Ai tha: “Jam i lodhur.” dhe iku.",
|
|
11
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 8 footnote: “…” is the pinned primary form; the full stop of a quotation that is an independent sentence stays inside (§145 Shënim 2)."
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "sq-quotes-nested-secondary",
|
|
15
|
+
"rule": "quotes",
|
|
16
|
+
"mode": "text",
|
|
17
|
+
"in": "Ai tha: \"Ajo tha 'po' mua\" dhe iku.",
|
|
18
|
+
"out": "Ai tha: “Ajo tha ‘po’ mua” dhe iku.",
|
|
19
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §150 Shënim 2: a quotation inside a quotation takes single marks; ‘…’ is the pin."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "sq-quotes-nested-at-end",
|
|
23
|
+
"rule": "quotes",
|
|
24
|
+
"mode": "text",
|
|
25
|
+
"in": "Ai tha: \"Ajo tha 'po'\" dhe iku.",
|
|
26
|
+
"out": "Ai tha: “Ajo tha ‘po’” dhe iku.",
|
|
27
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §150 Shënim 2: a nest that ends against the outer closer is still paired."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "sq-quotes-already-typeset",
|
|
31
|
+
"rule": "quotes",
|
|
32
|
+
"mode": "text",
|
|
33
|
+
"in": "Ai tha “po” dhe iku.",
|
|
34
|
+
"out": "Ai tha “po” dhe iku.",
|
|
35
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 8 footnote: text already carrying “…” is a fixed point."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "sq-quotes-already-typeset-nested",
|
|
39
|
+
"rule": "quotes",
|
|
40
|
+
"mode": "text",
|
|
41
|
+
"in": "Ai tha “ajo tha ‘po’ mua” dhe iku.",
|
|
42
|
+
"out": "Ai tha “ajo tha ‘po’ mua” dhe iku.",
|
|
43
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §150 Shënim 2: already-typeset nesting is a fixed point."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "sq-quotes-french-input",
|
|
47
|
+
"rule": "quotes",
|
|
48
|
+
"mode": "text",
|
|
49
|
+
"in": "Ai tha «po» dhe iku.",
|
|
50
|
+
"out": "Ai tha “po” dhe iku.",
|
|
51
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 8 footnote: «…» is the permitted, less used form; the pin normalises it to “…”."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "sq-quotes-low-high-input",
|
|
55
|
+
"rule": "quotes",
|
|
56
|
+
"mode": "text",
|
|
57
|
+
"in": "Ai tha „po“ dhe iku.",
|
|
58
|
+
"out": "Ai tha “po” dhe iku.",
|
|
59
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 8: „…“ is not among the forms the source gives; it is normalised to the pinned pair."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "sq-quotes-no-inner-space",
|
|
63
|
+
"rule": "quotes",
|
|
64
|
+
"mode": "text",
|
|
65
|
+
"in": "Ai tha: \" po \" dhe iku.",
|
|
66
|
+
"out": "Ai tha: “po” dhe iku.",
|
|
67
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §175: «Nuk lihen hapësira të bardha midis thonjëzave dhe tekstit futur brenda tyre»; innerSpace none."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "sq-quotes-question-inside",
|
|
71
|
+
"rule": "quotes",
|
|
72
|
+
"mode": "text",
|
|
73
|
+
"in": "\"Pse?\" pyeti ai.",
|
|
74
|
+
"out": "“Pse?” pyeti ai.",
|
|
75
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §145 Shënim 2 and §150 Shënim 1: punctuation placement follows meaning; a question mark that belongs to the quotation stays inside."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "sq-ellipsis-three-dots",
|
|
79
|
+
"rule": "ellipsis",
|
|
80
|
+
"mode": "text",
|
|
81
|
+
"in": "Prit... pastaj.",
|
|
82
|
+
"out": "Prit… pastaj.",
|
|
83
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 7: the ellipsis is three consecutive dots; the engine sets them as one U+2026."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "sq-ellipsis-before-question",
|
|
87
|
+
"rule": "ellipsis",
|
|
88
|
+
"mode": "text",
|
|
89
|
+
"in": "A është kjo...?",
|
|
90
|
+
"out": "A është kjo…?",
|
|
91
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §140 example «të mykura?...»: three dots stay with the terminal mark; abbreviatedAfterTerminal is false."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "sq-ellipsis-before-exclamation",
|
|
95
|
+
"rule": "ellipsis",
|
|
96
|
+
"mode": "text",
|
|
97
|
+
"in": "Çfarë tani...!",
|
|
98
|
+
"out": "Çfarë tani…!",
|
|
99
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 7: abbreviatedAfterTerminal is false; the dots are kept before «!»."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "sq-dashes-parenthetical",
|
|
103
|
+
"rule": "dashes",
|
|
104
|
+
"mode": "text",
|
|
105
|
+
"in": "Libri - botuar para luftës - është i mirë.",
|
|
106
|
+
"out": "Libri – botuar para luftës – është i mirë.",
|
|
107
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §175: «Vizat paraprihen dhe ndiqen gjithmonë nga një hapësirë e bardhë»; U+2013 is the pin."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "sq-dashes-em-input",
|
|
111
|
+
"rule": "dashes",
|
|
112
|
+
"mode": "text",
|
|
113
|
+
"in": "Libri — botuar para luftës — është i mirë.",
|
|
114
|
+
"out": "Libri – botuar para luftës – është i mirë.",
|
|
115
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §165 and §175: an em dash typed as the inserted-clause dash is normalised to the pinned spaced en dash."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "sq-dashes-existing-en",
|
|
119
|
+
"rule": "dashes",
|
|
120
|
+
"mode": "text",
|
|
121
|
+
"in": "Libri – botuar para luftës – është i mirë.",
|
|
122
|
+
"out": "Libri – botuar para luftës – është i mirë.",
|
|
123
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §175: already-typeset spaced en dashes are a fixed point."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "sq-ranges-none-hyphen-untouched",
|
|
127
|
+
"rule": "ranges",
|
|
128
|
+
"mode": "text",
|
|
129
|
+
"in": "vitet 1939-1944",
|
|
130
|
+
"out": "vitet 1939-1944",
|
|
131
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §68 and §69 disagree on one shape (hyphen for approximations and numbers, long dash for time spans); ranges.md §2: dash.range \"none\" disables the rule, so the hyphen is left as typed.",
|
|
132
|
+
"rules": {
|
|
133
|
+
"ranges": true
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "sq-ranges-none-approximate-quantity",
|
|
138
|
+
"rule": "ranges",
|
|
139
|
+
"mode": "text",
|
|
140
|
+
"in": "për 5-6 ditë",
|
|
141
|
+
"out": "për 5-6 ditë",
|
|
142
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §68 a): a hyphen marks an approximate quantity; ranges.md §2: dash.range \"none\" leaves it untouched.",
|
|
143
|
+
"rules": {
|
|
144
|
+
"ranges": true
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "sq-hyphen-noop",
|
|
149
|
+
"rule": "hyphen",
|
|
150
|
+
"mode": "text",
|
|
151
|
+
"in": "e-mail dhe 50-vjetor dhe A4-format",
|
|
152
|
+
"out": "e-mail dhe 50-vjetor dhe A4-format",
|
|
153
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 b): the line-break constraint is not expressible, so the hyphen lists are empty and the rule leaves the text unchanged."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "sq-nbsp-units-bound",
|
|
157
|
+
"rule": "nbsp",
|
|
158
|
+
"mode": "text",
|
|
159
|
+
"in": "Rruga është 3 km dhe 5 kg dhe 7 cm dhe 4 dm dhe 90 ha",
|
|
160
|
+
"out": "Rruga është 3 km dhe 5 kg dhe 7 cm dhe 4 dm dhe 90 ha",
|
|
161
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 ç): measure abbreviations do not break from the preceding number; beforeUnits binds the written space with U+00A0."
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "sq-nbsp-square-unit",
|
|
165
|
+
"rule": "nbsp",
|
|
166
|
+
"mode": "text",
|
|
167
|
+
"in": "Sipërfaqja është 28 800 km² këtu",
|
|
168
|
+
"out": "Sipërfaqja është 28 800 km² këtu",
|
|
169
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 ç): «28 800 km²» is an example of a measure that does not break from its number."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "sq-nbsp-unit-touching-inert",
|
|
173
|
+
"rule": "nbsp",
|
|
174
|
+
"mode": "text",
|
|
175
|
+
"in": "Rruga është 3km dhe 5kg",
|
|
176
|
+
"out": "Rruga është 3km dhe 5kg",
|
|
177
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 ç): the source states that the unit stays with the number, not whether a missing space is inserted; beforeUnits only converts a written space, so touching text is untouched."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "sq-nbsp-percent-inert",
|
|
181
|
+
"rule": "nbsp",
|
|
182
|
+
"mode": "text",
|
|
183
|
+
"in": "Rritja është 100 % dhe 100% dhe 30‰ këtu",
|
|
184
|
+
"out": "Rritja është 100 % dhe 100% dhe 30‰ këtu",
|
|
185
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 ç) and p. 132: % and ‰ are printed closed up, which is typesetting and not a stated rule; neither is listed, so the text is untouched."
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"id": "sq-nbsp-section-sign",
|
|
189
|
+
"rule": "nbsp",
|
|
190
|
+
"mode": "text",
|
|
191
|
+
"in": "shih § 12 dhe § 67",
|
|
192
|
+
"out": "shih § 12 dhe § 67",
|
|
193
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 d): the paragraph sign does not break from its number; afterSymbols binds it with U+00A0."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "sq-nbsp-single-letter-unit-inert",
|
|
197
|
+
"rule": "nbsp",
|
|
198
|
+
"mode": "text",
|
|
199
|
+
"in": "Ka 5 m dhe 3 g dhe 2 l",
|
|
200
|
+
"out": "Ka 5 m dhe 3 g dhe 2 l",
|
|
201
|
+
"note": "nbsp.md §3.7: single-letter units cannot be told from words and are not listed; the text is untouched."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "sq-nbsp-degree-inert",
|
|
205
|
+
"rule": "nbsp",
|
|
206
|
+
"mode": "text",
|
|
207
|
+
"in": "Sot 18 °C dhe 5 €",
|
|
208
|
+
"out": "Sot 18 °C dhe 5 €",
|
|
209
|
+
"note": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973): neither °C nor a currency is addressed; the lists carry no entry and the text is untouched."
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "sq-spaces-before-punctuation",
|
|
213
|
+
"rule": "spaces",
|
|
214
|
+
"mode": "text",
|
|
215
|
+
"in": "Pse ? Jo !",
|
|
216
|
+
"out": "Pse? Jo!",
|
|
217
|
+
"note": "Locale-independent spaces rule: no sq-specific spacing before terminal marks is claimed."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "sq-spaces-brackets",
|
|
221
|
+
"rule": "spaces",
|
|
222
|
+
"mode": "text",
|
|
223
|
+
"in": "Ai ( i qetë ) shkoi .",
|
|
224
|
+
"out": "Ai (i qetë) shkoi.",
|
|
225
|
+
"note": "Locale-independent spaces rule: no sq-specific bracket spacing is claimed."
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "sq-symbols-copyright",
|
|
229
|
+
"rule": "symbols",
|
|
230
|
+
"mode": "text",
|
|
231
|
+
"in": "(c) 2026",
|
|
232
|
+
"out": "© 2026",
|
|
233
|
+
"note": "Locale-independent symbols rule."
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "sq-apostrophe-foreign-name",
|
|
237
|
+
"rule": "apostrophe",
|
|
238
|
+
"mode": "text",
|
|
239
|
+
"in": "O'Brien erdhi.",
|
|
240
|
+
"out": "O’Brien erdhi.",
|
|
241
|
+
"note": "Locale-independent apostrophe rule: the straight apostrophe in a name becomes U+2019; elisionIdioms and elisionClitics are empty because the sources do not address them."
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "sq-quote-punctuation-none",
|
|
245
|
+
"rule": "quote-punctuation",
|
|
246
|
+
"mode": "text",
|
|
247
|
+
"in": "alfa “beta”, gamma",
|
|
248
|
+
"out": "alfa “beta”, gamma",
|
|
249
|
+
"note": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §145 Shënim 2 and §150 Shënim 1: placement follows meaning, so punctuationPlacement is none and the rule does not move the comma.",
|
|
250
|
+
"rules": {
|
|
251
|
+
"quote-punctuation": true
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"locale": "nn",
|
|
3
|
+
"name": "Norwegian Nynorsk",
|
|
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": [],
|
|
19
|
+
"after": []
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dash": {
|
|
23
|
+
"parenthetical": "en-spaced",
|
|
24
|
+
"range": "en-tight"
|
|
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": [],
|
|
39
|
+
"beforeUnits": [],
|
|
40
|
+
"spacedUnits": ["%", "kr", "km", "kg", "cm", "°C"],
|
|
41
|
+
"closedUnits": [],
|
|
42
|
+
"beforeNumber": [],
|
|
43
|
+
"beforeWord": [],
|
|
44
|
+
"afterSymbols": [],
|
|
45
|
+
"initialBinding": "none"
|
|
46
|
+
},
|
|
47
|
+
"sources": [
|
|
48
|
+
{
|
|
49
|
+
"rule": "quotes",
|
|
50
|
+
"cite": "Språkrådet, «Hermeteikn» (Godt og korrekt språk › Tegn): «Sitat inni eit sitat markerer vi med enkle hermeteikn»; «Komma skal setjast utanfor, anten det opphavleg høyrer til sitatet eller ikkje»; språkspørsmål «Hermeteikn, kva slags?» (last updated 1 January 2024): «Dei to formene for hermeteikn som er vanlegast i norsk […] Dei blir rekna som like rette»; «Sitat i sitat» (last updated 1 January 2024): «Eit sitat inni eit anna sitat bør helst markerast med enkle hermeteikn»; «Enkle vinklar er mindre brukt, men […] kan gjerne brukast»",
|
|
51
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/hermeteikn/",
|
|
52
|
+
"note": "PICK-AND-PIN, identical to nb: «…» (U+00AB, U+00BB) with ‘…’ (U+2018, U+2019) inside. All three pages are written in Nynorsk; Språkrådet publishes one version of each and states no separate rule for either written standard. The doubled-comma form is called equally correct; «Hermeteikn, kva slags?» reports that guillemets are the most common form in print and, as far as Språkrådet knows, the agreed computer default. Inner level: single marks are preferred; ’…’ (U+2019 both sides, «9 9 er det tradisjonelle i norsk») and ‹…› (U+2039, U+203A) are also allowed, and ‘…’ is pinned because «Sitat i sitat» uses it in its examples. innerSpace none. punctuationPlacement none: the comma goes outside; a full stop, question mark or exclamation mark goes inside only when it belongs to the quotation. elisionIdioms and elisionClitics empty: not addressed. ACCEPTED GAP: «Sitat i sitat» recommends a thin space (U+2009) where a double and a single mark touch, which the schema cannot express. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"rule": "dashes",
|
|
56
|
+
"cite": "Språkrådet, «Mellomrom» (Nynorsk text): «Det skal vere mellomrom føre (og etter) ein tankestrek ved innskot og i liknande funksjonar» («Han har – sant å seie – ikkje lenge att»); «Tankestrek» (Bokmål only): «Vi bruker kort tankestrek (–), ikke lang (—)»",
|
|
57
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
|
|
58
|
+
"note": "dash.parenthetical = en-spaced (U+0020 U+2013 U+0020). The spacing is stated in Nynorsk. That the dash is U+2013 and not U+2014 is stated only on the Tankestrek page, which exists in Bokmål alone (https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/tankestrek/); it is a common page for both written standards, and the Nynorsk «Kronebeløp» answer confirms only «tankestrek, ikkje bindestrek». The dialogue dash is not encoded. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"rule": "ranges",
|
|
62
|
+
"cite": "Språkrådet, «Mellomrom» (Nynorsk text): «Det skal ikkje vere mellomrom føre og etter tankestrekar som viser tidsrom, avstandar, relasjonar eller andre motpolar» («1. mai–10. september»)",
|
|
63
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
|
|
64
|
+
"note": "dash.range = en-tight (U+2013, no spaces), identical to nb. The Bokmål Tankestrek page gives the same rule with further examples (1349–54, 2–10). Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"rule": "ellipsis",
|
|
68
|
+
"cite": "Språkrådet, «Mellomrom» (Nynorsk text): «Er det meininga å gjere det slik, eller ...?», «Svarte f…!»",
|
|
69
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
|
|
70
|
+
"note": "abbreviatedAfterTerminal = false: in every example the terminal mark follows the dots, and no source reduces the dots after ? or !. Spacing before the dots depends on what is omitted and is not encoded. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"rule": "hyphen",
|
|
74
|
+
"cite": "Språkrådet, «Bindestrek» (Bokmål only; no Nynorsk version published): when a hyphen is written, e.g. «2.-prioritetslån», «e-post»",
|
|
75
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/bindestrek/",
|
|
76
|
+
"note": "All three lists are empty: no source, in either written standard, says where a line must not break. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"rule": "nbsp",
|
|
80
|
+
"cite": "Språkrådet, «Mellomrom» (Nynorsk text): «Det skal vere mellomrom mellom tal og (forkorta) nemningar anten nemninga står framfor talet eller etter det» (10 kr, 5,68 kg, 10 %, +5 °C, § 10); språkspørsmål «Prosentteikn og mellomrom» (last updated 1 January 2024): «Det rette er 25 %, med mellomrom mellom sifferet og prosentteiknet», recommending «hardt eller fast mellomrom»; «Kronebeløp: rekkjefølgje, komma og strek» (last updated 1 January 2024): «I vanleg tekst er 500 kr (eller helst 500 kroner) i utgangspunktet det beste»",
|
|
81
|
+
"url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
|
|
82
|
+
"note": "spacedUnits = % kr km kg cm °C, identical to nb. A hard space is stated only for % (https://sprakradet.no/spraksporsmal-og-svar/prosentteikn-og-mellomrom/); the other units take the same pin. kr carries no full stop and has the same form in Nynorsk (https://sprakradet.no/spraksporsmal-og-svar/kronebelop-rekkjefolgje-komma-og-strek/); nkr is advised only when several currencies appear, which is word choice and not encoded. A bare ° is written closed up («5°»), so only °C is listed. Single-letter and common-word units (m, l, min) are excluded (nbsp.md §3.7). closedUnits, abbreviations, afterSymbols and the other lists are empty, and initialBinding is none: not addressed. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.29.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",
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
"lv",
|
|
33
33
|
"et",
|
|
34
34
|
"da",
|
|
35
|
-
"nb"
|
|
35
|
+
"nb",
|
|
36
|
+
"nn",
|
|
37
|
+
"sq"
|
|
36
38
|
],
|
|
37
39
|
"aliases": {
|
|
38
40
|
"en": "en-US",
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"locale": "sq",
|
|
3
|
+
"name": "Albanian",
|
|
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": [],
|
|
19
|
+
"after": []
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dash": {
|
|
23
|
+
"parenthetical": "en-spaced",
|
|
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": [],
|
|
39
|
+
"beforeUnits": ["km", "kg", "cm", "dm", "ha", "km²"],
|
|
40
|
+
"spacedUnits": [],
|
|
41
|
+
"closedUnits": [],
|
|
42
|
+
"beforeNumber": [],
|
|
43
|
+
"beforeWord": [],
|
|
44
|
+
"afterSymbols": ["§"],
|
|
45
|
+
"initialBinding": "none"
|
|
46
|
+
},
|
|
47
|
+
"sources": [
|
|
48
|
+
{
|
|
49
|
+
"rule": "quotes",
|
|
50
|
+
"cite": "Akademia e Shkencave e Shqipërisë, Instituti i Gjuhësisë dhe i Letërsisë, «Rregullat e pikësimit në gjuhën shqipe» (Shkenca, Tiranë 2002), ch. 8 «Thonjëzat», footnote p. 88: «Thonjëzat mund të realizohen grafikisht në dy forma që nuk paraqesin ndonjë ndryshim në përdorim. Thonjëzat e larta (“ ”) të quajtura dhe angleze, janë më të zakonshme në kompjuter. Thonjëzat e ulta (« ») të quajtura edhe franceze janë më pak të përdorshme»; §150 Shënim 2: «Duhet të përdoren edhe thonjëzat njëshe, në qoftë se përdoren thonjëzat brenda një teksti të mbyllur në thonjëza»; §175: «Nuk lihen hapësira të bardha midis thonjëzave dhe tekstit të futur brenda tyre»; §145 Shënim 2 and §150 Shënim 1 (full stop inside only when the quoted part is a syntactically independent sentence)",
|
|
51
|
+
"url": "https://archive.org/download/rregullat-e-pikesimit-ne-gjuhen-shqipe-akademia-e-shkencave-e-shqiperise-2002/Rregullat%20e%20pik%C3%ABsimit%20n%C3%AB%20gjuh%C3%ABn%20shqipe%2C%20Akademia%20e%20Shkencave%20e%20Shqip%C3%ABris%C3%AB%20%282002%29.pdf",
|
|
52
|
+
"note": "PICK-AND-PIN: “…” (U+201C, U+201D) with ‘…’ (U+2018, U+2019) inside. The source calls both forms equal in use and names the high marks the more common on a computer; every example in §§145–153 uses them. «…» (U+00AB, U+00BB) is the permitted, less used form, and the 1973 Drejtshkrimi uses it in its examples. »…« is not attested in any source read. innerSpace none. punctuationPlacement none: placement follows meaning, per §145 Shënim 2 and §150 Shënim 1. elisionIdioms and elisionClitics empty: not addressed. Read 2026-11-16 from archive.org page images of the scan."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"rule": "dashes",
|
|
56
|
+
"cite": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), §165: «Viza përdoret për të veçuar fjalitë e ndërkallura»; §175: «Vizat paraprihen dhe ndiqen gjithmonë nga një hapësirë e bardhë: tekst – fjali e ndërkallur – tekst»",
|
|
57
|
+
"url": "https://archive.org/download/rregullat-e-pikesimit-ne-gjuhen-shqipe-akademia-e-shkencave-e-shqiperise-2002/Rregullat%20e%20pik%C3%ABsimit%20n%C3%AB%20gjuh%C3%ABn%20shqipe%2C%20Akademia%20e%20Shkencave%20e%20Shqip%C3%ABris%C3%AB%20%282002%29.pdf",
|
|
58
|
+
"note": "dash.parenthetical = en-spaced (U+0020 U+2013 U+0020). The spacing is normative. The code point is PICK-AND-PIN: both sources call the dash «viza e gjatë» (2002 §163 and p. 109; 1973 §69), which sets it against the hyphen, «vizë lidhëse», and does not name en or em; the 2002 rules print it short throughout (heading «10. VIZA (–)») and the 1973 Drejtshkrimi prints it long. U+2013 is pinned. Read 2026-11-16 from archive.org page images of the scan."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"rule": "ranges",
|
|
62
|
+
"cite": "Akademia e Shkencave e RP të Shqipërisë, Instituti i Gjuhësisë dhe i Letërsisë, «Drejtshkrimi i gjuhës shqipe» (Tiranë 1973), §69 b): «Shkruhen me vizë të gjatë në mes tyre: … numërorët që shënojnë caqet e një hapësire kohore: periudha 1939—1944»; §68 a): approximate quantities take a hyphen, «10-15 vjet», «5-6 ditë»; §68 i): «27-51, 25-09»",
|
|
63
|
+
"url": "https://www.klasaletersi.com/wp-content/uploads/2017/03/Drejtshrimi-i-gjuh%C3%ABs-shqipe-1973.pdf",
|
|
64
|
+
"note": "dash.range = none. The source asks for a long dash in time spans and for a hyphen in approximate quantities and number groups of the same shape («5-6 ditë», «27-51»); the ranges rule reads only code points and cannot tell them apart, so converting would break the second norm. Read 2026-11-16 from the scan."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"rule": "ellipsis",
|
|
68
|
+
"cite": "Akademia e Shkencave e Shqipërisë, «Rregullat e pikësimit në gjuhën shqipe» (2002), ch. 7: «Shumëpikëshi është shenjë pikësimi e përbërë prej tri pikash të njëpasnjëshme»; §175: «… tre pikat vijnë menjëherë pas shkronjës së fundit»; §140 example «të mykura?...»",
|
|
69
|
+
"url": "https://archive.org/download/rregullat-e-pikesimit-ne-gjuhen-shqipe-akademia-e-shkencave-e-shqiperise-2002/Rregullat%20e%20pik%C3%ABsimit%20n%C3%AB%20gjuh%C3%ABn%20shqipe%2C%20Akademia%20e%20Shkencave%20e%20Shqip%C3%ABris%C3%AB%20%282002%29.pdf",
|
|
70
|
+
"note": "abbreviatedAfterTerminal = false: the example keeps three dots after a question mark. Read 2026-11-16 from archive.org page images of the scan."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"rule": "hyphen",
|
|
74
|
+
"cite": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 b): ordinal suffixes after Arabic numerals and endings written with a hyphen are not divided at line end («Kongresi i 6-të», «SMT-ja, PTT-së, TEC-it»)",
|
|
75
|
+
"url": "https://www.klasaletersi.com/wp-content/uploads/2017/03/Drejtshrimi-i-gjuh%C3%ABs-shqipe-1973.pdf",
|
|
76
|
+
"note": "All three lists are empty: the constraint cannot be expressed, because a hyphen-rule suffix must follow a letter while here it follows a digit or an open set of abbreviations. The source is not silent. Read 2026-11-16 from the scan."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"rule": "nbsp",
|
|
80
|
+
"cite": "Akademia e Shkencave e RP të Shqipërisë, «Drejtshkrimi i gjuhës shqipe» (1973), §99 ç): «Nuk ndahen në fund të rreshtit: … shkurtimet e njësive të masave dhe shenjat e përqindjes e të përmijës nga shifra që u prin: … 35 cm, 50 dm, 40 km, 28 800 km², 90 ha, 3 m³, 200 g, 35 kg, 70 kv, 2 l; 100%, 112%, 30‰»; §99 d): «shenja e paragrafit dhe numri e shkronja që vijnë pas saj … : § 12»; note on p. 132: «Shenjat % (për qind) dhe ‰ (për mijë) mund të përdoren vetëm pas një numri të shënuar me shifra: 5%, 90%, 80‰»",
|
|
81
|
+
"url": "https://www.klasaletersi.com/wp-content/uploads/2017/03/Drejtshrimi-i-gjuh%C3%ABs-shqipe-1973.pdf",
|
|
82
|
+
"note": "beforeUnits = km kg cm dm ha km²; afterSymbols = §. That a measure abbreviation does not break from the number before it is normative (§99 ç)); the units are therefore bound with U+00A0 where a space is already written. Whether the separator must be inserted or deleted is not stated: the examples print measures spaced and % ‰ closed up, which is typesetting, not a rule, so spacedUnits and closedUnits are empty and % ‰ are not listed. Single-letter units (g, l) and m³ are excluded (nbsp.md §3.7); kv is not listed. Currency (€, lekë) and °C are not addressed. beforePunctuation, abbreviations and the other lists are empty, initialBinding is none. Read 2026-11-16 from the scan."
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -132,7 +132,7 @@ module-level mutable state, reentrant).
|
|
|
132
132
|
|
|
133
133
|
- **Never fall back to English**, or to any other default, under any circumstance. Not on an
|
|
134
134
|
unknown language, not on a malformed tag, not on an empty string.
|
|
135
|
-
- **Never fall back to a "nearest" language.** `
|
|
135
|
+
- **Never fall back to a "nearest" language.** `fo` does not resolve to `da`, `nl` does not
|
|
136
136
|
resolve to `de`, `pt` does not resolve to `fr`.
|
|
137
137
|
- **Never fall back to the first entry of `registry.locales`.**
|
|
138
138
|
- **Never consult the host environment** — `LANG`, `LC_ALL`, `navigator.language`,
|
|
@@ -177,7 +177,7 @@ Against `spec/locales/registry.json` as of spec 0.2.0:
|
|
|
177
177
|
| `DE` | `de` | canonicalise, alias | `de-DE` |
|
|
178
178
|
| `xx-YY` | `xx-YY` | no exact, no alias, strip → `xx`, no exact, no alias | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
179
179
|
| `xx` | `xx` | no exact, no alias, nothing to strip | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
180
|
-
| `
|
|
180
|
+
| `fo-FO` | `fo-FO` | strip → `fo`, miss | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
181
181
|
| `eng` | — | fails §3.3 (length 3) | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
182
182
|
| `sr-Latn` | — | fails §3.3 (length 7) | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
183
183
|
| `es-419` | — | fails §3.3 (region not `A`–`Z`) | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.29.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.29.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iurii Rogulia
|
|
@@ -61,6 +61,7 @@ files:
|
|
|
61
61
|
- lib/polytypo/data/fixtures/lv.json
|
|
62
62
|
- lib/polytypo/data/fixtures/nb.json
|
|
63
63
|
- lib/polytypo/data/fixtures/nl.json
|
|
64
|
+
- lib/polytypo/data/fixtures/nn.json
|
|
64
65
|
- lib/polytypo/data/fixtures/pl.json
|
|
65
66
|
- lib/polytypo/data/fixtures/pt-BR.json
|
|
66
67
|
- lib/polytypo/data/fixtures/pt-PT.json
|
|
@@ -68,6 +69,7 @@ files:
|
|
|
68
69
|
- lib/polytypo/data/fixtures/ru.json
|
|
69
70
|
- lib/polytypo/data/fixtures/sk.json
|
|
70
71
|
- lib/polytypo/data/fixtures/sl.json
|
|
72
|
+
- lib/polytypo/data/fixtures/sq.json
|
|
71
73
|
- lib/polytypo/data/fixtures/sr.json
|
|
72
74
|
- lib/polytypo/data/fixtures/sv.json
|
|
73
75
|
- lib/polytypo/data/fixtures/tr.json
|
|
@@ -92,6 +94,7 @@ files:
|
|
|
92
94
|
- lib/polytypo/data/locales/lv.json
|
|
93
95
|
- lib/polytypo/data/locales/nb.json
|
|
94
96
|
- lib/polytypo/data/locales/nl.json
|
|
97
|
+
- lib/polytypo/data/locales/nn.json
|
|
95
98
|
- lib/polytypo/data/locales/pl.json
|
|
96
99
|
- lib/polytypo/data/locales/pt-BR.json
|
|
97
100
|
- lib/polytypo/data/locales/pt-PT.json
|
|
@@ -100,6 +103,7 @@ files:
|
|
|
100
103
|
- lib/polytypo/data/locales/ru.json
|
|
101
104
|
- lib/polytypo/data/locales/sk.json
|
|
102
105
|
- lib/polytypo/data/locales/sl.json
|
|
106
|
+
- lib/polytypo/data/locales/sq.json
|
|
103
107
|
- lib/polytypo/data/locales/sr.json
|
|
104
108
|
- lib/polytypo/data/locales/sv.json
|
|
105
109
|
- lib/polytypo/data/locales/tr.json
|