You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is some inconsistency regarding locales and default locale on space and environment. The locales are defined in a specific environment, but the default locale is defined in the space. This leads to weird situations.
For example, the space object has a #default_locale method, but it has no #locales and the environment has a #locales but not a #default_locale, and when I query the defaul_locale
for an space I get a code that is not part of the allowed locales for the master environments.
So default_locale is en-US for an space that doesn't has en-US as available locale in any of the environments.
This should not be a big problem, except that when I retrieve a content_type from that environment, the default_locale for that content_type is also wrong.
And that problem causes a lot of other bugs, for example: #201, #202, #203
I've read #73 and I know I can use product.client.configuration[:default_locale] = 'en-CA', but that changes the default_locale for the whole contentful management client, and I need to keep it independently for each space.
As a workaround I'm avoiding this problem with this: product.define_singleton_method(:default_locale) { 'en-CA' } but doesn't feel like a real solution, it's more a temporal patch.
The text was updated successfully, but these errors were encountered:
There is some inconsistency regarding locales and default locale on space and environment. The locales are defined in a specific environment, but the default locale is defined in the space. This leads to weird situations.
For example, the space object has a
#default_locale
method, but it has no#locales
and the environment has a#locales
but not a#default_locale
, and when I query thedefaul_locale
for an space I get a code that is not part of the allowed locales for the master environments.
So default_locale is
en-US
for an space that doesn't hasen-US
as available locale in any of the environments.This should not be a big problem, except that when I retrieve a content_type from that environment, the default_locale for that content_type is also wrong.
And that problem causes a lot of other bugs, for example: #201, #202, #203
I've read #73 and I know I can use
product.client.configuration[:default_locale] = 'en-CA'
, but that changes the default_locale for the whole contentful management client, and I need to keep it independently for each space.As a workaround I'm avoiding this problem with this:
product.define_singleton_method(:default_locale) { 'en-CA' }
but doesn't feel like a real solution, it's more a temporal patch.The text was updated successfully, but these errors were encountered: