From 911e5701cb0e85f1c16a14ffa74f2619ff244a1e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 15:25:14 +0000 Subject: [PATCH] docs(skills): the i18n skill says what the locales read answers about the default and source locale Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj --- .changeset/36873-i18n-skill-locales-source-locale.md | 10 ++++++++++ skills/objectstack-i18n/SKILL.md | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 .changeset/36873-i18n-skill-locales-source-locale.md diff --git a/.changeset/36873-i18n-skill-locales-source-locale.md b/.changeset/36873-i18n-skill-locales-source-locale.md new file mode 100644 index 00000000000..e6d968406d1 --- /dev/null +++ b/.changeset/36873-i18n-skill-locales-source-locale.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the i18n skill says what `GET /api/v1/i18n/locales` answers about the default and source locale + +Clause-②: no (published prose only; names a member the locales read already returns on main) +Metadata-protocol: none + +The Registration section of `skills/objectstack-i18n/SKILL.md` now says the locales answer marks the default locale (`isDefault`) and names `sourceLocale` (the declared one, else the default), so a client that writes translations can tell which language inline `label:` text is in without reading the stack config. The words are paid for in the same file, with no fact removed: the note that the contract's `.ts` source does not ship becomes one line, and the optional-methods sentence drops "Treat them as". diff --git a/skills/objectstack-i18n/SKILL.md b/skills/objectstack-i18n/SKILL.md index 2b1f06c7f0f..0975b74f7a4 100644 --- a/skills/objectstack-i18n/SKILL.md +++ b/skills/objectstack-i18n/SKILL.md @@ -354,8 +354,7 @@ resolves keys with fallback: import type { II18nService } from '@objectstack/spec/contracts'; ``` -(The contract's source `.ts` is not part of the published package — only -`src/**/*.zod.ts` ships — so there is no `node_modules` source to read.) +(Only `src/**/*.zod.ts` ships, so the contract's `.ts` source is not in `node_modules` to read.) Methods implemented by both shipped adapters (`FileI18nAdapter` from `@objectstack/service-i18n`, and the in-memory fallback `@objectstack/core` @@ -372,9 +371,9 @@ The in-memory fallback additionally resolves locale codes through `resolveLocale case-insensitive → same platform-table language (`zh-TW` → `zh-Hant`) → base language `zh-CN` → `zh` → first registered variant `zh` → `zh-CN`. -The contract also declares optional methods — `getFieldLabels`, `getCoverage`, -`suggestTranslations` — that **no shipped implementation provides**. Treat them -as extension points for a custom workbench or TMS adapter. (`getAppBundle` / +The contract declares optional methods — `getFieldLabels`, `getCoverage`, +`suggestTranslations` — that **no shipped implementation provides**: extension +points for a custom workbench or TMS adapter. (`getAppBundle` / `loadAppBundle` went with the `o.*` shape they returned.) ### Registration @@ -382,7 +381,8 @@ as extension points for a custom workbench or TMS adapter. (`getAppBundle` / You do not wire this plugin: `os serve` registers `I18nServicePlugin` itself whenever the stack config carries `translations` or `i18n` (kernel bootstrap is **objectstack-platform → Runtime Boot Sequence**). It self-registers -`GET /api/v1/i18n/locales`, `/translations/:locale` and `/labels/:object/:locale`. +`GET /api/v1/i18n/locales`, `/translations/:locale` and `/labels/:object/:locale`; the locales +answer marks the default locale (`isDefault`) and names `sourceLocale` (the declared one, else the default). ---