Skip to content
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

Raise when translated entry contains interpolations for reserved keywords and no substitutions provided #678

Merged
merged 1 commit into from Nov 14, 2023

Conversation

fatkodima
Copy link
Contributor

@radar
Copy link
Collaborator

radar commented Nov 14, 2023

Thank you very much :)

@radar radar merged commit baf8a88 into ruby-i18n:master Nov 14, 2023
28 checks passed
@fatkodima fatkodima deleted the fix-interpolate-reserved-keywords branch November 14, 2023 23:04
@mjankowski
Copy link

Opened this issue on i18n-tasks - glebm/i18n-tasks#552 - linking here only because it's related to this feature and maybe others will stumble across same error and find that helpful. I don't think anything to do about it on the i18n side.

@mjankowski
Copy link

Actually -- curious on this ... should this check raise on an escaped interpolation variable?

My understanding here is that we want to discourage usage of the reserved keyword values, so raising makes sense because it will bring that issue to attention sooner. So a string like "This uses the %{default} reserved word" should raise immediately. But what about a string like "This uses the escaped %%{default} word" ... should that also raise, or is that safe to output as a literal string and the reserved word check should not raise for escaped values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inquiry About Reserved Keywords When Passing Variables to Translations
3 participants