use master version of gotext package (#5868)

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
kobergj
2023-03-17 16:03:28 +01:00
committed by GitHub
parent cefdb457a1
commit 9750dfaff9
4 changed files with 13 additions and 4 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import (
"context"
"embed"
"errors"
"io/fs"
"strings"
"text/template"
"time"
@@ -287,7 +288,8 @@ func loadTemplates(nt NotificationTemplate, locale string, path string) (string,
// Create Locale with library path and language code and load default domain
var l *gotext.Locale
if path == "" {
l = gotext.NewLocaleFS("l10n/locale", locale, _translationFS)
filesystem, _ := fs.Sub(_translationFS, "l10n/locale")
l = gotext.NewLocaleFS(locale, filesystem)
} else { // use custom path instead
l = gotext.NewLocale(path, locale)
}