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>
14 lines
293 B
Go
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)
|
|
}
|