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

Merge the existing translations before testing. #772

Merged
merged 1 commit into from
Mar 17, 2017

Conversation

nickcharlton
Copy link
Member

with_translations is used to test that a view does actually implement
a given translation. Previously, we were resetting the known
translations to only use the one under test. We now have many more
translations so this approach will fail when visiting a page because of
"missing translations".

Example: https://git.io/vywpc

This came up when merging #344.

`with_translations` is used to test that a view does actually implement
a given translation. Previously, we were resetting the known
translations to only use the one under test. We now have many more
translations so this approach will fail when visiting a page because of
"missing translations".

Example: https://git.io/vywpc

This came up when merging #344.
@nickcharlton nickcharlton merged commit 512acae into master Mar 17, 2017
@nickcharlton nickcharlton deleted the nc-merge-before-testing-for-translations branch March 17, 2017 11:38
nburkley added a commit to nburkley/administrate that referenced this pull request Mar 24, 2017
The `with_translations` helper allows translations to be setup for a
method under test. A recent change (thoughtbot#772) added a backend chain to
ensure this helper won't break other spec by replacing all translations
and causing "missing_translations" failures.

This changes the order of the I18n backends so that specs will first use
the translations provided to the `with_translations` block and then
fallback to the default translations. Otherwise, there would be no way
to override the default translations in test cases.
nickcharlton pushed a commit that referenced this pull request May 3, 2017
* Reorder I18n backends in `with_translations` helper

The `with_translations` helper allows translations to be setup for a
method under test. A recent change (#772) added a backend chain to
ensure this helper won't break other spec by replacing all translations
and causing "missing_translations" failures.

This changes the order of the I18n backends so that specs will first use
the translations provided to the `with_translations` block and then
fallback to the default translations. Otherwise, there would be no way
to override the default translations in test cases.

* Adds format option to DateTime field

Updates DateTime field to accept 'format' option which determines
the display format of the field. The option can be
* A key for the localized date format in the corresponding yaml config
file
* A strftime format string
jonatack pushed a commit to jonatack/administrate that referenced this pull request May 6, 2017
* Reorder I18n backends in `with_translations` helper

The `with_translations` helper allows translations to be setup for a
method under test. A recent change (thoughtbot#772) added a backend chain to
ensure this helper won't break other spec by replacing all translations
and causing "missing_translations" failures.

This changes the order of the I18n backends so that specs will first use
the translations provided to the `with_translations` block and then
fallback to the default translations. Otherwise, there would be no way
to override the default translations in test cases.

* Adds format option to DateTime field

Updates DateTime field to accept 'format' option which determines
the display format of the field. The option can be
* A key for the localized date format in the corresponding yaml config
file
* A strftime format string
iarie pushed a commit to iarie/administrate that referenced this pull request Jun 17, 2017
* Reorder I18n backends in `with_translations` helper

The `with_translations` helper allows translations to be setup for a
method under test. A recent change (thoughtbot#772) added a backend chain to
ensure this helper won't break other spec by replacing all translations
and causing "missing_translations" failures.

This changes the order of the I18n backends so that specs will first use
the translations provided to the `with_translations` block and then
fallback to the default translations. Otherwise, there would be no way
to override the default translations in test cases.

* Adds format option to DateTime field

Updates DateTime field to accept 'format' option which determines
the display format of the field. The option can be
* A key for the localized date format in the corresponding yaml config
file
* A strftime format string
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.

1 participant