a few fixes for user teleportation

This commit is contained in:
Daniel Goc
2026-04-03 13:55:57 +02:00
parent af91842b14
commit f6b321b602
5 changed files with 17 additions and 12 deletions

View File

@@ -8,6 +8,7 @@ import (
"sync"
"git.ma-al.com/goc_daniel/b2b/app/model"
"git.ma-al.com/goc_daniel/b2b/app/utils/localeExtractor"
"github.com/gofiber/fiber/v3"
)
@@ -177,7 +178,7 @@ func (s *TranslationsStore) ReloadTranslations(translations []model.Translation)
// T_ is meant to be used to translate error messages and other system communicates.
func T_[T ~string](c fiber.Ctx, key T, params ...interface{}) string {
if langID, ok := c.Locals("langID").(uint); ok {
if langID, ok := localeExtractor.GetLangID(c); ok {
parts := strings.Split(string(key), ".")
if len(parts) >= 2 {