rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
443 stars 46 forks source link

Views contain semi localized elements #136

Closed manuelvanrijn closed 1 day ago

manuelvanrijn commented 2 days ago

We are running our rails app with the locale nl and I noticed that the date/time helpers are using the I18n translations, but the main part of mission control is "hard-coded" English.

This results in texts like 22 minuten ago where the 22 minuten is 🇳🇱Dutch and ago is 🇺🇸English.

SCR-20240703-lyvd

Solutions

1. Quick: Set it to English

I think the easiest way would be to set the I18n.locale to :en on a before_action (or around_action) on the ApplicationController. That way, only the Mission Control controllers will use the en locale.

2. Big: Translate all the strings!

Introduce a fully translated Rails engine :)


I'd love to create a PR for the quick one unless people think it would really benefit to introduce the localized Rails engine variant.

rosa commented 2 days ago

Ooh, great catch, and great report too! Dankjewel 🙏

I'd love to create a PR for the quick one unless people think it would really benefit to introduce the localized Rails engine variant.

Please do! ❤️ That'd be super helpful. I don't think it's worth translating all the strings at this point.