Skip to content

/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 ​

FieldLive value
Components with user-facing stringsVarious Vue components in core2/packages/wb-core/src/components/ and consumer apps
Existing i18n setupNone obvious in workspace — first run would bootstrap from scratch
English-only conventionPer project_docs_edition.md: docs are english-only. UI components likely follow once i18n bootstrap happens.
Untested-apps notewbc-ui2-cdn is parked; cleanup before bootstrap there is risky
Most-likely first targetcore2/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 ​

InputLive resolution
/wbTranslate core2/packages/wb-core/src/components/WBCode.vueStandard 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.jsOne-line "no user-facing strings" (the file throws internal errors only). Exit 0.
/wbTranslate <component> --new-onlyRefuse on first run — -n requires existing extractions. Suggests running without -n first.

3. Per-flag behavior, applied live ​

Flag combinationLive result
(no flag, file target)Bootstrap pass; populates en.json from scratch.
(no flag, directory target)Walks; aggregated en.json.
--new-only on first runRefuse — nothing to "preserve."
--new-only after a prior bootstrapMaintenance pass; only adds new keys.

4. Pipelines ​

📋/wbTranslate Live Execution Simulator
First bootstrap of WBCode.vue/wbTranslate core2/packages/wb-core/src/components/WBCode.vue
> /wbTranslate core2/packages/wb-core/src/components/WBCode.vue
[SYSTEM] Target: WBCode.vue
[CONTEXT] Reading project_docs_edition.md... (english-only rule
informational only — bootstrap creates en.json; fr/ar later).
[SCAN] Reading file...
[CANDIDATES IDENTIFIED]
Template (4 user-facing strings):
- Line 12: "View source" (button label, conditional on dev mode)
- Line 17: "Copy" (button label)
- Line 18: "Copied!" (transient feedback text)
- Line 22: "Toggle code" (aria-label)
[NOT EXTRACTED] (heuristic: not user-facing)
- Line 8: __WBC_DEV__ identifier — JS, not user-visible.
- Line 14: 'aria-expanded' attribute name — DOM identifier, not value text.
[GENERATING KEYS]
wbCode.actions.viewSource: "View source"
wbCode.actions.copy: "Copy"
wbCode.actions.copied: "Copied!"
wbCode.aria.toggle: "Toggle code"
[CONFIRM] Bootstrap (4 strings; WBCode.vue updated; i18n/en.json
created)? [y/N] > y
[EDIT] core2/packages/wb-core/src/components/WBCode.vue:
4 lines updated to t('wbCode.<key>') calls.
[NEW FILE] core2/packages/wb-core/i18n/en.json:
{
"wbCode": {
"actions": { "viewSource": "View source", "copy": "Copy", "copied": "Copied!" },
"aria": { "toggle": "Toggle code" }
}
}
[NEW FILE] core2/packages/wb-core/i18n/glossary.md:
Translator notes:
- wbCode.actions.viewSource: button label, verb form (action),
only appears in dev mode.
- wbCode.actions.copy: button label.
- wbCode.actions.copied: transient text shown 2s after copy
click; past tense.
- wbCode.aria.toggle: accessibility label for the expand/collapse
button; verb form.
[OK] Bootstrap complete. en.json created with 4 keys.
[NEXT STEPS]
- For French/Arabic per the english-only memory rule:
1. Copy en.json → fr.json, ar.json.
2. Translate values in each (human work or separate model run).
3. Wire i18n provider in core2/packages/wb-core/src/index.js
(out of scope for /wbTranslate — that's setup work).
[NO TRANSLATION CONTENT] /wbTranslate did NOT translate any strings.

💠 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 ​

TriggerLive response
/wbTranslate (no target)Halt.
/wbTranslate "the login form"Halt — free-text.
/wbTranslate <new-component> --new-onlyRefuse — 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 contentRefuse politely — /wbTranslate doesn't translate. Suggests human or separate model pass with translator-quality prompts.
Existing locale file is corrupted JSONHalt — 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.