forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-localize
experience-ui-bundle-localize
VerifiedMUST 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 22.9 KB |
| references/angular/check-i18n-wired.shexecutable | script | 8.9 KB |
| references/angular/i18n-setup.md | markdown | 10.2 KB |
| references/angular/interpolation.md | markdown | 6.0 KB |
| references/angular/localize.md | markdown | 5.4 KB |
| references/common/gotchas.md | markdown | 14.5 KB |
| references/common/label-xml.md | markdown | 11.9 KB |
| references/common/platform-sdk-i18n.md | markdown | 7.6 KB |
| references/common/verifying.md | markdown | 15.0 KB |
| references/react/check-i18n-wired.shexecutable | script | 11.5 KB |
| references/react/i18n-setup.md | markdown | 10.7 KB |
| references/react/interpolation.md | markdown | 10.2 KB |
| references/react/localize.md | markdown | 3.8 KB |
| scripts/check-manifest-registered.shexecutable | script | 8.2 KB |
| scripts/check-org-api-version.shexecutable | script | 2.1 KB |
| scripts/detect-bundle-type.shexecutable | script | 6.4 KB |
| scripts/detect-framework.shexecutable | script | 2.2 KB |
| scripts/tests/test-detect-bundle-type.shexecutable | script | 9.1 KB |
scripts/detect-framework.sh
View on GitHub#!/usr/bin/env bash
#
# detect-framework.sh — deterministic UI Bundle framework detector.
#
# Usage: bash detect-framework.sh [ROOT]
# ROOT app or uiBundle root to inspect (default: current directory)
#
# Prints exactly one of the following tokens to stdout, nothing else, and sets
# a matching exit code so callers can branch without parsing:
# react (exit 0) — React signals only
# angular (exit 0) — Angular signals only
# ambiguous (exit 2) — both React and Angular signals present
# unknown (exit 3) — neither framework detected
#
# Step 0 of the skill acts on the result: a single framework (exit 0) proceeds;
# `ambiguous` asks the user to disambiguate; `unknown` TERMINATES the workflow
# (no supported framework found — do not guess).
set -u
ROOT="${1:-.}"
angular=0
react=0
# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
# 1) angular.json at or above ROOT → Angular workspace.
dir="$abs_root"
while [ -n "$dir" ]; do
[ -f "$dir/angular.json" ] && angular=1
[ "$dir" = "/" ] && break
dir="$(dirname "$dir")"
done
# 2) package.json dependencies (excluding node_modules).
while IFS= read -r pkg; do
[ -z "$pkg" ] && continue
grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
done <<EOF
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
EOF
# 3) Source-file signatures (excluding node_modules).
has_file() {
find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
}
# Angular: component files, routing module, or @Component-decorated classes.
has_file '*.component.ts' && angular=1
has_file 'app.routes.ts' && angular=1
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
angular=1
fi
# React: JSX/TSX source files.
has_file '*.tsx' && react=1
has_file '*.jsx' && react=1
if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
echo ambiguous
exit 2
elif [ "$angular" -eq 1 ]; then
echo angular
exit 0
elif [ "$react" -eq 1 ]; then
echo react
exit 0
else
echo unknown
exit 3
fi
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |