commerce-b2b-open-code…
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
MUST activate to localize / internationalize a uiBundles/*/src/ project (React or Angular): extract hardcoded user-facing strings into Custom Labels, wire a runtime i18n library over the Platform SDK backend, add labels for another language, or troubleshoot label rendering
$ npx -y skills add forcedotcom/sf-skills --skill experience-ui-bundle-localize --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/experience-ui-bundle-localizeContext preview
The summary Claude sees to decide when to auto-load this skill.
MUST activate to localize / internationalize a uiBundles/*/src/ project (React or Angular): extract hardcoded user-facing strings into Custom Labels, wire a runtime i18n library over the Platform SDK backend, add labels for another language, or troubleshoot label rendering
name: experience-ui-bundle-localize
description: "MUST activate to localize / internationalize a uiBundles/*/src/ project (React or Angular): extract hardcoded user-facing strings into Custom Labels, wire a runtime i18n library over the Platform SDK backend, add labels for another language, or troubleshoot label rendering across locales. Triggers: user-facing string literals in component files, a CustomLabels.labels-meta.xml, a src/i18n/ directory or label-manifest.ts, translation call sites, or requests to 'translate / localize / internationalize / support another language.' Scope: authenticated B2E UI Bundles and B2C site bundles. Use experience-ui-bundle-site-generate instead for site language configuration or sfdc_cms__languageSettings. DO NOT TRIGGER for B2B site bundles, building app shell/UI or styling, reading/writing/refreshing records (use experience-ui-bundle-salesforce-data-access), generating a new bundle (use experience-ui-bundle-frontend-generate), deploying (use experience-ui-bundle-deploy), or authoring translations in Translation Workbench."
metadata:
version: "1.2"
domains: ["Experience"]
minApiVersion: "68.0"
relatedSkills:
- "experience-ui-bundle-deploy"
- "experience-ui-bundle-frontend-generate"
- "experience-ui-bundle-salesforce-data-access"
- "experience-ui-bundle-site-generate"
cliTools:
- tool: ["jq"]
semver: ">=1.6"
- tool: ["npm"]
semver: ">=7.0.0"
- tool: ["sf"]
semver: ">=2.0.0"Localize a UI Bundle: extract user-facing strings into Salesforce Custom Labels, wire a runtime i18n library over the Platform SDK backend, and verify labels across locales.
This file is the **framework-neutral workflow + guardrail spine**. The framework-specific detail — which i18n library, the translation call convention, the files scanned, the wiring shape, and the depth docs — lives in a per-framework reference.
A UI Bundle can't use compile-time label imports the way LWC does (`@salesforce/label/*` resolves inside the platform's compiler, which your standalone bundle doesn't go through). Instead, your app **fetches labels at runtime** through the Salesforce GraphQL UI API and hands them to a standard i18n library to render. The Platform SDK provides the runtime plumbing: a detector that reads the user's language, a backend that fetches labels over GraphQL, and a context fetch. You write two thin files — a short init that wires the SDK pieces into your i18n library, and a manifest listing which labels your app uses — then author the labels themselves as Salesforce Custom Labels metadata. The exact library and call convention are framework-specific; see your framework reference.
---
| The task is… | Go to | |---|---| | Bundle doesn't exist yet | **experience-ui-bundle-frontend-generate** skill | | Deploying the app with its labels | **experience-ui-bundle-deploy** skill | | Configuring site languages or `sfdc_cms__languageSettings` | **experience-ui-bundle-site-generate** skill | | Localizing an existing bundle | **Determine the framework (below), then the workflow** |
**Determine the framework.** It is normally already decided by the calling context — passed down by the coordinator skill that invoked this one, or stated in the user's request. Use that.
The frameworks this skill supports are exactly the reference folders under `<SKILL_DIR>/references/`, each containing a `localize.md` (so `react` → `<SKILL_DIR>/references/react/localize.md`). This is the single source of truth — adding a framework means adding a reference folder, nothing here changes.
keep it alongside this spine. It supplies the library, the call convention, the files to scan, and the wiring code.
detector on the app / uiBundle root before asking anyone:
bash "<SKILL_DIR>/scripts/detect-framework.sh" "<app-or-uiBundle-root>"
It combines an `angular.json` at/above the root, `@angular/core` / `react` in any non-`node_modules` `package.json`, and source-file signatures, then prints one token and sets a matching exit code:
detection is deterministic. Open `<SKILL_DIR>/references/<framework>/localize.md`.
the user which one to localize. If they name a framework with no matching reference folder, it is not supported here — stop.
guess and do not proceed: report that neither React nor Angular signals were found in the bundle, so localization cannot continue, and stop here.
Throughout the steps below, `<framework>` means the folder chosen here. The deterministic check scripts split by coupling:
detector above), `check-org-api-version.sh` and `detect-bundle-type.sh` (pure org/metadata checks), and `check-manifest-registered.sh` (agnostic skeleton; it takes `--framework <framework>` to select the call-site grammar).
(its manifest-into-backend detection is i18n-library-shaped, so each framework ships its own).
---
| # | Requirement | Verify | If missing | |---|---|---|---| | 1 | It's a `uiBundles/*/src/` project (React or Angular) | Project structure matches | Not a UI Bundle → route to the correct skill | | 2 | Platform SDK, UI Bundle, and build-plugin siblings installed and aligned (≥11.49.3) | `package.json` in the UI bundle dir | T
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code…
Use this skill to diagnose and resolve what blocks a DevOps Center promotion of a work item's feature branch: Git merge conflicts and deployment failures.…
Use this skill to manage the full lifecycle of a DevOps Center pipeline — list all pipelines, get a single pipeline's details, create a new pipeline linked to…
Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix…
Configures DevOps Center pipeline testing infrastructure: enables a test provider so its suites become available, re-syncs a configured provider to pull in new…