zealllot 1 год назад
Родитель
Сommit
04dd097297
3 измененных файлов с 4 добавлено и 8 удалено
  1. 4 5
      cmd/qor5/website-template/admin/config.go
  2. 0 1
      go.mod
  3. 0 2
      go.sum

+ 4 - 5
cmd/qor5/website-template/admin/config.go

@@ -3,7 +3,6 @@ package admin
 import (
 	"net/http"
 
-	"github.com/biter777/countries"
 	"github.com/qor/oss/filesystem"
 	"github.com/qor5/admin/activity"
 	"github.com/qor5/admin/l10n"
@@ -89,12 +88,12 @@ func newPB() Config {
 	media_view.Configure(b, db)
 	ab := activity.New(b, db).SetCreatorContextKey(login.UserKey)
 	l10nBuilder := l10n.New()
-	
+
 	pageBuilder := example.ConfigPageBuilder(db, "/admin/page_builder", ``, b.I18n())
 	pm := pageBuilder.Configure(b, db, l10nBuilder, ab)
 	tm := pageBuilder.ConfigTemplate(b, db)
 	cm := pageBuilder.ConfigCategory(b, db)
-	
+
 	ab.RegisterModels(pm, tm, cm)
 
 	storage := filesystem.New(PublishDir)
@@ -102,8 +101,8 @@ func newPB() Config {
 	publish_view.Configure(b, db, ab, publisher, pm)
 
 	l10nBuilder.
-		RegisterLocales(countries.International.String(), "International", "International").
-		RegisterLocales(countries.China.String(), "China", "China").
+		RegisterLocales("International", "International", "International").
+		RegisterLocales("China", "China", "China").
 		GetSupportLocaleCodesFromRequestFunc(func(R *http.Request) []string {
 			return l10nBuilder.GetSupportLocaleCodes()[:]
 		})

+ 0 - 1
go.mod

@@ -3,7 +3,6 @@ module github.com/qor5/docs
 go 1.19
 
 require (
-	github.com/biter777/countries v1.5.6
 	github.com/fatih/color v1.13.0
 	github.com/go-chi/chi v1.5.4
 	github.com/manifoldco/promptui v0.9.0

+ 0 - 2
go.sum

@@ -45,8 +45,6 @@ github.com/aws/aws-sdk-go v1.38.62/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z
 github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
 github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
 github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
-github.com/biter777/countries v1.5.6 h1:YdvI0OYZR4gmI8BO+LrAuKmoZgiv4RrMdGBj6iORfn8=
-github.com/biter777/countries v1.5.6/go.mod h1:1HSpZ526mYqKJcpT5Ti1kcGQ0L0SrXWIaptUWjFfv2E=
 github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
 github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=