3 ms·
Can you elaborate? What were you doing to the locale? Changing it?
by why-el 7y ago
Can you elaborate? What were you doing to the locale? Changing it?
- nurettin 7y agoPerhaps gp means that the i18n data was initialized as thread-local, so it was missing in other threads.
- andruby 7y agoRails uses I18n.locale as a "global variable" to store the locale of the request. Behind the scenes this is stored in Thread.current[]. So if you have a request that sets the locale to non-default one and you perform some work inside a lazy block, I18n.locale will return an incorrect value inside that block.