i18n
i18n copied to clipboard
Fix that escaped interpolations with reserved keywords raised ReservedInterpolationKey
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.