herbgobbler
herbgobbler copied to clipboard
herbgobbler gets confused in devise/registrations/edit.html.erb
Herbgobbler gets confused on the following line:
Unhappy?
This is what it generates
(button_to (t '.cancel_my_1'), registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete) %>
en.yml: cancel_my_1: "Cancel my account" unhappy: "Unhappy? %{button_to}"
In my opinion, this would be simpler like this:
t('.unhappy')
That's hard. It very situational. Distinguishing between your snippet and
Unhappy? <%= button_to "Yes" %> or <%= button_to "No" %>?
is hard to do in a generic way.
Well, you'd have basically 3 translations. t('.unhappy') <%= button_to t('.yes') %> or <%= button_to t('.no') %>? In this case, gobbler does a lot more than it should... And also, this is what rails displays:
Unhappy?