Commit 3145f40
committed
fix(i18n,widgets): a translated reference card printed every fact twice, and the copy-paste snippet pinned every embedder to English
Two defects that only appear once the page is not English.
`<roxy-reference-card>` builds its whole output from `Object.entries`, so
the day the API began echoing `nameLocalized` beside `name` the card began
drawing one fact as two rows, each under its own heading, on every
non-English lookup and on a page whose owner changed nothing. That is a
regression rather than a missing feature: the card was correct until we
shipped the additive field. `foldLocalized` now runs before anything reads
a key, at all three levels that read one (the record, a nested object, and
the join in `objectLabel`), so the reader gets their value under the
canonical name and the twin is gone.
The generated snippet emitted `lang="en"`. A component with no `lang`
resolves its language from the element, then the nearest ancestor carrying
one, then `<html lang>`, which is what lets a snippet pasted into a Spanish
CMS speak Spanish with no edit. The attribute won that chain at the first
link, so every copy-paste embedder was pinned to English including the ones
whose page already said otherwise. Dropped from the source, so it clears
the catalogue, the registry and the docs manifest in one edit.
Also:
- `<roxy-data>`, `<roxy-bodygraph>`, `<roxy-hd-type-card>`,
`<roxy-hd-variables>` and `<roxy-reference-card>` now carry catalogue
entries in all seven languages. `<roxy-hd-connection>` and
`<roxy-hd-penta>` are deliberately left English: what they write is
doctrine prose rather than labels, and a half-translated card is worse
than a consistent one. A build guard now makes the half state
uncommittable.
- Centre names are longer once translated, and an SVG clips at its
viewport rather than wrapping, so a Russian bodygraph would have lost
text silently: our layout e2e skips every node inside an SVG. `labelFit`
sizes them; English charts stay byte-identical.
- The truncation guard was anchored on `??`, which was only the half of
the class that had bitten us. A bare `modality.slice(0, 3)` in the
element-modality header turned `Cardinal` into `Car` on purpose and
every translated word into debris, splitting a matra off its consonant
in Devanagari. The guard is now any short literal slice, comments
excluded so the why-notes quoting the bug do not trip it.
- Spanish read `Configuraciones de la carta` for chart patterns, which is
settings, not aspect figures. `Figuras planetarias`, sourced.
- Spec refreshed from live: `transitInterpretation` is now required on a
transit aspect, which the wheel fixture was missing.1 parent c4f6a6c commit 3145f40
26 files changed
Lines changed: 2760 additions & 399 deletions
File tree
- apps/docs
- packages/ui
- src
- components
- i18n
- locales
- utils
- tests
- scripts
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
| 791 | + | |
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
28 | 39 | | |
29 | 40 | | |
30 | 41 | | |
| |||
306 | 317 | | |
307 | 318 | | |
308 | 319 | | |
309 | | - | |
| 320 | + | |
310 | 321 | | |
311 | 322 | | |
312 | | - | |
| 323 | + | |
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| |||
323 | 334 | | |
324 | 335 | | |
325 | 336 | | |
326 | | - | |
| 337 | + | |
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| |||
367 | 378 | | |
368 | 379 | | |
369 | 380 | | |
370 | | - | |
| 381 | + | |
371 | 382 | | |
372 | 383 | | |
373 | 384 | | |
| |||
396 | 407 | | |
397 | 408 | | |
398 | 409 | | |
399 | | - | |
| 410 | + | |
400 | 411 | | |
401 | 412 | | |
402 | 413 | | |
| |||
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
461 | | - | |
| 472 | + | |
462 | 473 | | |
463 | 474 | | |
464 | 475 | | |
| |||
512 | 523 | | |
513 | 524 | | |
514 | 525 | | |
515 | | - | |
| 526 | + | |
516 | 527 | | |
517 | 528 | | |
518 | 529 | | |
| |||
535 | 546 | | |
536 | 547 | | |
537 | 548 | | |
538 | | - | |
| 549 | + | |
539 | 550 | | |
540 | 551 | | |
541 | 552 | | |
| |||
568 | 579 | | |
569 | 580 | | |
570 | 581 | | |
571 | | - | |
| 582 | + | |
572 | 583 | | |
573 | 584 | | |
574 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
83 | | - | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
104 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
107 | | - | |
108 | 121 | | |
109 | | - | |
110 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
111 | 129 | | |
112 | 130 | | |
113 | | - | |
| 131 | + | |
114 | 132 | | |
115 | 133 | | |
116 | 134 | | |
| |||
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
126 | | - | |
| 144 | + | |
127 | 145 | | |
128 | 146 | | |
129 | 147 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
133 | 154 | | |
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
138 | 159 | | |
139 | 160 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
147 | 171 | | |
148 | 172 | | |
149 | 173 | | |
| |||
0 commit comments