bullet-train-pro / bullet_train-action_models

Other
5 stars 1 forks source link

Localize `performs-export` strings #8

Closed gazayas closed 1 year ago

gazayas commented 2 years ago

Addresses the TODO in app/views/account/scaffolding/completely_concrete/tangible_things/performs_export_actions/_new_button_many.html.erb

Details

The same TODO exists for the targets_many_actions/new_button_many.html.erb template, but I started with this one because I wanted to hear your opinion on how we should localize strings that need a variable.

As you can see in this PR, I've simply added ({num}) on the end of the second translation instead of using string interpolation. I don't think we'll be able to interpolate it with vanilla Rails, but it's most likely possible with rails-i18n.

I know we've used this in the past, so if this is a viable option I'd be glad to implement it. If not, I can adjust the other templates like I have in this PR.

jagthedrummer commented 1 year ago

@gazayas This looks good to me. Any concerns before we merge it?

gazayas commented 1 year ago

@jagthedrummer Sorry for the delay on this one, been in over my head as of late!

Just wanted to make sure this one was working properly, and I confirmed that this one's good to go 👍

The Visitor model you see in the video is coming from here.

https://github.com/bullet-train-pro/bullet_train-action_models/assets/10546292/3916c4bc-74e3-484b-ae6d-744670a93b45