ruby-i18n / i18n

Internationalization (i18n) library for Ruby
MIT License
986 stars 411 forks source link

Fix that escaped interpolations with reserved keywords raised ReservedInterpolationKey #688

Closed Bilka2 closed 5 months ago

Bilka2 commented 7 months ago

I found this issue when looking into fixing https://github.com/glebm/i18n-tasks/issues/552. The reserved keywords in the interpolations were noticed due to #678. The proposed solution is to escape the interpolation with %% based on https://github.com/ruby-i18n/i18n/blob/master/lib/i18n/interpolate/ruby.rb.

However, the check for reserved keywords didn't care that the interpolation was escaped. I adjusted the regex for the reserved keywords with the same negative lookbehind assertion as proposed in the i18n-tasks issue.

Bilka2 commented 6 months ago

Hey, is there anything still to missing from my side to get this merged?

radar commented 5 months ago

Nothing from your side -- I've just been sick (flu hit me hard) and/or busy in the last little while! Back on deck now though.

Bilka2 commented 5 months ago

Thank you for merging this and the release!