administrate icon indicating copy to clipboard operation
administrate copied to clipboard

Please don't titleize results of I18n calls

Open mvz opened this issue 4 years ago • 1 comments

  • 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

mvz avatar Jun 30 '21 09:06 mvz

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.

pablobm avatar Jul 19 '21 15:07 pablobm

Fixed by #2280

pablobm avatar Apr 06 '23 21:04 pablobm