mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
1bc1a439ee
Sometimes, parts of the application pass in the locale as a string, not a symbol. This was causing the translate_accelerator to cache two versions of the locale separately: one cache for the symbol version, and one cache for the string version. For example, in a running production process: ``` irb(main):001:0> I18n.instance_variable_get(:@loaded_locales) => [:en, "en"] ``` This commit ensures the `locale` key is always converted to a symbol, and adds a spec to ensure the same locale cannot appear twice in `@loaded_locales` |
||
---|---|---|
.. | ||
safe_buffer_spec.rb | ||
schema_migration_details_spec.rb | ||
translate_accelerator_spec.rb |