elixir-cldr / cldr_routes

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

cldr routes for liveview #1

Closed ringofhealth closed 2 years ago

ringofhealth commented 2 years ago

how does one add support for localization of liveview routes?

** (ArgumentError) Invalid route for localization: live "/home", "UserLive.Timeline, :index, [as: :authenticated_home]"
Allowed localizable routes are [:resources, :get, :put, :patch, :post, :delete, :options, :head, :connect]
kipcole9 commented 2 years ago

Thanks for the report. I didn't originally include live routes because I didn't think localising them was a requirement. My bad. I'm working on an update now and will let you know in the next few hours if I have something for you to test.

kipcole9 commented 2 years ago

As of commit 008250 I have added support for live routes. But I haven't found a good way to test yet other than have a test router configuration.

I'd be pleased if you would try this out. Just update your deps to:

def deps do
  ...
  {:ex_cldr_routes, github: "elixir-cldr/cldr_routes"},
  ...
end

I am also working to have the Gettext .po files auto-updated rather than manual for this release.

rubas commented 2 years ago

We just migrated over from our own solution and haven't found any problems yet with the live routes. We haven't checked live routes with actions and yet, though.

kipcole9 commented 2 years ago

Will the most recent commits I believe its time for an new release that includes the support for live routes, as well as improved errors, re-implemented the localised helpers module and made the translations process work correctly with mix gettext.extract and mix gettext.merge.

Let me know if you have any feedback or suggestions - or bug reports of course.

kipcole9 commented 2 years ago

Closing now since I believe this issue is now resolved. Please reopen if required.