rubyforgood / coral

An upcoming project for Ruby for Good
MIT License
13 stars 11 forks source link

Fix i8n in a way that does not conflict with service workers #74

Open LizPrescott opened 4 years ago

LizPrescott commented 4 years ago

We needed to temporarily disable internationalization to make fix the offline features. Basically, the locale part of the url was interfering with the service worker router. I believe this can be fixed by forming it as part of the path rather than a query parameter (\locale instead of ?locale).

nihonjinrxs commented 4 years ago

Path-based locale is already implemented here, but I think Rails default is the locale as query param. Seems to me that we should be able to handle query params with the service worker. Can we do a quick pairing session when you have a chance so I can better understand the problem?

nihonjinrxs commented 4 years ago

I think I've managed a fix for this that uses only path-based locale. PR incoming.

LizPrescott commented 4 years ago

Talking with @bhaibel and Chris at their meetup, we want to explore using cookies to indicate locale. Looking at it now.