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

Simplify the "Translation missing" message when default is an empty Array #662

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

amatsuda
Copy link
Contributor

@amatsuda amatsuda commented Jun 2, 2023

#654 changed the "Tranlation missing" message to show all the potential keys when an Array was given for :default, but this enhancement is not necessary if the :default Array was an empty Array.

Giving an empty Array for :default is actually done inside Action View translation helper: https://github.com/rails/rails/blob/254f1d8ded07dfd73462b40d6aaa8c19032259f6/actionview/lib/action_view/helpers/translation_helper.rb#L125
and so this causes this build error there in Rails repo. https://buildkite.com/rails/rails/builds/96893#01887b39-855d-4c78-a6ac-0c90889025fd

@amatsuda amatsuda mentioned this pull request Jun 2, 2023
4 tasks
@kbrock
Copy link
Contributor

kbrock commented Jun 2, 2023

This seemingly innocuous change is causing us issues as well.
Our build went red the minute 1.14 was released.

Please reach out if you have any questions

Thanks for the great Gem

kbrock added a commit to kbrock/manageiq that referenced this pull request Jun 2, 2023
There is an issue with 1.14 that breaks tests, and possibly functionality, too.
Within 3 hours a number of people have referenced this issue so we are not alone

This is fixed by
ruby-i18n/i18n#662
@radar
Copy link
Collaborator

radar commented Jun 2, 2023

@kbrock please test this PR against your code and let me know if that solved your issue. I’ll merge to master now.

@radar radar merged commit bbe078b into ruby-i18n:master Jun 2, 2023
@amatsuda amatsuda deleted the default_empty_array branch June 3, 2023 00:50
@radar
Copy link
Collaborator

radar commented Jun 4, 2023

I have released i18n 1.14.1 with this change included.

GilbertCherrie pushed a commit to GilbertCherrie/manageiq that referenced this pull request Jul 7, 2023
There is an issue with 1.14 that breaks tests, and possibly functionality, too.
Within 3 hours a number of people have referenced this issue so we are not alone

This is fixed by
ruby-i18n/i18n#662
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.

3 participants