/wbTranslate — Live Demo ()
What /wbTranslate would actually do on wb-labs right now. The candidate components and locale-file state below reflect the live workspace.
1. Live target
| Field | Live value |
|---|---|
| Components with user-facing strings | Various Vue components in core2/packages/wb-core/src/components/ and consumer apps |
| Existing i18n setup | None obvious in workspace — first run would bootstrap from scratch |
| English-only convention | Per project_docs_edition.md: docs are english-only. UI components likely follow once i18n bootstrap happens. |
| Untested-apps note | wbc-ui2-cdn is parked; cleanup before bootstrap there is risky |
| Most-likely first target | core2/packages/wb-core/src/components/WBCode.vue or sibling — small, contained, has user-facing labels |
The "no existing i18n" state means the first /wbTranslate run is a true bootstrap — populating en.json from scratch. The english-only memory rule is informational; /wbTranslate would create only en.json, leaving fr.json and ar.json for later content work.
2. What each input form would resolve to today
| Input | Live resolution |
|---|---|
/wbTranslate core2/packages/wb-core/src/components/WBCode.vue | Standard bootstrap. Likely 5-10 user-facing strings. |
/wbTranslate core2/packages/wb-core/src/components/ | Directory pass; aggregated en.json. |
/wbTranslate core2/packages/wbc-ui2-cdn/ | Permitted but cautious — memory flags package as parked; would scan but warn that bootstrap during parked state could create churn. |
/wbTranslate "the login form" | Halt — free-text. |
/wbTranslate core2/packages/wb-core/src/tierEnforcement.js | One-line "no user-facing strings" (the file throws internal errors only). Exit 0. |
/wbTranslate <component> --new-only | Refuse on first run — -n requires existing extractions. Suggests running without -n first. |
3. Per-flag behavior, applied live
| Flag combination | Live result |
|---|---|
| (no flag, file target) | Bootstrap pass; populates en.json from scratch. |
| (no flag, directory target) | Walks; aggregated en.json. |
--new-only on first run | Refuse — nothing to "preserve." |
--new-only after a prior bootstrap | Maintenance pass; only adds new keys. |
4. Pipelines
/wbTranslate core2/packages/wb-core/src/components/WBCode.vue> /wbTranslate core2/packages/wb-core/src/components/WBCode.vue💠 Pipeline First bootstrap of WBCode.vue
💠 Pipeline A "no strings" file
💠 Pipeline Refuse --new-only on first run
💠 Pipeline Maintenance after Pipeline A
A week later, WBCode.vue gets two new strings added:
5. What would refuse today
| Trigger | Live response |
|---|---|
/wbTranslate (no target) | Halt. |
/wbTranslate "the login form" | Halt — free-text. |
/wbTranslate <new-component> --new-only | Refuse — nothing to preserve. |
/wbTranslate <file with only error throws> | Exit 0 — no user-facing strings. |
/wbTranslate core2/packages/wbc-ui2-cdn/ | Permitted but warns about parked package. Asks confirmation. |
/wbTranslate <test file> | Skip — test files don't translate. |
| User asks for fr.json / ar.json content | Refuse politely — /wbTranslate doesn't translate. Suggests human or separate model pass with translator-quality prompts. |
| Existing locale file is corrupted JSON | Halt — refuses to act on broken state. |
The pattern: /wbTranslate is i18n bootstrap, not i18n content. It produces scaffolding (key extraction, en.json population, glossary file) and explicitly does not invent translations. The single flag (--new-only) addresses the maintenance case; first-run is flag-free. Memory awareness shows up in caution around parked packages and english-only rule informational notes. The boundary with content work is hard and clearly named — every report ends with "did NOT translate" so the user knows where the seam is.
