-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
[ERROR] request#upload_response (TypeError) "no implicit conversion of nil into String" #5895
Labels
Comments
garethrees
added
bug
Breaks expected functionality
x:rwanda
f:request-management
labels
Sep 24, 2020
Hitting the URL without the |
Same problem as #5382. We're calling |
mysociety-pusher
pushed a commit
that referenced
this issue
Sep 24, 2020
When a site has an underscore locale (e.g. "fr_BE") set as the default, it is not included in the I18n fallbacks for non-default locales. I18n.fallbacks # => { :fr_BE => [:fr_BE, :"fr-BE", :fr], # :nl_BE => [:nl_BE, :"fr-BE", :fr] } AlaveteliLocalization.with_locale(:fr_BE) { Globalize.fallbacks } # => [:fr_BE, :"fr-BE", :fr] AlaveteliLocalization.with_locale(:nl_BE) { Globalize.fallbacks } # => [:nl_BE, :"fr-BE", :fr] In the example above, this means that a missing model translation when using the "nl_BE" locale will **not** correctly fall back to the translation for the default locale ("fr_BE"). This commit ensures that the default locale is always available in the fallbacks for non-default locales. We try to add it before the non-underscore version so that the regional translation is preferred, with the non-regional fallback available as a last-ditch attempt to find a useful translation. Globalize model attributes fallbacks specs contributed by @gbp. Fixes #5382 Fixes #5895
mysociety-pusher
pushed a commit
that referenced
this issue
Sep 24, 2020
When a site has an underscore locale (e.g. "fr_BE") set as the default, it is not included in the I18n fallbacks for non-default locales. I18n.fallbacks # => { :fr_BE => [:fr_BE, :"fr-BE", :fr], # :nl_BE => [:nl_BE, :"fr-BE", :fr] } AlaveteliLocalization.with_locale(:fr_BE) { Globalize.fallbacks } # => [:fr_BE, :"fr-BE", :fr] AlaveteliLocalization.with_locale(:nl_BE) { Globalize.fallbacks } # => [:nl_BE, :"fr-BE", :fr] In the example above, this means that a missing model translation when using the "nl_BE" locale will **not** correctly fall back to the translation for the default locale ("fr_BE"). This commit ensures that the default locale is always available in the fallbacks for non-default locales. We try to add it before the non-underscore version so that the regional translation is preferred, with the non-regional fallback available as a last-ditch attempt to find a useful translation. Globalize model attributes fallbacks specs contributed by @gbp. Fixes #5382 Fixes #5895
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: