-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interaction between add-missing
and i18n gem reserved keys check?
#552
Comments
Oh, we should probably escape these "interpolations". They're meant to be there verbatim. We'll also need to adjust the regex here to not match escaped interpolations:
Interpolations can be escaped with The regexp that we want for that is probably something like this: |
As part of a larger CI process, we are running the command:
bundle exec i18n-tasks add-missing -l en
In a PR which bumped the version of
i18n
gem from 1.14.1 to 1.14.4, we see this failure: https://github.com/mastodon/mastodon/actions/runs/8187366599/job/22387716072?pr=29495Relevant error portion:
I think that the reserved keys check (added in i18n 1.14.3) is raising an error because of one of these reserved keywords being used in an interpolation - https://github.com/ruby-i18n/i18n/blob/master/lib/i18n.rb#L19-L34
The error seems to point back to this section of the i18n-tasks default config - https://github.com/glebm/i18n-tasks/blob/main/config/locales/en.yml#L32-L34 - and the
%{default}
key in particular being used there.The text was updated successfully, but these errors were encountered: