cli/pkg/i18n/keys.go
Snider 829be45fcc feat(i18n): add remaining API features for stability
Implements the final features from the semantic i18n plan:

- Template caching: sync.Map cache for compiled templates
- Translator interface: enables mocking for tests
- Custom intent registration: thread-safe RegisterIntents(), UnregisterIntent()
- JSON-based grammar: verb/noun forms in locale files, checked before computed
- Fallback chain: T() tries common.action.{verb} and common.{verb}
- CLI enhancements: Timeout(), Filter(), Multi() options, ChooseMulti()
- Intent key constants: type-safe IntentCore* and Key* constants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:11:58 +00:00

126 lines
4 KiB
Go

// Code generated by go generate; DO NOT EDIT.
// To regenerate: task i18n:generate
package i18n
// Intent keys for type-safe intent references.
// Use these constants instead of string literals to catch typos at compile time.
//
// result := C(IntentCoreDelete, S("file", "config.yaml"))
const (
// Destructive actions
IntentCoreDelete = "core.delete"
IntentCoreRemove = "core.remove"
IntentCoreDiscard = "core.discard"
IntentCoreReset = "core.reset"
IntentCoreOverwrite = "core.overwrite"
// Creation actions
IntentCoreCreate = "core.create"
IntentCoreAdd = "core.add"
IntentCoreClone = "core.clone"
IntentCoreCopy = "core.copy"
// Modification actions
IntentCoreSave = "core.save"
IntentCoreUpdate = "core.update"
IntentCoreRename = "core.rename"
IntentCoreMove = "core.move"
// Git actions
IntentCoreCommit = "core.commit"
IntentCorePush = "core.push"
IntentCorePull = "core.pull"
IntentCoreMerge = "core.merge"
IntentCoreRebase = "core.rebase"
// Network actions
IntentCoreInstall = "core.install"
IntentCoreDownload = "core.download"
IntentCoreUpload = "core.upload"
IntentCorePublish = "core.publish"
IntentCoreDeploy = "core.deploy"
// Process actions
IntentCoreStart = "core.start"
IntentCoreStop = "core.stop"
IntentCoreRestart = "core.restart"
IntentCoreRun = "core.run"
IntentCoreBuild = "core.build"
IntentCoreTest = "core.test"
// Information actions
IntentCoreContinue = "core.continue"
IntentCoreProceed = "core.proceed"
IntentCoreConfirm = "core.confirm"
// Additional actions
IntentCoreSync = "core.sync"
IntentCoreBoot = "core.boot"
IntentCoreFormat = "core.format"
IntentCoreAnalyse = "core.analyse"
IntentCoreLink = "core.link"
IntentCoreUnlink = "core.unlink"
IntentCoreFetch = "core.fetch"
IntentCoreGenerate = "core.generate"
IntentCoreValidate = "core.validate"
IntentCoreCheck = "core.check"
IntentCoreScan = "core.scan"
)
// Common message keys for type-safe message references.
const (
// CLI status messages
KeyCliSuccess = "cli.success"
KeyCliError = "cli.error"
KeyCliWarning = "cli.warning"
KeyCliInfo = "cli.info"
KeyCliDone = "cli.done"
KeyCliFailed = "cli.failed"
KeyCliPass = "cli.pass"
KeyCliFail = "cli.fail"
KeyCliOK = "cli.ok"
KeyCliSkip = "cli.skip"
KeyCliPending = "cli.pending"
KeyCliCompleted = "cli.completed"
KeyCliCancelled = "cli.cancelled"
KeyCliAborted = "cli.aborted"
// Common prompts
KeyCommonPromptYes = "common.prompt.yes"
KeyCommonPromptNo = "common.prompt.no"
KeyCommonPromptContinue = "common.prompt.continue"
KeyCommonPromptProceed = "common.prompt.proceed"
KeyCommonPromptConfirm = "common.prompt.confirm"
KeyCommonPromptAbort = "common.prompt.abort"
KeyCommonPromptCancel = "common.prompt.cancel"
// Common labels
KeyCommonLabelError = "common.label.error"
KeyCommonLabelDone = "common.label.done"
KeyCommonLabelStatus = "common.label.status"
KeyCommonLabelVersion = "common.label.version"
KeyCommonLabelSummary = "common.label.summary"
KeyCommonLabelSuccess = "common.label.success"
KeyCommonLabelWarning = "common.label.warning"
KeyCommonLabelNote = "common.label.note"
KeyCommonLabelTotal = "common.label.total"
KeyCommonLabelCoverage = "common.label.coverage"
KeyCommonLabelPath = "common.label.path"
KeyCommonLabelURL = "common.label.url"
// Common status
KeyCommonStatusRunning = "common.status.running"
KeyCommonStatusStopped = "common.status.stopped"
KeyCommonStatusDirty = "common.status.dirty"
KeyCommonStatusSynced = "common.status.synced"
KeyCommonStatusUpToDate = "common.status.up_to_date"
KeyCommonStatusInstalling = "common.status.installing"
KeyCommonStatusCloning = "common.status.cloning"
// Error messages
KeyErrorNotFound = "error.not_found"
KeyErrorInvalid = "error.invalid"
KeyErrorPermission = "error.permission"
KeyErrorTimeout = "error.timeout"
KeyErrorNetwork = "error.network"
)