I'm strange behavior

I use I18n with the Redis store and I feel weird after upgrading to Rails 3.2.13

[6] pry(main)> I18n.t("my_website_field") => "M" [7] pry(main)> $redis.get("en.my_website_field") => "\"My website\"" 

I get only the first letters of the translations

+4
source share
1 answer

As far as I know, I believe that redis-store has problems with certain versions of Rails (3.2.13 is one of them).

Since I was very interested in why this happened, I opened the Github change log and looked at the logic that they changed in update 3.2.12 β†’ 3.2.13.

The main change that I noticed is the dependency chain in ActiveSupport for i18n. Code was changed by FROM

 s.add_dependency('i18n', '~> 0.6') 

WITH

 s.add_dependency('i18n', '= 0.6.1') 

The only other changes were (from the change log):

Add i18n scope to `distance_of_time_in_words

So, if I had to accept a reasonable assumption, I would say that forcing the use of i18n to 0.6.1 created some conflict with redis-store.

Note. . I will continue to investigate the issue with change logs until i18n and send messages if I have additional information on this. It is not possible to find a specific problem in the commit history, and they do not save the change log (havent for 3 years: /), but I would be interested to know if the previous i18n version control could function properly.

+1
source

Source: https://habr.com/ru/post/1479747/


All Articles