cli/pkg/cli/i18n.go
Snider 2efcbd59ec
Some checks failed
Deploy / build (push) Failing after 3s
Security Scan / security (push) Successful in 13s
refactor: move I18nService to go-i18n, simplify log wrapper
I18nService now lives in go-i18n as NewCoreService() — any binary can
use it without importing cli. Log convenience functions use go-log
directly. Removed LogService/NewLogService/daemon_cmd wrappers.

Root go.mod: 1 direct forge dep (core/go).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 16:24:12 +00:00

14 lines
293 B
Go

package cli
import (
"forge.lthn.ai/core/go-i18n"
)
// T translates a key using the CLI's i18n service.
// Falls back to the global i18n.T if CLI not initialised.
func T(key string, args ...map[string]any) string {
if len(args) > 0 {
return i18n.T(key, args[0])
}
return i18n.T(key)
}