polytypo 1.25.0 → 1.27.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/polytypo/data/VERSION +1 -1
  3. data/lib/polytypo/data/fixtures/bg.json +1 -1
  4. data/lib/polytypo/data/fixtures/cs.json +1 -1
  5. data/lib/polytypo/data/fixtures/da.json +295 -0
  6. data/lib/polytypo/data/fixtures/de-CH.json +1 -1
  7. data/lib/polytypo/data/fixtures/de-DE.json +1 -1
  8. data/lib/polytypo/data/fixtures/el.json +1 -1
  9. data/lib/polytypo/data/fixtures/en-GB.json +1 -1
  10. data/lib/polytypo/data/fixtures/en-US.json +1 -1
  11. data/lib/polytypo/data/fixtures/es.json +1 -1
  12. data/lib/polytypo/data/fixtures/et.json +1 -1
  13. data/lib/polytypo/data/fixtures/fi.json +1 -1
  14. data/lib/polytypo/data/fixtures/fr-CA.json +1 -1
  15. data/lib/polytypo/data/fixtures/fr.json +1 -1
  16. data/lib/polytypo/data/fixtures/hr.json +1 -1
  17. data/lib/polytypo/data/fixtures/hu.json +1 -1
  18. data/lib/polytypo/data/fixtures/it.json +1 -1
  19. data/lib/polytypo/data/fixtures/locale-resolution.json +28 -4
  20. data/lib/polytypo/data/fixtures/lt.json +1 -1
  21. data/lib/polytypo/data/fixtures/lv.json +1 -1
  22. data/lib/polytypo/data/fixtures/nb.json +315 -0
  23. data/lib/polytypo/data/fixtures/nl.json +1 -1
  24. data/lib/polytypo/data/fixtures/pl.json +1 -1
  25. data/lib/polytypo/data/fixtures/pt-BR.json +1 -1
  26. data/lib/polytypo/data/fixtures/pt-PT.json +1 -1
  27. data/lib/polytypo/data/fixtures/ro.json +1 -1
  28. data/lib/polytypo/data/fixtures/ru.json +1 -1
  29. data/lib/polytypo/data/fixtures/sk.json +1 -1
  30. data/lib/polytypo/data/fixtures/sl.json +1 -1
  31. data/lib/polytypo/data/fixtures/sr.json +1 -1
  32. data/lib/polytypo/data/fixtures/sv.json +1 -1
  33. data/lib/polytypo/data/fixtures/tr.json +1 -1
  34. data/lib/polytypo/data/fixtures/uk.json +1 -1
  35. data/lib/polytypo/data/locales/da.json +85 -0
  36. data/lib/polytypo/data/locales/nb.json +85 -0
  37. data/lib/polytypo/data/locales/registry.json +6 -3
  38. data/lib/polytypo/data/rules/locale-resolution.md +2 -2
  39. data/lib/polytypo/data/rules/order.json +1 -1
  40. data/lib/polytypo/version.rb +1 -1
  41. metadata +5 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c2d7697d1f8c413a4f75e70258d8c4a03ea73e162b3ec1dfa3ff7f40a1e66d3
4
- data.tar.gz: aff92a96164654408e9206b201f2c59edf10bc15047d06a57e42529f99504107
3
+ metadata.gz: ef4d0c5b5f293055fd48d033c9b046d72155af1d8fdc9497564be447d4a66734
4
+ data.tar.gz: c28d5edfdfb62e7250a7d2d6afde0a21b2800c95e27bf170274e9247459cee5e
5
5
  SHA512:
