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

Fallback translation without available locales enforcement #1377

Merged

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Sep 29, 2018

I rebased #1039, removed unrelated stuff, fixed some issues that I found and completed some missing tests.

This PR fixes #1030.

Tensho and others added 3 commits September 29, 2018 08:10
@deivid-rodriguez deivid-rodriguez force-pushed the fallback-without-enforcement branch 2 times, most recently from 1b00eb9 to 072a169 Compare September 29, 2018 12:09
@vbrazo vbrazo changed the title Fallback translation without available locales enforcement (rebased and completed) Fallback translation without available locales enforcement Sep 29, 2018
I18n.available_locales += [:en]
end

def test_with_locale_does_not_fail_if_locale_not_available_in_the_application_and_enforce_available_locales_is_set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the longest name methods that I've ever seen in my life.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the last part can be removed since what this patch is doing is making this independent of the specific enforce_available_locales setting value! 😄 Let me update it!

@vbrazo vbrazo merged commit 0f53f41 into faker-ruby:master Sep 29, 2018
@deivid-rodriguez deivid-rodriguez deleted the fallback-without-enforcement branch September 29, 2018 14:27
@artinboghosian
Copy link

@vbrazo when is this going to be released?

@stympy
Copy link
Contributor

stympy commented Oct 2, 2018

Sorry for the delay. It's near the top of my todo list to make a release. :)

@coorasse
Copy link

coorasse commented Jan 4, 2019

As I commented here I still have the same issue after this patch.

davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
…y#1377)

* Fallback translation without available locales enforcing

* Available locales can't be edited in place

The previous spec would fail to cover the new code, and would pass
without the changes.

* Add ensures for max safety

* Add tests for `with_locale` method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Honor default locale instead of hardcoded :en
6 participants