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>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
version: '3'
|
|
|
|
includes:
|
|
gui: ./cmd/lthn-desktop/Taskfile.yml
|
|
cli: ./cmd/core/Taskfile.yml
|
|
demo: ./cmd/core-demo/Taskfile.yml
|
|
ide: ./cmd/core-gui/Taskfile.yml
|
|
|
|
tasks:
|
|
test:
|
|
desc: "Run all Go tests recursively for the entire project."
|
|
cmds:
|
|
- cmd: clear
|
|
platforms: [linux, darwin]
|
|
- cmd: cls
|
|
platforms: [windows]
|
|
- cmd: go test ./...
|
|
|
|
review:
|
|
desc: "Run CodeRabbit review to get feedback on the current changes."
|
|
cmds:
|
|
- coderabbit review --prompt-only
|
|
|
|
check:
|
|
desc: "Run a CodeRabbit review followed by the full test suite."
|
|
cmds:
|
|
- task: go:mod:tidy
|
|
- go test ./... # make sure the code compiles before asking coderabbit to review it
|
|
- task: review
|
|
|
|
go:mod:tidy:
|
|
summary: Runs `go mod tidy`
|
|
internal: true
|
|
cmds:
|
|
- go mod tidy
|
|
|
|
cov:
|
|
desc: "Generate coverage profile (coverage.txt)"
|
|
cmds:
|
|
- go test -coverprofile=coverage.txt ./...
|
|
|
|
cov-view:
|
|
desc: "Open the coverage report in your browser."
|
|
cmds:
|
|
- task: cov
|
|
- go tool cover -html=coverage.txt
|
|
|
|
i18n:generate:
|
|
desc: "Regenerate i18n key constants from locale files"
|
|
cmds:
|
|
- go generate ./pkg/i18n/...
|