6
- metadata.gz: a52f59623f9f2b3540fe8961d7750b7bcac554643ed87f27a7e12d86e265788999fe9cbb49edee61030edb91a5bc4c7be6a8a65aa461d85c82dbaf408fec431b
7
- data.tar.gz: 7cfb5ecbc1d6f7115f4ce516174a86b751704e26e8a3f2077515f4cf3f188b5f6daaf2d747b69c7e9b08a8f9f75e083a02b5f75746f632aef1d284afe753efc8
6
+ metadata.gz: a0301c699a9eb013b831074efe6fe3279bf880fe09d2a9d27de2ffc9d400498892f7a36a6d08b4093c2cec925b7eab161b071901d705276750fac181403fc156
7
+ data.tar.gz: c30adcce6313ae82384dcd78f9a2e535055473e61acf72814d0d4d83791ab6104f0a5d4202847b552fec4c12c7729547962cf982eab4b24e7c2e48753eb0a339
@@ -1 +1 @@
1
- 1.25.0
1
+ 1.27.0
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "bg",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "cs",
4
4
  "cases": [
5
5
  {
@@ -0,0 +1,295 @@
1
+ {
2
+ "spec": "1.27.0",
3
+ "locale": "da",
4
+ "cases": [
5
+ {
6
+ "id": "da-quotes-primary",
7
+ "rule": "quotes",
8
+ "mode": "text",
9
+ "in": "Han sagde: \"Jeg er træt.\" og gik.",
10
+ "out": "Han sagde: »Jeg er træt.« og gik.",
11
+ "note": "Retskrivningsreglerne §58, §59: direct speech takes »…«; the full stop of the speech stays inside."
12
+ },
13
+ {
14
+ "id": "da-quotes-nested-secondary",
15
+ "rule": "quotes",
16
+ "mode": "text",
17
+ "in": "Han sagde: \"Hun sagde 'ja' til mig\" og gik.",
18
+ "out": "Han sagde: »Hun sagde ›ja‹ til mig« og gik.",
19
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §58: the inner level takes ›…‹ (pin of the listed single form)."
20
+ },
21
+ {
22
+ "id": "da-quotes-nested-at-end",
23
+ "rule": "quotes",
24
+ "mode": "text",
25
+ "in": "Han sagde: \"Hun sagde 'ja'\" og gik.",
26
+ "out": "Han sagde: »Hun sagde ›ja‹« og gik.",
27
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §58: a nest that ends against the outer closer is still paired."
28
+ },
29
+ {
30
+ "id": "da-quotes-already-typeset",
31
+ "rule": "quotes",
32
+ "mode": "text",
33
+ "in": "Han sagde »ja« og gik.",
34
+ "out": "Han sagde »ja« og gik.",
35
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §58: text already carrying »…« is a fixed point."
36
+ },
37
+ {
38
+ "id": "da-quotes-already-typeset-nested",
39
+ "rule": "quotes",
40
+ "mode": "text",
41
+ "in": "Han sagde »hun sagde ›ja‹ til mig« og gik.",
42
+ "out": "Han sagde »hun sagde ›ja‹ til mig« og gik.",
43
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §58: already-typeset nesting is a fixed point."
44
+ },
45
+ {
46
+ "id": "da-quotes-already-typeset-comma",
47
+ "rule": "quotes",
48
+ "mode": "text",
49
+ "in": "»Nej,« svarede hun.",
50
+ "out": "»Nej,« svarede hun.",
51
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §59: direct speech with the comma inside is a fixed point."
52
+ },
53
+ {
54
+ "id": "da-quotes-double-curly-input",
55
+ "rule": "quotes",
56
+ "mode": "text",
57
+ "in": "Han sagde ”ja” og gik.",
58
+ "out": "Han sagde »ja« og gik.",
59
+ "note": "Dansk Sprognævn, Oversigt over ændringer 2025, §58.1 example «”godmorgen!”» uses ”…”; it is normalised to the pinned pair."
60
+ },
61
+ {
62
+ "id": "da-quotes-low-high-input",
63
+ "rule": "quotes",
64
+ "mode": "text",
65
+ "in": "Han sagde „ja“ og gik.",
66
+ "out": "Han sagde »ja« og gik.",
67
+ "note": "„…“ is not among the forms §58 names (»…« and a double-quote form); it is normalised to the pinned pair."
68
+ },
69
+ {
70
+ "id": "da-quotes-reversed-guillemets-input",
71
+ "rule": "quotes",
72
+ "mode": "text",
73
+ "in": "Han sagde «ja» og gik.",
74
+ "out": "Han sagde »ja« og gik.",
75
+ "note": "Every source read that uses guillemets opens with U+00BB; the reversed pair «…» is normalised to »…«."
76
+ },
77
+ {
78
+ "id": "da-quotes-no-inner-space",
79
+ "rule": "quotes",
80
+ "mode": "text",
81
+ "in": "Han sagde: \" ja \" og gik.",
82
+ "out": "Han sagde: »ja« og gik.",
83
+ "note": "innerSpace is none: no example in §58–59 carries a space inside the marks."
84
+ },
85
+ {
86
+ "id": "da-quotes-question-inside",
87
+ "rule": "quotes",
88
+ "mode": "text",
89
+ "in": "\"Hvad?\" spurgte han.",
90
+ "out": "»Hvad?« spurgte han.",
91
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §59: a question mark of the speech stays inside the closing mark."
92
+ },
93
+ {
94
+ "id": "da-quotes-stray-period-after",
95
+ "rule": "quotes",
96
+ "mode": "text",
97
+ "in": "Han spurgte: \"Hvad?\".",
98
+ "out": "Han spurgte: »Hvad?«.",
99
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §59(4): a full stop after the closing mark is left where it stands."
100
+ },
101
+ {
102
+ "id": "da-ellipsis-three-dots",
103
+ "rule": "ellipsis",
104
+ "mode": "text",
105
+ "in": "Vent... og så.",
106
+ "out": "Vent… og så.",
107
+ "note": "Oversigt 2025 §43 (RO 5.1) allows two or more dots as tøveprikker; three dots become the ellipsis character."
108
+ },
109
+ {
110
+ "id": "da-ellipsis-before-question",
111
+ "rule": "ellipsis",
112
+ "mode": "text",
113
+ "in": "Er det nu...?",
114
+ "out": "Er det nu…?",
115
+ "note": "Oversigt 2025 §43 (RO 5.1): «…men så ...!», «…sagde ..?» and no space between the dots and the terminal mark; abbreviatedAfterTerminal is false."
116
+ },
117
+ {
118
+ "id": "da-ellipsis-before-exclamation",
119
+ "rule": "ellipsis",
120
+ "mode": "text",
121
+ "in": "Hvad nu...!",
122
+ "out": "Hvad nu…!",
123
+ "note": "Oversigt 2025 §43 (RO 5.1) «men så ...!»: the dots stay before the terminal mark."
124
+ },
125
+ {
126
+ "id": "da-ellipsis-four-dots-collapsed",
127
+ "rule": "ellipsis",
128
+ "mode": "text",
129
+ "in": "Stilheden ....",
130
+ "out": "Stilheden …",
131
+ "note": "ACCEPTED COST: Oversigt 2025 §43 allows four dots («stilheden ....»); the ellipsis rule collapses them to the ellipsis character."
132
+ },
133
+ {
134
+ "id": "da-dashes-parenthetical",
135
+ "rule": "dashes",
136
+ "mode": "text",
137
+ "in": "Nu - ikke mindst - går vi.",
138
+ "out": "Nu – ikke mindst – går vi.",
139
+ "note": "Retskrivningsreglerne §55: the dash stands with a space on both sides; U+2013 per the Digitaliseringsstyrelsen guide pp. 66–67."
140
+ },
141
+ {
142
+ "id": "da-dashes-em-input",
143
+ "rule": "dashes",
144
+ "mode": "text",
145
+ "in": "Nu — ikke mindst — går vi.",
146
+ "out": "Nu – ikke mindst – går vi.",
147
+ "note": "No source read mentions U+2014; an em dash is normalised to the en dash by this pin."
148
+ },
149
+ {
150
+ "id": "da-dashes-existing-en",
151
+ "rule": "dashes",
152
+ "mode": "text",
153
+ "in": "Nu – ikke mindst – går vi.",
154
+ "out": "Nu – ikke mindst – går vi.",
155
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §55: the spaced en dash is a fixed point."
156
+ },
157
+ {
158
+ "id": "da-ranges-none-hyphen-kept",
159
+ "rule": "ranges",
160
+ "rules": {
161
+ "ranges": true
162
+ },
163
+ "mode": "text",
164
+ "in": "mandag-fredag 9-16 og 1986-1989",
165
+ "out": "mandag-fredag 9-16 og 1986-1989",
166
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §57.9: the range hyphen is U+002D without spaces; dash.range is none, so the token stays as written (ranges.md §2)."
167
+ },
168
+ {
169
+ "id": "da-ranges-word-hyphen-untouched",
170
+ "rule": "ranges",
171
+ "rules": {
172
+ "ranges": true
173
+ },
174
+ "mode": "text",
175
+ "in": "København-Aarhus",
176
+ "out": "København-Aarhus",
177
+ "note": "Retskrivningsreglerne §57.9: «København-Århus»; a hyphen between words is untouched (ranges.md §3)."
178
+ },
179
+ {
180
+ "id": "da-hyphen-noop",
181
+ "rule": "hyphen",
182
+ "mode": "text",
183
+ "in": "e-mail og H.C. Andersen-prisen",
184
+ "out": "e-mail og H.C. Andersen-prisen",
185
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §57: no closed list of hyphenated forms is cited, so the hyphen lists are empty and nothing changes."
186
+ },
187
+ {
188
+ "id": "da-nbsp-spaced-units",
189
+ "rule": "nbsp",
190
+ "mode": "text",
191
+ "in": "Prisen er 25 % og 10 kr og 3 € og 3 km og 10 kg og 5 cm og 7 ha",
192
+ "out": "Prisen er 25 % og 10 kr og 3 € og 3 km og 10 kg og 5 cm og 7 ha",
193
+ "note": "SV00000086 (% with a space), SV00015797 (currency after the number, like SI symbols), Folketingstidende p. 114 (ha, kg)."
194
+ },
195
+ {
196
+ "id": "da-nbsp-spaced-unit-inserted",
197
+ "rule": "nbsp",
198
+ "mode": "text",
199
+ "in": "Prisen 50% og 5€ her",
200
+ "out": "Prisen 50 % og 5 € her",
201
+ "note": "SV00000086 and SV00015797: the space before % and € is inserted and made non-breaking."
202
+ },
203
+ {
204
+ "id": "da-nbsp-spaced-unit-inserted-letters",
205
+ "rule": "nbsp",
206
+ "mode": "text",
207
+ "in": "Det koster 15kr og vejer 3kg",
208
+ "out": "Det koster 15 kr og vejer 3 kg",
209
+ "note": "SV00015797 and Folketingstidende p. 114: a letter unit (kr, kg) written closed up to the number gets the no-break space."
210
+ },
211
+ {
212
+ "id": "da-nbsp-kr-with-full-stop",
213
+ "rule": "nbsp",
214
+ "mode": "text",
215
+ "in": "Det koster 15 kr. i dag",
216
+ "out": "Det koster 15 kr. i dag",
217
+ "note": "SV00015797 «10 kr.»: kr is listed without the full stop; a following full stop does not prevent the binding."
218
+ },
219
+ {
220
+ "id": "da-nbsp-single-letter-unit-inert",
221
+ "rule": "nbsp",
222
+ "mode": "text",
223
+ "in": "Det er 5 m og 3 g",
224
+ "out": "Det er 5 m og 3 g",
225
+ "note": "Single-letter units are excluded (nbsp.md §3.7): they are also common words."
226
+ },
227
+ {
228
+ "id": "da-nbsp-degree-inert",
229
+ "rule": "nbsp",
230
+ "mode": "text",
231
+ "in": "Det er 38 °C ude",
232
+ "out": "Det er 38 °C ude",
233
+ "note": "UNVERIFIED: SV00015408 covers angles only, so °C is not listed and the text is left as typed."
234
+ },
235
+ {
236
+ "id": "da-nbsp-abbreviations-inert",
237
+ "rule": "nbsp",
238
+ "mode": "text",
239
+ "in": "f.eks. og bl.a. og dvs. samt H.C. Andersen",
240
+ "out": "f.eks. og bl.a. og dvs. samt H.C. Andersen",
241
+ "note": "Retskrivningsreglerne §42.5: abbreviations are written without an inner space, so there is nothing to bind."
242
+ },
243
+ {
244
+ "id": "da-nbsp-before-number-inert",
245
+ "rule": "nbsp",
246
+ "mode": "text",
247
+ "in": "se nr. 5 og s. 12 og kl. 9 og § 10",
248
+ "out": "se nr. 5 og s. 12 og kl. 9 og § 10",
249
+ "note": "Folketingstidende pp. 50–52 list kl., nr., § and s. before numbers, and the examples (§ 10, p. 51; nr. 5-8, p. 111; kl. 15, p. 112) show a space, but no source calls it non-breaking, so nothing is bound."
250
+ },
251
+ {
252
+ "id": "da-spaces-before-punctuation",
253
+ "rule": "spaces",
254
+ "mode": "text",
255
+ "in": "Hvad nu ? Ikke !",
256
+ "out": "Hvad nu? Ikke!",
257
+ "note": "A space before ? or ! is removed; no source read puts one there."
258
+ },
259
+ {
260
+ "id": "da-spaces-brackets",
261
+ "rule": "spaces",
262
+ "mode": "text",
263
+ "in": "Han ( stille ) gik .",
264
+ "out": "Han (stille) gik.",
265
+ "note": "A space inside brackets and before a full stop is removed (the spaces rule is locale-independent)."
266
+ },
267
+ {
268
+ "id": "da-symbols-copyright",
269
+ "rule": "symbols",
270
+ "mode": "text",
271
+ "in": "(c) 2026",
272
+ "out": "© 2026",
273
+ "note": "The (c) sequence becomes the copyright sign."
274
+ },
275
+ {
276
+ "id": "da-apostrophe-foreign-name",
277
+ "rule": "apostrophe",
278
+ "mode": "text",
279
+ "in": "O'Brien kom.",
280
+ "out": "O’Brien kom.",
281
+ "note": "A typewriter apostrophe inside a name becomes U+2019."
282
+ },
283
+ {
284
+ "id": "da-quote-punctuation-none",
285
+ "rule": "quote-punctuation",
286
+ "rules": {
287
+ "quote-punctuation": true
288
+ },
289
+ "mode": "text",
290
+ "in": "alfa »beta«, gamma",
291
+ "out": "alfa »beta«, gamma",
292
+ "note": "Dansk Sprognævn, Retskrivningsreglerne §59(4): punctuationPlacement is none, so the comma is left where it stands."
293
+ }
294
+ ]
295
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "de-CH",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "de-DE",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "el",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "en-GB",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "en-US",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "es",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "et",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "fi",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "fr-CA",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "fr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "hr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "hu",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "it",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.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-nb-no",
150
- "tag": "nb-NO",
149
+ "id": "unknown-nn-no",
150
+ "tag": "nn-NO",
151
151
  "throws": "POLYTYPO_UNKNOWN_LOCALE",
152
- "note": "section 4: nb must not resolve to the nearest language sv"
152
+ "note": "section 4: nn (Nynorsk) must not resolve to the nearest locale nb"
153
153
  },
154
154
  {
155
155
  "id": "unknown-ja",
@@ -300,6 +300,30 @@
300
300
  "tag": "et-EE",
301
301
  "resolves": "et",
302
302
  "note": "section 3.4 step 3a: the region strip reaches et, which needs no registry alias."
303
+ },
304
+ {
305
+ "id": "strip-da-dk",
306
+ "tag": "da-DK",
307
+ "resolves": "da",
308
+ "note": "section 3.4 step 3a: the region strip reaches da, which needs no registry alias."
309
+ },
310
+ {
311
+ "id": "strip-nb-no",
312
+ "tag": "nb-NO",
313
+ "resolves": "nb",
314
+ "note": "section 3.4 step 3a: the region strip reaches nb, which needs no registry alias."
315
+ },
316
+ {
317
+ "id": "alias-no",
318
+ "tag": "no",
319
+ "resolves": "nb",
320
+ "note": "section 3.4 step 2: the registry alias no maps to nb."
321
+ },
322
+ {
323
+ "id": "alias-no-no",
324
+ "tag": "no-NO",
325
+ "resolves": "nb",
326
+ "note": "section 3.4 step 3b: the strip lands on the alias key no, so the alias is followed."
303
327
  }
304
328
  ]
305
329
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "lt",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "lv",
4
4
  "cases": [
5
5
  {
@@ -0,0 +1,315 @@
1
+ {
2
+ "spec": "1.27.0",
3
+ "locale": "nb",
4
+ "cases": [
5
+ {
6
+ "id": "nb-quotes-primary",
7
+ "rule": "quotes",
8
+ "mode": "text",
9
+ "in": "Han sa: \"Jeg er trøtt.\" og gikk.",
10
+ "out": "Han sa: «Jeg er trøtt.» og gikk.",
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": "nb-quotes-nested-secondary",
15
+ "rule": "quotes",
16
+ "mode": "text",
17
+ "in": "Han sa: \"Hun sa 'ja' til meg\" og gikk.",
18
+ "out": "Han sa: «Hun sa ‘ja’ til meg» og gikk.",
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": "nb-quotes-nested-at-end",
23
+ "rule": "quotes",
24
+ "mode": "text",
25
+ "in": "Han sa: \"Hun sa 'ja'\" og gikk.",
26
+ "out": "Han sa: «Hun sa ‘ja’» og gikk.",
27
+ "note": "Språkrådet, «Sitat i sitat»: a nest that ends against the outer closer is still paired."
28
+ },
29
+ {
30
+ "id": "nb-quotes-already-typeset",
31
+ "rule": "quotes",
32
+ "mode": "text",
33
+ "in": "Han sa «ja» og gikk.",
34
+ "out": "Han sa «ja» og gikk.",
35
+ "note": "Språkrådet, «Hermeteikn»: text already carrying «…» is a fixed point."
36
+ },
37
+ {
38
+ "id": "nb-quotes-already-typeset-nested",
39
+ "rule": "quotes",
40
+ "mode": "text",
41
+ "in": "Han sa «hun sa ‘ja’ til meg» og gikk.",
42
+ "out": "Han sa «hun sa ‘ja’ til meg» og gikk.",
43
+ "note": "Språkrådet, «Sitat i sitat»: already-typeset nesting is a fixed point."
44
+ },
45
+ {
46
+ "id": "nb-quotes-double-curly-input",
47
+ "rule": "quotes",
48
+ "mode": "text",
49
+ "in": "Han sa “ja” og gikk.",
50
+ "out": "Han sa «ja» og gikk.",
51
+ "note": "Språkrådet, «Hermeteikn»: “…” is an equally correct form; the pin normalises it to «…»."
52
+ },
53
+ {
54
+ "id": "nb-quotes-low-high-input",
55
+ "rule": "quotes",
56
+ "mode": "text",
57
+ "in": "Han sa „ja“ og gikk.",
58
+ "out": "Han sa «ja» og gikk.",
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": "nb-quotes-danish-guillemets-input",
63
+ "rule": "quotes",
64
+ "mode": "text",
65
+ "in": "Han sa »ja« og gikk.",
66
+ "out": "Han sa «ja» og gikk.",
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": "nb-quotes-no-inner-space",
71
+ "rule": "quotes",
72
+ "mode": "text",
73
+ "in": "Han sa: \" ja \" og gikk.",
74
+ "out": "Han sa: «ja» og gikk.",
75
+ "note": "Språkrådet, «Hermeteikn»: no example carries a space inside the marks (innerSpace none)."
76
+ },
77
+ {
78
+ "id": "nb-quotes-question-inside",
79
+ "rule": "quotes",
80
+ "mode": "text",
81
+ "in": "\"Hva?\" spurte han.",
82
+ "out": "«Hva?» spurte han.",
83
+ "note": "Språkrådet, «Hermeteikn»: a question mark that belongs to the quotation stays before the closing mark."
84
+ },
85
+ {
86
+ "id": "nb-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": "nb-ellipsis-before-question",
95
+ "rule": "ellipsis",
96
+ "mode": "text",
97
+ "in": "Er det nå...?",
98
+ "out": "Er det nå…?",
99
+ "note": "Språkrådet, «Mellomrom»: «eller ...?» puts the terminal mark after the dots; abbreviatedAfterTerminal is false."
100
+ },
101
+ {
102
+ "id": "nb-ellipsis-before-exclamation",
103
+ "rule": "ellipsis",
104
+ "mode": "text",
105
+ "in": "Hva nå...!",
106
+ "out": "Hva nå…!",
107
+ "note": "Språkrådet, «Mellomrom»: «Svarte f…!»: the terminal mark follows the dots."
108
+ },
109
+ {
110
+ "id": "nb-dashes-parenthetical",
111
+ "rule": "dashes",
112
+ "mode": "text",
113
+ "in": "Nå - ikke minst - går vi.",
114
+ "out": "Nå – ikke 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": "nb-dashes-em-input",
119
+ "rule": "dashes",
120
+ "mode": "text",
121
+ "in": "Nå — ikke minst — går vi.",
122
+ "out": "Nå – ikke 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": "nb-dashes-existing-en",
127
+ "rule": "dashes",
128
+ "mode": "text",
129
+ "in": "Nå – ikke minst – går vi.",
130
+ "out": "Nå – ikke minst – går vi.",
131
+ "note": "Språkrådet, «Tankestrek»: the spaced en dash is a fixed point."
132
+ },
133
+ {
134
+ "id": "nb-ranges-hyphen-converted",
135
+ "rule": "ranges",
136
+ "rules": {
137
+ "ranges": true
138
+ },
139
+ "mode": "text",
140
+ "in": "kapitlene 2-10",
141
+ "out": "kapitlene 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": "nb-ranges-opening-hours",
146
+ "rule": "ranges",
147
+ "rules": {
148
+ "ranges": true
149
+ },
150
+ "mode": "text",
151
+ "in": "åpent 9-19",
152
+ "out": "åpent 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": "nb-ranges-authored-unbound",
157
+ "rule": "ranges",
158
+ "rules": {
159
+ "ranges": true
160
+ },
161
+ "mode": "text",
162
+ "in": "kapitlene 2–10",
163
+ "out": "kapitlene 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": "nb-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": "nb-ranges-abbreviated-year-declined",
179
+ "rule": "ranges",
180
+ "rules": {
181
+ "ranges": true
182
+ },
183
+ "mode": "text",
184
+ "in": "årene 1349-54",
185
+ "out": "årene 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": "nb-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": "nb-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": "nb-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": "nb-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": "nb-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": "nb-nbsp-kr-with-full-stop",
233
+ "rule": "nbsp",
234
+ "mode": "text",
235
+ "in": "Det koster 15 kr. i dag",
236
+ "out": "Det koster 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": "nb-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": "nb-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": "nb-nbsp-abbreviations-inert",
257
+ "rule": "nbsp",
258
+ "mode": "text",
259
+ "in": "f.eks. og m.a.o. og m.m.",
260
+ "out": "f.eks. 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": "nb-nbsp-section-sign-inert",
265
+ "rule": "nbsp",
266
+ "mode": "text",
267
+ "in": "se § 10 og $ 10",
268
+ "out": "se § 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": "nb-spaces-before-punctuation",
273
+ "rule": "spaces",
274
+ "mode": "text",
275
+ "in": "Hva nå ? Ikke !",
276
+ "out": "Hva nå? Ikke!",
277
+ "note": "Språkrådet, «Mellomrom»: no space is written before ? or !."
278
+ },
279
+ {
280
+ "id": "nb-spaces-brackets",
281
+ "rule": "spaces",
282
+ "mode": "text",
283
+ "in": "Han ( stille ) gikk .",
284
+ "out": "Han (stille) gikk.",
285
+ "note": "spaces.md: no space inside brackets or before a full stop."
286
+ },
287
+ {
288
+ "id": "nb-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": "nb-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": "nb-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
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "nl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "pl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "pt-BR",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "pt-PT",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "ro",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "ru",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "sk",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "sl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "sr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "sv",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "tr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.25.0",
2
+ "spec": "1.27.0",
3
3
  "locale": "uk",
4
4
  "cases": [
5
5
  {
@@ -0,0 +1,85 @@
1
+ {
2
+ "locale": "da",
3
+ "name": "Danish",
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": [],
40
+ "spacedUnits": ["%", "kr", "€", "km", "kg", "cm", "ha"],
41
+ "closedUnits": [],
42
+ "beforeNumber": [],
43
+ "beforeWord": [],
44
+ "afterSymbols": [],
45
+ "initialBinding": "none"
46
+ },
47
+ "sources": [
48
+ {
49
+ "rule": "quotes",
50
+ "cite": "Dansk Sprognævn, Retskrivningsreglerne, text of Retskrivningsordbogen 4. udg. (2012), read on the sproget.dk editing mirror (the public rule pages are not online at their old addresses); Nyt fra Sprognævnet 2025/1, p. 8, reports no major rule changes in RO 5. udg. (2024) other than §38, §45 and §§31–35, and Oversigt over ændringer i retskrivningsreglerne 2025 (RO 5 → RO 5.1) changes §58 only in the §58.1 example and §58.2, so that the text read still stands in RO 5.1 is an inference: §58 Anførselstegn: «Der er følgende hovedformer: »...« og \"...\"; mindre benyttede er de enkelte (ufordoblede) anførselstegn: ›...‹ eller ‘...’», «man i øvrigt bruger samme type anførselstegn i hele teksten», (4) «Enkelte (ufordoblede) anførselstegn kan bruges ved ord der står i en større sammenhæng som selv er omgivet af anførselstegn»; §59(4): punktum and komma «kan valgfrit sættes foran eller efter anførselstegnet»; Retskrivningsvejledning for Folketingstidende, 2. udg. (2013), Anførselstegn chapter pp. 17–26; Oversigt 2025 §47.3.b and §58.1",
51
+ "url": "https://rediger.sproget.dk/raad-og-regler/Retskrivningsregler/retskrivningsregler/a7-40-60/a7-58-anforselstegn",
52
+ "note": "PICK-AND-PIN: »…« (U+00BB open, U+00AB close) with ›…‹ (U+203A, U+2039) inside. §58 names two principal forms, »…« and a double-quote form whose code points the mirror text does not show, and ranks neither. The issue's «…» lead (U+00AB as the opener) is refuted: every source read that uses guillemets opens with U+00BB. »…« is pinned because §58 lists it first, every §59 example of direct speech uses it («»Nej,« svarede hun»), the Folketingstidende guide uses it throughout its Anførselstegn chapter (pp. 17–26), and `sl` ships the same pair. The rival ”…” (U+201D both sides, read from page images) is used in the examples the 2025 change list adds to §47.3.b («”Hejsa, Peter!”»), already in the §58.1 example of RO 5 (2024) retained in RO 5.1 («”godmorgen!”»), and in the Digitaliseringsstyrelsen web guide (Skrivevejledning for borger.dk, last updated 05-08-2026, p. 67); it is normalised to the pinned pair. ›…‹ for the inner level: §58 lists the single forms ›...‹ and ‘...’ as less used and §58(4) allows single marks for a quotation inside a quotation, but the inner marks of its example are straight in the mirror text, so the choice between the two single forms is a pin; Folketingstidende instead nests by doubling », and no source read states ›…‹ as the inner mark of »…«. innerSpace none: no example carries a space inside the marks. punctuationPlacement none: §59(4) allows the full stop or comma before or after the closing mark and requires the position after it for a quotation inside a sentence, so placement depends on meaning. elisionIdioms and elisionClitics empty: not addressed. Retrieved 2026-11-14."
53
+ },
54
+ {
55
+ "rule": "dashes",
56
+ "cite": "Dansk Sprognævn, Retskrivningsreglerne, text of Retskrivningsordbogen 4. udg. (2012), read on the sproget.dk editing mirror (the public rule pages are not online at their old addresses); Nyt fra Sprognævnet 2025/1, p. 8, reports no major rule changes in RO 5. udg. (2024) other than §38, §45 and §§31–35, and Oversigt over ændringer i retskrivningsreglerne 2025 (RO 5 → RO 5.1) changes §58 only in the §58.1 example and §58.2, so that the text read still stands in RO 5.1 is an inference: §55 Tankestreg: «skrives eller trykkes med afstand (spatium) til de omgivende ord»; Digitaliseringsstyrelsen, Skrivevejledning for borger.dk og lifeindenmark.dk (last updated 05-08-2026; file «version 5»), pp. 66–67: «Tankestreg på PC Alt + 0150», example «lægeskift – kan»; Retskrivningsvejledning for Folketingstidende (2013), pp. 121–122",
57
+ "url": "https://rediger.sproget.dk/raad-og-regler/Retskrivningsregler/retskrivningsregler/a7-40-60/a7-55-tankestreg",
58
+ "note": "dash.parenthetical = en-spaced (U+0020 U+2013 U+0020). The spacing is stated by §55, which says only that the dash is typographically longer than the hyphen; the width U+2013 is read from the web guide (Alt+0150 is Windows-1252 0x96 = U+2013) and its example, and every Folketingstidende example is spaced. No source read mentions U+2014, so an em dash is normalised to the en dash by this pin, not by a citation. Retrieved 2026-11-14."
59
+ },
60
+ {
61
+ "rule": "ranges",
62
+ "cite": "Dansk Sprognævn, Retskrivningsreglerne, text of Retskrivningsordbogen 4. udg. (2012), read on the sproget.dk editing mirror (the public rule pages are not online at their old addresses); Nyt fra Sprognævnet 2025/1, p. 8, reports no major rule changes in RO 5. udg. (2024) other than §38, §45 and §§31–35, and Oversigt over ændringer i retskrivningsreglerne 2025 (RO 5 → RO 5.1) changes §58 only in the §58.1 example and §58.2, so that the text read still stands in RO 5.1 is an inference: §57.9 Bindestreg «I betydningen 'fra ... til'»: «København-Århus», «mandag-fredag 9-16», «200-300 deltagere»; a spaced tankestreg only «Mellem særlig lange ord og talangivelser»: «24. december 1994 – 6. januar 1995»; Digitaliseringsstyrelsen, Skrivevejledning for borger.dk, p. 59 (times): «Hvis du alligevel skriver klokkeslæt med bindestreg, bruger vi bindestreg og ikke tankestreg, og vi har ingen luft mellem tal og bindestreg»; Retskrivningsvejledning for Folketingstidende (2013), pp. 111–112: «2013-2014», «3-4 dage», «nr. 5-8»",
63
+ "url": "https://rediger.sproget.dk/raad-og-regler/Retskrivningsregler/retskrivningsregler/a7-40-60/a7-57-bindestreg",
64
+ "note": "dash.range = none. The Danish convention for «fra … til» is the hyphen U+002D without spaces, and the schema has no hyphen value; en-tight would rewrite the normative «9-16» as «9–16», so the token is left exactly as written. Retrieved 2026-11-14."
65
+ },
66
+ {
67
+ "rule": "ellipsis",
68
+ "cite": "Dansk Sprognævn, Oversigt over ændringer i retskrivningsreglerne 2025 (RO 5 → RO 5.1), §43 Prikker, column «Retskrivningsordbogen 5.1»: «Først var det kedeligt, men så ...!», «Var det nu også det hun sagde ..?»; «Hvis tøveprikkerne efterfølges af et sluttegn, sættes der ikke mellemrum mellem tøveprikkerne og sluttegnet»",
69
+ "url": "https://dsn.dk/wp-content/uploads/2025/12/Oversigt-over-aendringer-i-retskrivningsreglerne-2025-1.pdf",
70
+ "note": "abbreviatedAfterTerminal = false: the terminal mark follows the dots, so no source reduces the dots after ? or !. ACCEPTED COST: §43 allows two or more dots, including four («stilheden ....»); the ellipsis rule collapses a four-dot run to the ellipsis character, and a two-dot run is left as typed. Retrieved 2026-11-14."
71
+ },
72
+ {
73
+ "rule": "hyphen",
74
+ "cite": "Dansk Sprognævn, Retskrivningsreglerne, text of Retskrivningsordbogen 4. udg. (2012), read on the sproget.dk editing mirror (the public rule pages are not online at their old addresses); Nyt fra Sprognævnet 2025/1, p. 8, reports no major rule changes in RO 5. udg. (2024) other than §38, §45 and §§31–35, and Oversigt over ændringer i retskrivningsreglerne 2025 (RO 5 → RO 5.1) changes §58 only in the §58.1 example and §58.2, so that the text read still stands in RO 5.1 is an inference: §57 Bindestreg (1) «Bindestreg bruges ved deling af ord ved linjeskift (se § 15-17)»",
75
+ "url": "https://rediger.sproget.dk/raad-og-regler/Retskrivningsregler/retskrivningsregler/a7-40-60/a7-57-bindestreg",
76
+ "note": "All three lists are empty: the uses of the hyphen are described, but no closed list of forms that must not break is given. Retrieved 2026-11-14."
77
+ },
78
+ {
79
+ "rule": "nbsp",
80
+ "cite": "Dansk Sprognævn, Svarbase SV00000086 «procenttegn og mellemrum» (2006, edited 2015): «Vi anbefaler mellemrum mellem tallet og procenttegnet: 25 %»; SV00015797 «valutabetegnelser» (NfS 2014/3, edited 2022): «I løbende tekst står betegnelsen for møntenheden efter tallet» (10 kr., 15 $), written «med mellemrum fordi de repræsenterer et ord som man siger efter tallet»; Dansk Sprognævn, Retskrivningsreglerne, text of Retskrivningsordbogen 4. udg. (2012), read on the sproget.dk editing mirror (the public rule pages are not online at their old addresses), §42.1a (units without a full stop: cm, m, km, g, kg) and §42.5: «Der skrives ikke mellemrum mellem de enkelte dele af en forkortelse»; Retskrivningsvejledning for Folketingstidende (2013), pp. 49–52, 114 («17 ha», «2 kg», «5 kr.»); Digitaliseringsstyrelsen, Skrivevejledning for borger.dk, p. 58 («50 %», «7 %»)",
81
+ "url": "https://sproget.dk/raad-og-regler/artikler-mv/svarbase/SV00000086",
82
+ "note": "(1) spacedUnits = % kr € km kg cm ha: the Sprognævn recommends the space before % (the same entry notes economists and bookkeepers often write it closed up, which makes the spaced form a recommendation, not the only form; it is pinned, as in `sv`); the currency designation follows the number, and SV00015797 treats currency and unit designations like SI symbols (kg, MW); ha is attested in the Folketingstidende guide only. kr is listed without the full stop; the engine accepts a following full stop. $ is attested («15 $») and not listed, by decision. Single-letter units (m, g, l, t) are excluded because they are also common words and nbsp.md §3.7 forbids them. °C: the only Sprognævn entry read on the degree sign (SV00015408) concerns angles and says nothing on temperatures, so it is not listed. (2) closedUnits empty: no unit is written closed up by a stated rule. (3) abbreviations empty: Danish abbreviations are written without an inner space (§42.5: osv., m.m., el.lign., H.C. Andersen; Folketingstidende: bl.a., dvs., f.eks.), so there is nothing to bind; the issue's lead of f.eks., bl.a. and dvs. is refuted as candidates. initialBinding none: initials are written closed up. (4) beforePunctuation, narrowBeforePunctuation, afterShortWords, beforeUnits, beforeNumber, beforeWord and afterSymbols empty: no source read says any space is non-breaking; kl., nr., s. and § are attested before numbers without that statement. Not expressible and so not covered: the full stop as thousands marker («250.000 kr.», Digitaliseringsstyrelsen p. 58) and dates («den 6. juni 2025»). Retrieved 2026-11-14."
83
+ }
84
+ ]
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "locale": "nb",
3
+ "name": "Norwegian Bokmål",
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); språkspørsmål «Hermeteikn, kva slags?» and «Sitat i sitat» (last updated 1 January 2024): «Dei to formene for hermeteikn som er vanlegast i norsk, er doble ″komma″ oppe og doble «vinkelteikn». Dei blir rekna som like rette»; «Eit sitat inni eit anna sitat bør helst markerast med enkle hermeteikn»; «Enkle vinklar er mindre brukt, men […] kan gjerne brukast»; «Komma skal setjast utanfor, anten det opphavleg høyrer til sitatet eller ikkje»",
51
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/hermeteikn/",
52
+ "note": "PICK-AND-PIN: «…» (U+00AB open, U+00BB close) with ‘…’ (U+2018, U+2019) inside. Språkrådet calls the doubled-comma form and the guillemet form equally correct, lists «…» first and as usual in books and newspapers, and reports, as far as it knows («Så vidt vi veit»), that Standard Norge and Microsoft agreed to make the guillemets the computer default; the doubled-comma form (”…” or “…”, U+201D or U+201C opening) is the equally correct rival and is normalised to the pinned pair. The »…« (U+00BB opening) reading in the issue is the Danish form and is not attested in any Språkrådet page read. Secondary: «Sitat i sitat» names single marks as the preferred inner level and uses ‘…’ in its examples; the Hermeteikn page also lists ’…’ (U+2019 both sides), which «Hermeteikn, kva slags?» calls the traditional Norwegian form («9 9 er det tradisjonelle i norsk») and the FAQ allows ‹…› (U+2039, U+203A), so the choice among the three single forms is a pin; ‘…’ is pinned because it is the form of the FAQ's own examples (including its gåsaugo ‘hermeteikn’) and keeps the opening and closing marks distinct. innerSpace none: no example has a space between a mark and the text. punctuationPlacement none: the comma goes outside, while the full stop and a question or exclamation mark go inside only when they belong to the quotation, so placement depends on meaning. ACCEPTED GAP: «Sitat i sitat» recommends a thin space (U+2009) between a double and a single mark that touch; the schema cannot express it, and an authored U+2009 is left untouched. elisionIdioms and elisionClitics empty: not addressed. Six of the nine pages read are in Nynorsk (Tankestrek, Punktum and Bindestrek are in Bokmål); Språkrådet publishes these rules on its common pages without a separate rule for the other written standard. Read 2026-11-15 via a text-extraction reader; direct fetch returned HTTP 403."
53
+ },
54
+ {
55
+ "rule": "dashes",
56
+ "cite": "Språkrådet, «Tankestrek» (Bokmål): «Tankestrek kan brukes ved innskudd og tilføyelse, med ett mellomrom («luft») på begge sider»; «Vi bruker kort tankestrek (–), ikke lang (—)»; «Tankestreken (–) er lengre enn bindestreken (-)»; «Mellomrom»: «Det skal vere mellomrom føre (og etter) ein tankestrek ved innskot og i liknande funksjonar»",
57
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/tankestrek/",
58
+ "note": "dash.parenthetical = en-spaced (U+0020 U+2013 U+0020). The spacing and the short dash are stated; the page names Alt+0150 (Windows-1252 0x96 = U+2013) and rejects the long dash U+2014, so an em dash is normalised to the en dash by citation. The dialogue dash (replikkstrek) 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, «Tankestrek»: «Streken svarer i slike tilfeller til fra ... til, mellom ... og» and «Her skal det ikke være mellomrom på hver side av tankestreken» (1. mai–10. september, årene 1349–54, kapitlene 2–10, 2–0); «Mellomrom»: «Det skal ikkje vere mellomrom føre og etter tankestrekar som viser tidsrom, avstandar» (opningstid: 9–19)",
63
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/tankestrek/",
64
+ "note": "dash.range = en-tight (U+2013, no spaces). Unlike Danish, Norwegian writes the range with the dash, not the hyphen. The abbreviated second member (1349–54) is Språkrådet's own example; the ranges rule's digit-run guards decide which of the typed forms are converted (ranges.md §3.2). 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» («eller ...?», «Svarte f…!») and «Punktum» («Han er vel ikke …?»)",
69
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
70
+ "note": "abbreviatedAfterTerminal = false: the terminal mark follows the dots in every example, so no source reduces the dots after ? or !. Spacing around the dots (a space before them when a word is omitted, none when letters are omitted) 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»: «Også der førsteleddet er et siffer e.l., skal ordet skrives med bindestrek» (2.-prioritetslån, 50-årsdag, A4-format); «Sammensetninger med en forkortelse eller en enkelt bokstav som førsteledd skal ha bindestrek» (e-post, EU-motstander)",
75
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/tegn/bindestrek/",
76
+ "note": "All three lists are empty: the page says when a hyphen is written, not 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»: «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 %» and «Bruk gjerne det som heiter hardt eller fast mellomrom, så skil ikkje talet og teiknet lag ved linjeskift»; «Kronebeløp: rekkjefølgje, komma og strek»: «I vanleg tekst er 500 kr (eller helst 500 kroner) i utgangspunktet det beste» and «Etter kr skal det ikkje stå punktum»; «Punktum»: f.eks., m.a.o., m.m. written without an inner space",
81
+ "url": "https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/mellomrom/",
82
+ "note": "(1) spacedUnits = % kr km kg cm °C: the space between number and unit is stated; a hard space is stated only for %, and the others take the same pin (as in `da`). 10 kr, 5,68 kg and +5 °C are exemplified; km and cm rest on the general rule for abbreviated designations. kr is listed without a full stop: «Kronebeløp» states «Etter kr skal det ikkje stå punktum, bortsett frå til slutt i setningar». A bare ° is written closed up in the source («5°»), so only the °C form is listed. Single-letter and common-word units (m, l, min) are excluded (nbsp.md §3.7). (2) closedUnits empty. (3) abbreviations empty: Norwegian abbreviations carry no inner space, so there is nothing to bind. (4) afterSymbols empty: «§ 10» and «$ 10» are written with a space, but no source says it is non-breaking. beforePunctuation, narrowBeforePunctuation, afterShortWords, beforeUnits, beforeNumber, beforeWord empty and initialBinding none: not addressed. Not expressible and so not covered: grouping of thousands with a space («3 562 987 675») and the prefix form «kr 500,–» and the whole-krone dash (Tankestrek: «Tankestrek kan brukes for å angi hele kronebeløp»). 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.25.0",
2
+ "spec": "1.27.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",
@@ -30,11 +30,14 @@
30
30
  "sl",
31
31
  "lt",
32
32
  "lv",
33
- "et"
33
+ "et",
34
+ "da",
35
+ "nb"
34
36
  ],
35
37
  "aliases": {
36
38
  "en": "en-US",
37
39
  "de": "de-DE",
38
- "pt": "pt-PT"
40
+ "pt": "pt-PT",
41
+ "no": "nb"
39
42
  }
40
43
  }
@@ -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.** `nb` does not resolve to `sv`, `nl` does not
135
+ - **Never fall back to a "nearest" language.** `nn` does not resolve to `nb`, `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
- | `nb-NO` | `nb-NO` | strip → `nb`, miss | **throw** `POLYTYPO_UNKNOWN_LOCALE` |
180
+ | `nn-NO` | `nn-NO` | strip → `nn`, 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.25.0",
2
+ "spec": "1.27.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
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polytypo
4
- VERSION = "1.25.0"
4
+ VERSION = "1.27.0"
5
5
  end
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.25.0
4
+ version: 1.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iurii Rogulia
@@ -42,6 +42,7 @@ files:
42
42
  - lib/polytypo/data/VERSION
43
43
  - lib/polytypo/data/fixtures/bg.json
44
44
  - lib/polytypo/data/fixtures/cs.json
45
+ - lib/polytypo/data/fixtures/da.json
45
46
  - lib/polytypo/data/fixtures/de-CH.json
46
47
  - lib/polytypo/data/fixtures/de-DE.json
47
48
  - lib/polytypo/data/fixtures/el.json
@@ -58,6 +59,7 @@ files:
58
59
  - lib/polytypo/data/fixtures/locale-resolution.json
59
60
  - lib/polytypo/data/fixtures/lt.json
60
61
  - lib/polytypo/data/fixtures/lv.json
62
+ - lib/polytypo/data/fixtures/nb.json
61
63
  - lib/polytypo/data/fixtures/nl.json
62
64
  - lib/polytypo/data/fixtures/pl.json
63
65
  - lib/polytypo/data/fixtures/pt-BR.json
@@ -72,6 +74,7 @@ files:
72
74
  - lib/polytypo/data/fixtures/uk.json
73
75
  - lib/polytypo/data/locales/bg.json
74
76
  - lib/polytypo/data/locales/cs.json
77
+ - lib/polytypo/data/locales/da.json
75
78
  - lib/polytypo/data/locales/de-CH.json
76
79
  - lib/polytypo/data/locales/de-DE.json
77
80
  - lib/polytypo/data/locales/el.json
@@ -87,6 +90,7 @@ files:
87
90
  - lib/polytypo/data/locales/it.json
88
91
  - lib/polytypo/data/locales/lt.json
89
92
  - lib/polytypo/data/locales/lv.json
93
+ - lib/polytypo/data/locales/nb.json
90
94
  - lib/polytypo/data/locales/nl.json
91
95
  - lib/polytypo/data/locales/pl.json
92
96
  - lib/polytypo/data/locales/pt-BR.json