Skip to content

Commit

Permalink
test(i18n): update localize file path
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Jul 28, 2023
1 parent 8662692 commit 1dffef0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

const (
defaultFormatBundleFile = "yaml"
defaultRootPath = "./_example/localize"
defaultRootPath = "./testdata/localize"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions embed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ func (s *server) request(lng language.Tag, name string) string {
}

var (
//go:embed _example/localizeJSON/*
//go:embed testdata/localizeJSON/*
fs embed.FS

s = newEmbedServer(Localize(WithBundle(&BundleCfg{
DefaultLanguage: language.English,
FormatBundleFile: "json",
AcceptLanguage: []language.Tag{language.English, language.German, language.Chinese},
RootPath: "./_example/localizeJSON/",
RootPath: "./testdata/localizeJSON/",
UnmarshalFunc: json.Unmarshal,
// After commenting this line, use defaultLoader
// it will be loaded from the file
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1dffef0

Please sign in to comment.