feat: embed and load locale translations on init

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-17 00:45:17 +00:00
parent 275d41f3fc
commit d4f10ea18f
2 changed files with 9 additions and 2 deletions

View file

@ -2,13 +2,13 @@
package buildcmd
import (
"embed"
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-build/locales"
"forge.lthn.ai/core/go-i18n"
)
func init() {
i18n.LoadFS(locales.FS, ".")
cli.RegisterCommands(AddBuildCommands)
}

7
locales/embed.go Normal file
View file

@ -0,0 +1,7 @@
// Package locales embeds translation files for this module.
package locales
import "embed"
//go:embed *.json
var FS embed.FS