feat: embed and load locale translations on init
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Failing after 39s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-17 00:45:34 +00:00
parent 223c41dfdf
commit 8367a5323c
2 changed files with 10 additions and 0 deletions

View file

@ -14,9 +14,12 @@ package forge
import (
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"forge.lthn.ai/core/go-scm/locales"
)
func init() {
i18n.LoadFS(locales.FS, ".")
cli.RegisterCommands(AddForgeCommands)
}

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