feat(i18n): expand CLI translations and fix noun form detection
- Fix loader to properly detect noun form objects by checking for one/other structure before processing, preventing false positives on objects that happen to be under gram.noun.* path - Add comprehensive i18n strings for CLI commands including long descriptions, flag help text, and status labels - Add .claude/ project settings for Claude Code integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
29683c1ce7
commit
fa8e5334a5
3 changed files with 130 additions and 22 deletions
5
.claude/settings.json
Normal file
5
.claude/settings.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"enabledPlugins": {
|
||||||
|
"core@core-claude": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -147,24 +147,29 @@ func flattenWithGrammar(prefix string, data map[string]any, out map[string]Messa
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is a noun form object
|
// Check if this is a noun form object (under gram.noun.* path, or has gender field)
|
||||||
if grammar != nil && isNounFormObject(v) {
|
if grammar != nil && (strings.HasPrefix(fullKey, "gram.noun.") || isNounFormObject(v)) {
|
||||||
nounName := key
|
nounName := key
|
||||||
if strings.HasPrefix(fullKey, "gram.noun.") {
|
if strings.HasPrefix(fullKey, "gram.noun.") {
|
||||||
nounName = strings.TrimPrefix(fullKey, "gram.noun.")
|
nounName = strings.TrimPrefix(fullKey, "gram.noun.")
|
||||||
}
|
}
|
||||||
forms := NounForms{}
|
// Only process if it has one/other structure (noun pluralization)
|
||||||
if one, ok := v["one"].(string); ok {
|
_, hasOne := v["one"]
|
||||||
forms.One = one
|
_, hasOther := v["other"]
|
||||||
|
if hasOne && hasOther {
|
||||||
|
forms := NounForms{}
|
||||||
|
if one, ok := v["one"].(string); ok {
|
||||||
|
forms.One = one
|
||||||
|
}
|
||||||
|
if other, ok := v["other"].(string); ok {
|
||||||
|
forms.Other = other
|
||||||
|
}
|
||||||
|
if gender, ok := v["gender"].(string); ok {
|
||||||
|
forms.Gender = gender
|
||||||
|
}
|
||||||
|
grammar.Nouns[strings.ToLower(nounName)] = forms
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if other, ok := v["other"].(string); ok {
|
|
||||||
forms.Other = other
|
|
||||||
}
|
|
||||||
if gender, ok := v["gender"].(string); ok {
|
|
||||||
forms.Gender = gender
|
|
||||||
}
|
|
||||||
grammar.Nouns[strings.ToLower(nounName)] = forms
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is an article object
|
// Check if this is an article object
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,12 @@
|
||||||
"dependency": { "one": "dependency", "other": "dependencies" },
|
"dependency": { "one": "dependency", "other": "dependencies" },
|
||||||
"directory": { "one": "directory", "other": "directories" },
|
"directory": { "one": "directory", "other": "directories" },
|
||||||
"category": { "one": "category", "other": "categories" },
|
"category": { "one": "category", "other": "categories" },
|
||||||
"query": { "one": "query", "other": "queries" }
|
"query": { "one": "query", "other": "queries" },
|
||||||
|
"passed": { "one": "passed", "other": "passed" },
|
||||||
|
"failed": { "one": "failed", "other": "failed" },
|
||||||
|
"skipped": { "one": "skipped", "other": "skipped" },
|
||||||
|
"check": { "one": "check", "other": "checks" },
|
||||||
|
"test": { "one": "test", "other": "tests" }
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
"indefinite": { "default": "a", "vowel": "an" },
|
"indefinite": { "default": "a", "vowel": "an" },
|
||||||
|
|
@ -89,7 +94,14 @@
|
||||||
"related_files": "related files",
|
"related_files": "related files",
|
||||||
"up_to_date": "up to date",
|
"up_to_date": "up to date",
|
||||||
"dry_run": "dry run",
|
"dry_run": "dry run",
|
||||||
"go_mod": "go.mod"
|
"go_mod": "go.mod",
|
||||||
|
"test": "test",
|
||||||
|
"package": "package",
|
||||||
|
"filter": "filter",
|
||||||
|
"coverage": "coverage",
|
||||||
|
"passed": "passed",
|
||||||
|
"failed": "failed",
|
||||||
|
"skipped": "skipped"
|
||||||
},
|
},
|
||||||
"punct": {
|
"punct": {
|
||||||
"label": ":",
|
"label": ":",
|
||||||
|
|
@ -123,8 +135,16 @@
|
||||||
"cmd": {
|
"cmd": {
|
||||||
"ai": {
|
"ai": {
|
||||||
"short": "AI agent task management",
|
"short": "AI agent task management",
|
||||||
|
"long": "AI agent task management for core-agentic integration. Provides commands to list, claim, update, and complete tasks from the agentic task queue.",
|
||||||
"claude.short": "Claude Code integration",
|
"claude.short": "Claude Code integration",
|
||||||
|
"claude.long": "Claude Code integration for AI-assisted development workflows.",
|
||||||
|
"claude.config.short": "Configure Claude Code settings",
|
||||||
|
"claude.run.short": "Run Claude Code on current directory",
|
||||||
"task.short": "Show task details or auto-select a task",
|
"task.short": "Show task details or auto-select a task",
|
||||||
|
"task.long": "Show details of a specific task or auto-select the next available task from the queue.",
|
||||||
|
"task.flag.auto": "Auto-select the next available task",
|
||||||
|
"task.flag.claim": "Claim the task for yourself",
|
||||||
|
"task.flag.context": "Include full context in output",
|
||||||
"task.id_required": "task ID required (or use --auto)",
|
"task.id_required": "task ID required (or use --auto)",
|
||||||
"task.no_pending": "No pending tasks available.",
|
"task.no_pending": "No pending tasks available.",
|
||||||
"tasks.short": "List available tasks from core-agentic",
|
"tasks.short": "List available tasks from core-agentic",
|
||||||
|
|
@ -137,14 +157,36 @@
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"short": "Build projects with auto-detection and cross-compilation",
|
"short": "Build projects with auto-detection and cross-compilation",
|
||||||
|
"long": "Build projects with automatic project type detection and cross-compilation support. Supports Go, Wails, Node.js, and PHP projects.",
|
||||||
|
"flag.archive": "Create archive (tar.gz/zip) of build output",
|
||||||
|
"flag.checksum": "Generate SHA256 checksums",
|
||||||
|
"flag.ci": "Run in CI mode (non-interactive)",
|
||||||
|
"flag.config": "Path to build configuration file",
|
||||||
|
"flag.format": "Output format (binary, docker, appimage)",
|
||||||
|
"flag.image": "Docker image name for container builds",
|
||||||
|
"flag.no_sign": "Skip code signing",
|
||||||
|
"flag.notarize": "Notarize macOS builds",
|
||||||
|
"flag.output": "Output directory for build artifacts",
|
||||||
|
"flag.push": "Push container image to registry",
|
||||||
|
"flag.targets": "Comma-separated build targets (e.g., linux/amd64,darwin/arm64)",
|
||||||
|
"flag.type": "Project type override (go, wails, node, php)",
|
||||||
"error.invalid_target": "invalid target format \"{{.Target}}\", expected OS/arch (e.g., linux/amd64)",
|
"error.invalid_target": "invalid target format \"{{.Target}}\", expected OS/arch (e.g., linux/amd64)",
|
||||||
"error.no_project_type": "no supported project type detected in {{.Dir}}\nSupported types: go (go.mod), wails (wails.json), node (package.json), php (composer.json)",
|
"error.no_project_type": "no supported project type detected in {{.Dir}}\nSupported types: go (go.mod), wails (wails.json), node (package.json), php (composer.json)",
|
||||||
"from_path.short": "Build from a local directory",
|
"from_path.short": "Build from a local directory",
|
||||||
"pwa.short": "Build from a live PWA URL",
|
"pwa.short": "Build from a live PWA URL",
|
||||||
"sdk.short": "Generate API SDKs from OpenAPI spec"
|
"sdk.short": "Generate API SDKs from OpenAPI spec",
|
||||||
|
"sdk.long": "Generate API SDKs from an OpenAPI specification file. Supports multiple languages including TypeScript, Go, and PHP.",
|
||||||
|
"sdk.flag.dry_run": "Show what would be generated without writing files",
|
||||||
|
"sdk.flag.lang": "Target language (typescript, go, php)",
|
||||||
|
"sdk.flag.version": "SDK version to generate"
|
||||||
},
|
},
|
||||||
"ci": {
|
"ci": {
|
||||||
"short": "Publish releases (dry-run by default)",
|
"short": "Publish releases (dry-run by default)",
|
||||||
|
"long": "Publish releases to GitHub with automatic changelog generation. Runs in dry-run mode by default for safety.",
|
||||||
|
"flag.draft": "Create as draft release",
|
||||||
|
"flag.prerelease": "Mark as pre-release",
|
||||||
|
"flag.version": "Version to release (e.g., v1.2.3)",
|
||||||
|
"flag.go_for_launch": "Actually publish the release (disables dry-run)",
|
||||||
"dry_run_hint": "(dry-run) use --we-are-go-for-launch to publish",
|
"dry_run_hint": "(dry-run) use --we-are-go-for-launch to publish",
|
||||||
"go_for_launch": "GO FOR LAUNCH",
|
"go_for_launch": "GO FOR LAUNCH",
|
||||||
"init.short": "Initialize release configuration",
|
"init.short": "Initialize release configuration",
|
||||||
|
|
@ -153,6 +195,21 @@
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"short": "Multi-repo development workflow",
|
"short": "Multi-repo development workflow",
|
||||||
|
"long": "Multi-repo development workflow tools for managing federated monorepos. Provides health checks, commit assistance, push/pull operations, and CI status across all repositories.",
|
||||||
|
"api.short": "Start API development server",
|
||||||
|
"workflow.short": "Manage GitHub Actions workflows",
|
||||||
|
"workflow.long": "Manage GitHub Actions workflows across repositories. List, sync, and update workflow files.",
|
||||||
|
"workflow.list.short": "List workflows across repos",
|
||||||
|
"workflow.sync.short": "Sync workflow files across repos",
|
||||||
|
"vm.boot.short": "Boot development VM",
|
||||||
|
"vm.claude.short": "Run Claude in development VM",
|
||||||
|
"vm.install.short": "Install development VM",
|
||||||
|
"vm.serve.short": "Start services in development VM",
|
||||||
|
"vm.shell.short": "Open shell in development VM",
|
||||||
|
"vm.stop.short": "Stop development VM",
|
||||||
|
"vm.test.short": "Run tests in development VM",
|
||||||
|
"vm.update.short": "Update development VM",
|
||||||
|
"vm.status.short": "Show development VM status",
|
||||||
"no_changes": "No uncommitted changes found.",
|
"no_changes": "No uncommitted changes found.",
|
||||||
"no_git_repos": "No git repositories found.",
|
"no_git_repos": "No git repositories found.",
|
||||||
"confirm_claude_commit": "Have Claude commit these repos?",
|
"confirm_claude_commit": "Have Claude commit these repos?",
|
||||||
|
|
@ -227,11 +284,14 @@
|
||||||
},
|
},
|
||||||
"docs": {
|
"docs": {
|
||||||
"short": "Documentation management",
|
"short": "Documentation management",
|
||||||
|
"long": "Documentation management tools for listing and syncing documentation across repositories.",
|
||||||
"list.short": "List documentation across repos",
|
"list.short": "List documentation across repos",
|
||||||
"sync.short": "Sync documentation to core-php/docs/packages/"
|
"sync.short": "Sync documentation to core-php/docs/packages/"
|
||||||
},
|
},
|
||||||
"doctor": {
|
"doctor": {
|
||||||
"short": "Check development environment",
|
"short": "Check development environment",
|
||||||
|
"long": "Check development environment for required tools and configuration. Verifies git, gh CLI, language runtimes, and SSH setup.",
|
||||||
|
"verbose_flag": "Show detailed check results",
|
||||||
"ready": "Doctor: Environment ready",
|
"ready": "Doctor: Environment ready",
|
||||||
"no_repos_yaml": "No repos.yaml found (run from workspace directory)",
|
"no_repos_yaml": "No repos.yaml found (run from workspace directory)",
|
||||||
"install_missing": "Install missing tools:",
|
"install_missing": "Install missing tools:",
|
||||||
|
|
@ -240,13 +300,15 @@
|
||||||
},
|
},
|
||||||
"go": {
|
"go": {
|
||||||
"short": "Go development tools",
|
"short": "Go development tools",
|
||||||
|
"long": "Go development tools including testing, formatting, linting, and module management.",
|
||||||
"test.short": "Run Go tests",
|
"test.short": "Run Go tests",
|
||||||
"cov.short": "Run tests with coverage report",
|
"cov.short": "Run tests with coverage report",
|
||||||
"fmt.short": "Format Go code",
|
"fmt.short": "Format Go code",
|
||||||
"lint.short": "Run golangci-lint",
|
"lint.short": "Run golangci-lint",
|
||||||
"install.short": "Install Go binary",
|
"install.short": "Install Go binary",
|
||||||
"mod.short": "Module management",
|
"mod.short": "Module management",
|
||||||
"work.short": "Workspace management"
|
"work.short": "Workspace management",
|
||||||
|
"qa.short": "Run QA checks (fmt, lint, test)"
|
||||||
},
|
},
|
||||||
"php": {
|
"php": {
|
||||||
"short": "Laravel/PHP development tools",
|
"short": "Laravel/PHP development tools",
|
||||||
|
|
@ -287,9 +349,17 @@
|
||||||
"qa.flag.full": "Run all stages including slow checks",
|
"qa.flag.full": "Run all stages including slow checks",
|
||||||
"build.short": "Build Docker or LinuxKit image",
|
"build.short": "Build Docker or LinuxKit image",
|
||||||
"deploy.short": "Deploy to Coolify",
|
"deploy.short": "Deploy to Coolify",
|
||||||
|
"deploy_list.short": "List deployments",
|
||||||
|
"deploy_rollback.short": "Rollback to previous deployment",
|
||||||
|
"deploy_status.short": "Show deployment status",
|
||||||
"serve.short": "Run production container",
|
"serve.short": "Run production container",
|
||||||
"ssl.short": "Setup SSL certificates with mkcert",
|
"ssl.short": "Setup SSL certificates with mkcert",
|
||||||
"packages.short": "Manage local PHP packages",
|
"packages.short": "Manage local PHP packages",
|
||||||
|
"logs.short": "View application logs",
|
||||||
|
"shell.short": "Open shell in container",
|
||||||
|
"status.short": "Show container status",
|
||||||
|
"stop.short": "Stop running containers",
|
||||||
|
"stan.short": "Run PHPStan static analysis",
|
||||||
"ci.short": "Run CI/CD pipeline with combined reporting",
|
"ci.short": "Run CI/CD pipeline with combined reporting",
|
||||||
"ci.long": "Run all QA checks in optimal order and generate combined reports in JSON, markdown, or SARIF format for CI/CD integration.",
|
"ci.long": "Run all QA checks in optimal order and generate combined reports in JSON, markdown, or SARIF format for CI/CD integration.",
|
||||||
"ci.flag.json": "Output combined JSON report",
|
"ci.flag.json": "Output combined JSON report",
|
||||||
|
|
@ -300,6 +370,7 @@
|
||||||
},
|
},
|
||||||
"pkg": {
|
"pkg": {
|
||||||
"short": "Package management for core-* repos",
|
"short": "Package management for core-* repos",
|
||||||
|
"long": "Package management for core-* repositories. Clone, list, update, and search for packages.",
|
||||||
"install.short": "Clone a package from GitHub",
|
"install.short": "Clone a package from GitHub",
|
||||||
"list.short": "List installed packages",
|
"list.short": "List installed packages",
|
||||||
"update.short": "Update installed packages",
|
"update.short": "Update installed packages",
|
||||||
|
|
@ -309,11 +380,19 @@
|
||||||
},
|
},
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"short": "SDK validation and API compatibility tools",
|
"short": "SDK validation and API compatibility tools",
|
||||||
|
"long": "SDK validation and API compatibility tools. Check for breaking changes and validate OpenAPI specifications.",
|
||||||
"diff.short": "Check for breaking API changes",
|
"diff.short": "Check for breaking API changes",
|
||||||
"validate.short": "Validate OpenAPI spec"
|
"validate.short": "Validate OpenAPI spec"
|
||||||
},
|
},
|
||||||
"setup": {
|
"setup": {
|
||||||
"short": "Bootstrap workspace or clone packages from registry",
|
"short": "Bootstrap workspace or clone packages from registry",
|
||||||
|
"long": "Bootstrap a new workspace or clone packages from a repos.yaml registry. Interactive wizard for selecting packages to clone.",
|
||||||
|
"flag.all": "Clone all packages from registry",
|
||||||
|
"flag.build": "Build packages after cloning",
|
||||||
|
"flag.dry_run": "Show what would be cloned without cloning",
|
||||||
|
"flag.name": "Package name to clone",
|
||||||
|
"flag.only": "Only clone packages of this type",
|
||||||
|
"flag.registry": "Path to repos.yaml registry file",
|
||||||
"complete": "Setup complete",
|
"complete": "Setup complete",
|
||||||
"bootstrap_mode": "Bootstrap mode (no repos.yaml found)",
|
"bootstrap_mode": "Bootstrap mode (no repos.yaml found)",
|
||||||
"nothing_to_clone": "Nothing to clone.",
|
"nothing_to_clone": "Nothing to clone.",
|
||||||
|
|
@ -421,10 +500,18 @@
|
||||||
"issues.hint.triage": "Add labels and assignee"
|
"issues.hint.triage": "Add labels and assignee"
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"short": "Run Go tests with coverage"
|
"short": "Run Go tests with coverage",
|
||||||
|
"long": "Run Go tests with optional coverage reporting, race detection, and filtering.",
|
||||||
|
"flag.json": "Output results as JSON",
|
||||||
|
"flag.pkg": "Package to test (default: ./...)",
|
||||||
|
"flag.race": "Enable race detector",
|
||||||
|
"flag.run": "Run only tests matching pattern",
|
||||||
|
"flag.short": "Run only short tests",
|
||||||
|
"flag.verbose": "Verbose output"
|
||||||
},
|
},
|
||||||
"vm": {
|
"vm": {
|
||||||
"short": "LinuxKit VM management",
|
"short": "LinuxKit VM management",
|
||||||
|
"long": "LinuxKit VM management for running isolated development environments. Create, run, and manage lightweight VMs.",
|
||||||
"run.short": "Run a LinuxKit image or template",
|
"run.short": "Run a LinuxKit image or template",
|
||||||
"ps.short": "List running VMs",
|
"ps.short": "List running VMs",
|
||||||
"stop.short": "Stop a running VM",
|
"stop.short": "Stop a running VM",
|
||||||
|
|
@ -463,7 +550,10 @@
|
||||||
"summary": "Summary:",
|
"summary": "Summary:",
|
||||||
"setup": "Setup:",
|
"setup": "Setup:",
|
||||||
"config": "Config:",
|
"config": "Config:",
|
||||||
"repo": "Repo:"
|
"repo": "Repo:",
|
||||||
|
"test": "Running tests...",
|
||||||
|
"package": "Package:",
|
||||||
|
"coverage": "Coverage:"
|
||||||
},
|
},
|
||||||
"flag": {
|
"flag": {
|
||||||
"fix": "Auto-fix issues where possible",
|
"fix": "Auto-fix issues where possible",
|
||||||
|
|
@ -471,14 +561,17 @@
|
||||||
"json": "Output as JSON",
|
"json": "Output as JSON",
|
||||||
"sarif": "Output as SARIF for GitHub Security tab",
|
"sarif": "Output as SARIF for GitHub Security tab",
|
||||||
"verbose": "Show detailed output",
|
"verbose": "Show detailed output",
|
||||||
"registry": "Path to repos.yaml registry file"
|
"registry": "Path to repos.yaml registry file",
|
||||||
|
"coverage": "Generate coverage report",
|
||||||
|
"spec": "Path to OpenAPI specification file"
|
||||||
},
|
},
|
||||||
"progress": {
|
"progress": {
|
||||||
"running": "Running {{.Task}}...",
|
"running": "Running {{.Task}}...",
|
||||||
"checking": "Checking {{.Item}}..."
|
"checking": "Checking {{.Item}}..."
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"no_issues": "No issues found"
|
"no_issues": "No issues found",
|
||||||
|
"all_passed": "All tests passed"
|
||||||
},
|
},
|
||||||
"success": {
|
"success": {
|
||||||
"completed": "{{.Action}} successfully"
|
"completed": "{{.Action}} successfully"
|
||||||
|
|
@ -493,7 +586,8 @@
|
||||||
"count": {
|
"count": {
|
||||||
"succeeded": "{{.Count}} succeeded",
|
"succeeded": "{{.Count}} succeeded",
|
||||||
"failed": "{{.Count}} failed",
|
"failed": "{{.Count}} failed",
|
||||||
"skipped": "{{.Count}} skipped"
|
"skipped": "{{.Count}} skipped",
|
||||||
|
"passed": "{{.Count}} passed"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
|
@ -507,5 +601,9 @@
|
||||||
"es": "Spanish",
|
"es": "Spanish",
|
||||||
"fr": "French",
|
"fr": "French",
|
||||||
"zh": "Chinese"
|
"zh": "Chinese"
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"pass": "PASS",
|
||||||
|
"fail": "FAIL"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue