herbgobbler icon indicating copy to clipboard operation
herbgobbler copied to clipboard

herbgobbler gets confused in devise/registrations/edit.html.erb

Open ceigel opened this issue 10 years ago • 2 comments

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')

ceigel avatar Nov 15 '14 15:11 ceigel

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.

douglasjsellers avatar Nov 19 '14 05:11 douglasjsellers

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?

ceigel avatar Nov 19 '14 10:11 ceigel