Import Anubis v1.28.2
Replace the tree with upstream TecharoHQ/anubis v1.28.2 (a1384fbf42e3). Masyunis customizations are re-applied in the following commits.
This commit is contained in:
1 parent
eb3e46d8d0
commit
e07de898cd
573 files changed
+35846
-6807
No files matched your search
@@ -15,6 +15,12 @@ import (
|
||||
//go:embed locales/*.json
|
||||
var localeFS embed.FS
|
||||
|
||||
// manifestFile lists the supported languages. It is metadata, not a translation
|
||||
// catalog: go-i18n derives a locale from the file name, and "manifest" registers
|
||||
// under language.Und, which then shadows the English fallback for requests that
|
||||
// ask for "und".
|
||||
const manifestFile = "manifest.json"
|
||||
|
||||
type LocalizationService struct {
|
||||
bundle *i18n.Bundle
|
||||
}
|
||||
@@ -39,7 +45,7 @@ func NewLocalizationService() *LocalizationService {
|
||||
|
||||
loadedAny := false
|
||||
for _, entry := range entries {
|
||||
if !entry.IsDir() && strings.HasSuffix(entry.Name(), ".json") {
|
||||
if !entry.IsDir() && strings.HasSuffix(entry.Name(), ".json") && entry.Name() != manifestFile {
|
||||
filePath := "locales/" + entry.Name()
|
||||
_, err := bundle.LoadMessageFileFS(localeFS, filePath)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user