|
19 | 19 |
|
20 | 20 | Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready. |
21 | 21 |
|
22 | | -**How to upgrade**: Open your command-line and execute this command: `go get github.com/kataras/iris@master`. |
| 22 | +**How to upgrade**: Open your command-line and execute this command: `go get github.com/kataras/iris/v12@latest`. |
| 23 | + |
| 24 | +# Fr, 13 December 2019 | v12.1.0 |
| 25 | + |
| 26 | +## Breaking Changes |
| 27 | + |
| 28 | +Minor as many of you don't even use them but, indeed, they need to be covered here. |
| 29 | + |
| 30 | +- Old i18n middleware(iris/middleware/i18n) was replaced by the [i18n](i18n) sub-package which lives as field at your application: `app.I18n.Load(globPathPattern string, languages ...string)` (see below) |
| 31 | +- Community-driven i18n middleware(iris-contrib/middleware/go-i18n) has a `NewLoader` function which returns a loader which can be passed at `app.I18n.Reset(loader i18n.Loader, languages ...string)` to change the locales parser |
| 32 | +- The Configuration's `TranslateFunctionContextKey` was replaced by `LocaleContextKey` which Context store's value (if i18n is used) returns the current Locale which contains the translate function, the language code, the language tag and the index position of it |
| 33 | +- The `context.Translate` method was replaced by `context.Tr` as a shortcut for the new `context.GetLocale().GetMessage(format, args...)` method and it matches the view's function `{{tr format args}}` too |
| 34 | +- If you used [Iris Django](https://github.com/kataras/iris/tree/master/_examples/view/template_django_0) view engine with `import _ github.com/flosch/pongo2-addons` you **must change** the import path to `_ github.com/iris-contrib/pongo2-addons` or add a [go mod replace](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) to your `go.mod` file, e.g. `replace github.com/flosch/pongo2-addons => github.com/iris-contrib/pongo2-addons v0.0.1`. |
| 35 | + |
| 36 | +## Fixes |
| 37 | + |
| 38 | +All known issues. |
| 39 | + |
| 40 | +1. [#1395](https://github.com/kataras/iris/issues/1395) |
| 41 | +2. [#1369](https://github.com/kataras/iris/issues/1369) |
| 42 | +3. [#1399](https://github.com/kataras/iris/issues/1399) with PR [#1400](https://github.com/kataras/iris/pull/1400) |
| 43 | +4. [#1401](https://github.com/kataras/iris/issues/1401) |
| 44 | +5. [#1406](https://github.com/kataras/iris/issues/1406) |
| 45 | +6. [neffos/#20](https://github.com/kataras/neffos/issues/20) |
| 46 | +7. [pio/#5](https://github.com/kataras/pio/issues/5) |
| 47 | + |
| 48 | +## New Features |
| 49 | + |
| 50 | +### Internationalization and localization |
| 51 | + |
| 52 | +Support for i18n is now a **builtin feature** and is being respected across your entire application, per say [sitemap](https://github.com/kataras/iris/wiki/Sitemap) and [views](https://github.com/kataras/iris/blob/master/_examples/i18n/main.go#L50). |
| 53 | + |
| 54 | +Refer to the wiki section: https://github.com/kataras/iris/wiki/Sitemap for details. |
| 55 | + |
| 56 | +### Sitemaps |
| 57 | + |
| 58 | +Iris generates and serves one or more [sitemap.xml](https://www.sitemaps.org/protocol.html) for your static routes. |
| 59 | + |
| 60 | +Navigate through: https://github.com/kataras/iris/wiki/Sitemap for more. |
| 61 | + |
| 62 | +## New Examples |
| 63 | + |
| 64 | +2. [_examples/i18n](_examples/i18n) |
| 65 | +1. [_examples/sitemap](_examples/sitemap) |
| 66 | +3. [_examples/desktop-app/blink](_examples/desktop-app/blink) |
| 67 | +4. [_examples/desktop-app/lorca](_examples/desktop-app/lorca) |
| 68 | +5. [_examples/desktop-app/webview](_examples/desktop-app/webview) |
23 | 69 |
|
24 | 70 | # Sa, 26 October 2019 | v12.0.0 |
25 | 71 |
|
|
0 commit comments