diff --git a/HISTORY.md b/HISTORY.md index 1a00bdf1..76c66fe6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -29,10 +29,10 @@ The codebase for Dependency Injection, Internationalization and localization and ## Fixes and Improvements - Support of embedded [locale files](https://github.com/kataras/iris/blob/master/_examples/i18n/template-embedded/main.go) using standard `embed.FS` with the new `LoadFS` function. -- Support of direct embedded view templates with `embed.FS` or `fs.FS` (in addition to `string` and `http.FileSystem` types). +- Support of direct embedded view engines (`HTML, Blocks, Django, Handlebars, Pug, Amber, Jet` and `Ace`) with `embed.FS` or `fs.FS` (in addition to `string` and `http.FileSystem` types). +- Add support for `embed.FS` and `fs.FS` on `app.HandleDir`. - Add `iris.Patches()` package-level function to customize Iris Request Context REST (and more to come) behavior. -- Add support for `embed.FS` and `fs.FS` on `app.HandleDir`. - Minor fixes. - Enable setting a custom "go-redis" client through `SetClient` go redis driver method or `Client` struct field on sessions/database/redis driver as requested at [chat](https://chat.iris-go.com). diff --git a/_examples/i18n/template-embedded/locales/el-GR/other.ini b/_examples/i18n/template-embedded/embedded/locales/el-GR/other.ini similarity index 100% rename from _examples/i18n/template-embedded/locales/el-GR/other.ini rename to _examples/i18n/template-embedded/embedded/locales/el-GR/other.ini diff --git a/_examples/i18n/template-embedded/locales/el-GR/user.ini b/_examples/i18n/template-embedded/embedded/locales/el-GR/user.ini similarity index 100% rename from _examples/i18n/template-embedded/locales/el-GR/user.ini rename to _examples/i18n/template-embedded/embedded/locales/el-GR/user.ini diff --git a/_examples/i18n/template-embedded/locales/en-US/other.ini b/_examples/i18n/template-embedded/embedded/locales/en-US/other.ini similarity index 100% rename from _examples/i18n/template-embedded/locales/en-US/other.ini rename to _examples/i18n/template-embedded/embedded/locales/en-US/other.ini diff --git a/_examples/i18n/template-embedded/locales/en-US/user.ini b/_examples/i18n/template-embedded/embedded/locales/en-US/user.ini similarity index 100% rename from _examples/i18n/template-embedded/locales/en-US/user.ini rename to _examples/i18n/template-embedded/embedded/locales/en-US/user.ini diff --git a/_examples/i18n/template-embedded/main.go b/_examples/i18n/template-embedded/main.go index fd45e57c..bf8f8359 100644 --- a/_examples/i18n/template-embedded/main.go +++ b/_examples/i18n/template-embedded/main.go @@ -8,8 +8,8 @@ import ( "github.com/kataras/iris/v12" ) -//go:embed locales/* -var filesystem embed.FS +//go:embed embedded/locales/* +var embeddedFS embed.FS func main() { app := newApp() @@ -31,7 +31,7 @@ func newApp() *iris.Application { // Instead of: // err := app.I18n.Load("./locales/*/*.ini", "en-US", "el-GR") // Apply the below in order to build with embedded locales inside your executable binary. - err := app.I18n.LoadFS(filesystem, ".", "en-US", "el-GR") + err := app.I18n.LoadFS(embeddedFS, "./embedded/locales/*/*.ini", "en-US", "el-GR") if err != nil { panic(err) } diff --git a/_examples/view/context-view-engine/views/admin/layouts/main.html b/_examples/view/context-view-engine/views/admin/layouts/main.html index d83d5062..b4b52356 100644 --- a/_examples/view/context-view-engine/views/admin/layouts/main.html +++ b/_examples/view/context-view-engine/views/admin/layouts/main.html @@ -9,6 +9,6 @@ {{ template "content" .}} -