administrate
administrate copied to clipboard
Please don't titleize results of I18n calls
- What were you trying to do?
Trying to get the email address column to be labeled "E-mailadres" (in Dutch)
- What did you end up with (logs, or, even better, example apps are great!)?
The title becomes "E Mailadres" because titleize destroys dashes and applies English capitalization rules.
- What versions are you running?
- Rails: 6.1.4
- administrate: 0.16.0
Thank you for the feedback. The whole i18n setup needs some rethinking and I'm not sure about making small changes now as we may want to go in a different direction when we look at it as a whole.
For the moment, a workaround would be to provide your own app/views/administrate/application/_collection.html.erb template, avoiding the use of titleize. A bad side-effect would be that you'd have to keep track of changes to this template whenever you update Administrate.
A way to reduce this issue would be to split that template into smaller partials that can be overridden at a lower cost. This would require a PR, which I'd be happy to review if you had the time to provide.
Fixed by #2280