Releases: elixir-cldr/cldr_routes
Releases · elixir-cldr/cldr_routes
Cldr Routes version 1.3.2
Cldr Routes version 1.2.0
Planned Release 2.0.0
- Following the introduction of Phoenix 1.7 and PhoenixHTML version 4.0.0, helpers are no longer generated. The next version of
:ex_cldr_routes
will also omit helper generation. It is anticpated this 2.0 release will land by the end of March 2024.
Enhancements
- Configures
:phoenix_html_helpers
as a dependency rather than the full:phoenix
app.:ex_cldr_routes
only uses the tag helper which is now hosted in the new library. Whilst deprecated within Phoenix, its use here is to generatehreflang
headers.
Cldr Routes version 1.1.0
Bug Fixes
-
Fix Phoenix integration which was failing to compile when using Phoenix auth. Thanks to @rubas for the report and collaboration.
-
Fix dialyzer error. Thanks to @rubas for the report.
Deprecation
- The module
Cldr.Route
is renamed toCldr.Routes
to better match Phoenix naming. As a result, the provider module to be added to a Cldr backend configuration is nowCldr.Routes
, notCldr.Route
.Cldr.Route
remains for now and if used will issue a deprecation warning.
Cldr Routes version 1.0.0
Enhancements
-
Supports localized verified routes with
~q
(Sigil_q
). -
Supports Phoenix 1.7 and later only.
-
Supports Elixir 1.11 and later only.
Cldr Routes version 0.6.4
Cldr Routes version 0.6.3
Cldr Routes version 0.6.2
Bug Fixes
- Uses the standard Phoenix
tag
helper to generatehreflang
helpers.
Cldr Routes version 0.6.1
Bug Fixes
- Fix
LocalizedHelpers.hreflang_links/1
to return an empty string if links isnil
.
Cldr Routes version 0.6.0
Enhancements
- Adds
MyApp.Router.LocalizedHelpers.<helper>_links
functions to the generatedLocalizedHelpers
module. These_links
functions are 1:1 correspondents to the_path
and_url
helpers. The_link
helpers generate link headers that help identify the other language versions of a page. They are used like this:
iex> alias MyApp.Router.LocalizedHelpers, as: Routes
iex> Routes.user_links(conn, :show, 1) |> Routes.hreflang_links()
{
:safe,
[
["<link href=", "\"http://localhost/users_de/1\"", "; rel=alternate; hreflang=", "\"de\"", " />"],
"\n",
["<link href=", "\"http://localhost/users/1\"", "; rel=alternate; hreflang=", "\"en\"", " />"],
"\n",
["<link href=", "\"http://localhost/users_fr/1\"", "; rel=alternate; hreflang=", "\"fr\"", " />"]
]
}
Cldr Routes version 0.5.0
Bug Fixes
- Propogate locales on the
localize
macro to nested resources
Breaking change
- The locale is now stored in the
:private
field of theconn
for both live routes and other routes. It was previously stored in the:assigns
field for non-live routes.