elixir-cldr / cldr_routes

Localised routes and path helpers for Phoenix applications
Other
14 stars 6 forks source link

Routes stored in LocalizedRoutes are incorrect #8

Closed kipcole9 closed 2 years ago

kipcole9 commented 2 years ago

When crafting the routes for use with mix phx.routes MyApp.Router.LocalizedRoutes the paths are incorrect because there is no inverse lookup from the localised path segment to the non-localised one.

A method to store the original path before localised is required (and then needs to be cleaned up).

kipcole9 commented 2 years ago

As of commit ef4e492 the routes are correctly emitted as the localised route names and this therefore correctly works with mix phx.routes.

However the formatting isn't very "localisation friendly" so work required on a way to format better but still leverage Phoenix's formatting.