Add gettext in exported storage service

This commit is contained in:
lash 2025-01-10 11:54:59 +00:00
parent 5216a9383e
commit d8e7c443b5
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -7,6 +7,7 @@ import (
"git.defalsify.org/vise.git/db"
"git.defalsify.org/vise.git/resource"
"git.defalsify.org/vise.git/persist"
"git.defalsify.org/vise.git/lang"
"git.grassecon.net/grassrootseconomics/visedriver/storage"
dbstorage "git.grassecon.net/grassrootseconomics/visedriver/storage/db"
)
@ -40,6 +41,11 @@ func NewStorageService(conn storage.ConnData) (*StorageService, error) {
return svc, nil
}
func (ss *StorageService) WithGettext(path string, lns []lang.Language) *StorageService {
ss.svc = ss.svc.WithGettext(path, lns)
return ss
}
// TODO: simplify enable poresource, conndata instead
func(ss *StorageService) SetResourceDir(resourceDir string) error {
ss.svc = ss.svc.WithResourceDir(resourceDir)