with one click
i18n-usage
// Code examples and patterns for using i18n translations in sfdx-hardis source code (uxLog, uxLogTable, prompts, markers). Use when adding or modifying user-visible strings.
// Code examples and patterns for using i18n translations in sfdx-hardis source code (uxLog, uxLogTable, prompts, markers). Use when adding or modifying user-visible strings.
Style rules for updating CHANGELOG.md entries. Use whenever the user asks to update, add to, or write entries in CHANGELOG.md.
Implement a feature, bug fix, or code change in sfdx-hardis. Use whenever the user asks to add a feature, fix a bug, implement something, or make a code change - with or without a prior /design phase.
Watch the GitHub PR for the current branch, wait for CI to finish, and autonomously fix failing jobs by reading logs, editing sources, and pushing. Stops cleanly when stuck.
Decision framework for fixing jscpd (copy-paste detector) errors. Use when asked to fix jscpd issues, copy-paste errors, clones or COPYPASTE lint failures.
sfdx-hardis project architecture, technology stack, provider pattern, configuration system, and project structure. Use when working with project structure, providers, hooks, or config.
How sfdx-hardis monitoring commands, notification types, frequency, and per-channel routing fit together. Use when adding a new monitoring command, adding a new notification type, changing default routing thresholds, or wiring a new channel.
| name | i18n-usage |
| description | Code examples and patterns for using i18n translations in sfdx-hardis source code (uxLog, uxLogTable, prompts, markers). Use when adding or modifying user-visible strings. |
| user-invocable | false |
import { t } from "../../../common/utils/i18n.js";
For picking the right level (action, log, warning, error, success, other) and its matching chalk color, see the uxlog-usage skill.
// Correct
uxLog("action", this, c.cyan(t("deployingMetadata", { metadata: name })));
// Wrong - hardcoded English string
uxLog("action", this, c.cyan(`Deploying metadata ${name}...`));
import { uxLogTable } from "../../../common/utils/index.js";
uxLogTable(
this,
[{ name: "My Flow", type: "Flow", status: "Active" }],
[
{ key: "name", label: t("name") },
{ key: "type", label: t("type") },
{ key: "status", label: t("status") },
]
);
const res = await prompts({
type: "select",
name: "value",
message: t("selectEnvironment"),
description: t("selectEnvironmentDescription"),
choices: [
{ title: t("choiceProduction"), value: "prod" },
{ title: t("choiceSandbox"), value: "sandbox" },
],
});
WebSocketClient.sendReportFileMessage(url, t("slackIntegration"), "docUrl");
WebSocketClient.sendProgressStartMessage(t("collectingData"), items.length);
Translate column names individually, not the whole header:
const header = `| ${t("name")} | ${t("type")} | ${t("description")} |`;
Do NOT translate [] markers. Keep them as hardcoded literals and concatenate:
uxLog("action", this, c.cyan("[MyMarker] " + t("someMessage")));