You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2289fe0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service-datasource): translate the driver catalog into every platform language
The catalog carried Simplified Chinese only, which opened a language tier on a
platform whose locale table lists eleven languages, each complete. The
translations are now keyed by the platform table's tags and cover all ten
non-English languages, written once per language and laid out per driver so a
shared field reads one way. The requested code is read through the table's own
reader, shortened one subtag at a time, so Traditional Chinese codes reach
zh-Hant and never fall to the Simplified text. The coverage test walks
PLATFORM_LOCALE_TAGS, so a missing language goes red.
Claude-Session: https://claude.ai/code/session_016WV4czJVaL8SDBxjng4RLk
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .changeset/30563-driver-catalog-requester-language.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,4 @@ fix(service-datasource): the datasource driver catalog serves its words in the r
7
7
Clause-②: no
8
8
Metadata-protocol: none
9
9
10
-
`GET /api/v1/datasources/drivers` now serves each driver's label and description, and each connection field's `title` and `description` (Filename, Auto-migrate schema, Host, Port, …), in the language the request names: the top `Accept-Language` tag, else `?locale=`, matched by the platform's locale ladder (`resolveLocaleAmong`), so `zh`, `zh-cn` and `zh-SG` reach `zh-CN`. Simplified Chinese is translated for every offered driver. English requests, languages without a translation, and any word a translation leaves out are served the English text, never a key. `DRIVER_CATALOG` stays the English catalog, and the new `driverCatalogFor(locale)` in the package source builds the localized one; ids, icons, types and defaults are unchanged in every language.
10
+
`GET /api/v1/datasources/drivers` now serves each driver's label and description, and each connection field's `title` and `description` (Filename, Auto-migrate schema, Host, Port, …), in the language the request names: the top `Accept-Language` tag, else `?locale=`. The code is read through the platform locale table (`platformLocaleTagOf`, shortened one subtag at a time), so `zh-TW` and `zh-HK` get Traditional Chinese, `zh`, `zh-CN` and `zh-SG` Simplified, `pt` Brazilian Portuguese and `fr-CA` French. Every language on the table is translated for every offered driver: Simplified and Traditional Chinese, Spanish, Arabic, French, Brazilian Portuguese, Russian, German, Japanese and Korean. English requests, codes the table does not name, and product names (SQLite, PostgreSQL, MySQL / MariaDB, MongoDB) are served the English text, never a key. `DRIVER_CATALOG` stays the English catalog, and the new `driverCatalogFor(locale)` in the package source builds the localized one; ids, icons, types and defaults are unchanged in every language.
0 commit comments