From d8e7c443b5efd84211aee32ac3ac0329dfd8f3de Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 10 Jan 2025 11:54:59 +0000 Subject: [PATCH] Add gettext in exported storage service --- common/storage.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/storage.go b/common/storage.go index 507aa0f..4887d0f 100644 --- a/common/storage.go +++ b/common/storage.go @@ -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)