Repository navigation
Commit 45b5b95
feat(snippets): single SupportedLanguages component over vended JSON
Replaces the standalone LanguageTable snippet with one
`<SupportedLanguages>` component. Doc authors drop it anywhere they
need to list languages and pass props that mirror the
`GET /v3/languages` contract:
- `mode`: `inline` (default, comma-separated codes) | `bullets` |
`table` (the existing interactive sortable/filterable table).
- `resource`: matches a /v3/languages resource (`translate_text`,
`translate_document`, `voice`, `write`, `glossary`, `style_rules`,
`translation_memory`).
- `feature`: API feature key (`style_rules`, `writing_style`, `tone`,
`auto_detection`, `glossary`, `tag_handling`, ...).
- `direction`: `source` | `target`.
- `includeBeta`: bool.
The snippet inlines a `RESOURCES` object holding the verbatim
/v3/languages responses, refreshed by the hourly workflow via
`scripts/generate_language_table.py`. Mintlify's snippet sandbox does
not honour ES module imports, so the data has to ship inside the
snippet file itself. Operators not supported by the sandbox (`in`,
notably) are avoided.
Adds `data/v3-languages/translation_memory.json` shaped like a
/v3/languages response so the real API response can drop in unchanged
once Translation Memory ships as a resource.
Wires the regen step into `.github/workflows/refresh-v3-languages.yml`
so each hourly refresh produces a single PR containing both the
updated JSON and the regenerated snippet.
Migrates the two `docs`/`api-reference` places that hand-typed feature
language lists to use `<SupportedLanguages>` instead. The
quality-estimation page keeps its manual list for now because QE is
not exposed as a /v3/languages resource yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 366cc68 commit 45b5b95
9 files changed
Lines changed: 1142 additions & 305 deletions
File tree
- .github/workflows
- api-reference
- data/v3-languages
- docs/getting-started
- scripts
- snippets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 106 | + | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
| |||
135 | 130 | | |
136 | 131 | | |
137 | 132 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 133 | + | |
146 | 134 | | |
147 | 135 | | |
148 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
0 commit comments