@ikas/code-components-mcp 1.4.0-beta.46 → 1.4.0-beta.48
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.
package/data/framework.json
CHANGED
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
"translations": {
|
|
567
567
|
"title": "Localizing Labels — Prop & Group Translations (CLI)",
|
|
568
568
|
"description": "Add or remove per-locale translations of prop, prop-group, and component-name labels (displayName/description/name) with the CLI: set-prop-translation, set-group-translation, remove-prop-translation, remove-group-translation. Keywords: translation, çeviri, locale, localization, i18n.",
|
|
569
|
-
"content": "## Localizing Labels — Translations\n\nThe component/section's own **
|
|
569
|
+
"content": "## Localizing Labels — Translations\n\nThe component/section's own **display label**, a prop's **label** (`displayName` / `description`) and a prop-group's **label** (`name` / `description`) can be translated per locale. These translations live in a `translations` array on each prop / prop group in `ikas.config.json`:\n\n```json\n{\n \"name\": \"title\",\n \"displayName\": \"Title\",\n \"type\": \"TEXT\",\n \"translations\": [\n { \"id\": \"<auto>\", \"locale\": \"de\", \"displayName\": \"Titel\", \"description\": \"...\" }\n ]\n}\n```\n\n**Do NOT hand-edit the `translations` array.** Use the dedicated CLI commands — they validate the component/prop/group, generate the `id`, and upsert by locale:\n\n```bash\n# Prop label translation (displayName / description)\nnpx ikas-component config set-prop-translation --component MySection --prop title --locale de --displayName \"Titel\" --description \"...\"\n\n# Prop-group label translation (name / description)\nnpx ikas-component config set-group-translation --component MySection --group content --locale de --name \"Inhalt\"\n\n# Component (section) display label translation (the component's own displayName)\nnpx ikas-component config set-component-translation --component MySection --locale de --displayName \"Mein Abschnitt\"\n\n# Remove a translation for a locale\nnpx ikas-component config remove-prop-translation --component MySection --prop title --locale de\nnpx ikas-component config remove-group-translation --component MySection --group content --locale de\nnpx ikas-component config remove-component-translation --component MySection --locale de\n```\n\nIdentify the component with `--component <PascalCaseName>` or `--component-id <id>`; groups by their local `--group <id>` (the id as written in `ikas.config.json`, e.g. `content`).\n\n### Valid locales — never invent one\n\nThe `--locale` value MUST be one of the editor's **configured** locales. Discover them first:\n\n```bash\nnpx ikas-component config list-locales # → { defaultLocale, locales: [{ locale, isDefault, name }] }\n```\n\nUse only the returned `locale` codes (e.g. `en`, `de`, `tr`). Do NOT guess or invent a locale — an unknown locale is still applied but the dev server logs a warning and it matches no language, so it never appears anywhere. (`list-locales` requires a running dev server with the editor connected.)\n\n### How it reaches the editor\n\n- **Studio owns translations.** They are normally authored by the translation team in the visual editor. Config translations are *seeded* into the editor only for props/groups the studio has never seen yet (first import, or a newly added prop/group).\n- **Live edits are authoritative.** While the dev server (`ikas-component dev`) is running and the editor is connected, a `*-translation` command (or any change to the `translations` in the file) is detected and pushed to the editor live — it overrides the studio value for that (label, locale) and is NOT clobbered on the next reconnect.\n- If you change an **already-imported** prop's translation while the dev server is **not** running, it may be ignored on the next connect (studio-wins). Prefer editing while connected.\n\n### Base label vs. translation\n\n- The **default-locale base label** is code-owned and read-only in the editor's default locale:\\n - prop: `displayName` / `description` → `config update-prop`\\n - prop group: `name` / `description` → `config update-prop-group`\\n - **component (section) name: `displayName` → `config update-component --displayName \\\"...\\\"`** (the component's own `name` stays the PascalCase identifier/lookup key; `displayName` is the human label, may contain spaces, falls back to `name`).\\n- **Never add a translation row for the editor's default locale** (`config list-locales` → `defaultLocale`) — its label comes from the base/displayName, and the editor ignores/strips a default-locale translation. Also never translate a label to the exact same value as the base — it is pointless clutter.\n- The **per-locale `translations`** are what the `*-translation` commands manage.\n\nRun `npx ikas-component config --help` to confirm the commands exist (requires a recent CLI build).",
|
|
570
570
|
"tags": [
|
|
571
571
|
"translation",
|
|
572
572
|
"translations",
|
|
@@ -583,7 +583,9 @@
|
|
|
583
583
|
"set-component-translation",
|
|
584
584
|
"remove-component-translation",
|
|
585
585
|
"component name",
|
|
586
|
-
"section name"
|
|
586
|
+
"section name",
|
|
587
|
+
"update-component",
|
|
588
|
+
"default locale"
|
|
587
589
|
]
|
|
588
590
|
}
|
|
589
591
|
}
|
package/data/storefront-api.json
CHANGED