Replace hardcoded strings with i18n.T() calls across all cmd/* packages: - ai, build, ci, dev, docs, doctor, go, php, pkg, sdk, setup, test, vm Adds 500+ translation keys to en.json for command descriptions, flag descriptions, labels, messages, and error strings. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
872 B
Go
34 lines
872 B
Go
// Package pkg provides package management commands for core-* repos.
|
|
package pkg
|
|
|
|
import (
|
|
"github.com/host-uk/core/cmd/shared"
|
|
"github.com/host-uk/core/pkg/i18n"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Style and utility aliases
|
|
var (
|
|
repoNameStyle = shared.RepoNameStyle
|
|
successStyle = shared.SuccessStyle
|
|
errorStyle = shared.ErrorStyle
|
|
dimStyle = shared.DimStyle
|
|
ghAuthenticated = shared.GhAuthenticated
|
|
gitClone = shared.GitClone
|
|
)
|
|
|
|
// AddPkgCommands adds the 'pkg' command and subcommands for package management.
|
|
func AddPkgCommands(root *cobra.Command) {
|
|
pkgCmd := &cobra.Command{
|
|
Use: "pkg",
|
|
Short: i18n.T("cmd.pkg.short"),
|
|
Long: i18n.T("cmd.pkg.long"),
|
|
}
|
|
|
|
root.AddCommand(pkgCmd)
|
|
addPkgSearchCommand(pkgCmd)
|
|
addPkgInstallCommand(pkgCmd)
|
|
addPkgListCommand(pkgCmd)
|
|
addPkgUpdateCommand(pkgCmd)
|
|
addPkgOutdatedCommand(pkgCmd)
|
|
}
|