ruby-gettext / gettext

Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
https://ruby-gettext.github.io/
68 stars 28 forks source link

Ignored Gettext syntax when <%- is used in ERB files #75

Closed MichaelHoste closed 4 years ago

MichaelHoste commented 4 years ago

It seems that there is a parsing issue when <%- is used in an ERB file.

In this example, "Hello" is not added to the PO(T) file:

<%- content_for :title, "Title" %>

<%= _("Hello") %>

I don't exactly know why, but using:

<%= content_for :title, "Title" %>

<%= _("Hello") %>

or something like:

<%- "Title" %>

<%= _("Hello") %>

solves this issue.

Do you have any idea why this happens?

MichaelHoste commented 4 years ago

@kou it seems that fixing #77 you also solved this issue! Using the master branch, I was able to make it work on my failing examples.

Thank you, again!

kou commented 4 years ago

Good news!

(Sorry. I'm busy recently. I didn't check this yet.)