forked from grassrootseconomics/visedriver
Add gettext in exported storage service
This commit is contained in:
parent
5216a9383e
commit
d8e7c443b5
@ -7,6 +7,7 @@ import (
|
|||||||
"git.defalsify.org/vise.git/db"
|
"git.defalsify.org/vise.git/db"
|
||||||
"git.defalsify.org/vise.git/resource"
|
"git.defalsify.org/vise.git/resource"
|
||||||
"git.defalsify.org/vise.git/persist"
|
"git.defalsify.org/vise.git/persist"
|
||||||
|
"git.defalsify.org/vise.git/lang"
|
||||||
"git.grassecon.net/grassrootseconomics/visedriver/storage"
|
"git.grassecon.net/grassrootseconomics/visedriver/storage"
|
||||||
dbstorage "git.grassecon.net/grassrootseconomics/visedriver/storage/db"
|
dbstorage "git.grassecon.net/grassrootseconomics/visedriver/storage/db"
|
||||||
)
|
)
|
||||||
@ -40,6 +41,11 @@ func NewStorageService(conn storage.ConnData) (*StorageService, error) {
|
|||||||
return svc, nil
|
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
|
// TODO: simplify enable poresource, conndata instead
|
||||||
func(ss *StorageService) SetResourceDir(resourceDir string) error {
|
func(ss *StorageService) SetResourceDir(resourceDir string) error {
|
||||||
ss.svc = ss.svc.WithResourceDir(resourceDir)
|
ss.svc = ss.svc.WithResourceDir(resourceDir)
|
||||||
|
Loading…
Reference in New Issue
Block a user