mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:13:38 +08: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` |
||
---|---|---|
.. | ||
active_record_attribute_methods.rb | ||
active_record_base.rb | ||
ams_include_without_root.rb | ||
better_handlebars_errors.rb | ||
ember_handlebars.rb | ||
fast_pluck.rb | ||
inflector_backport.rb | ||
open_uri_redirections.rb | ||
performance_fixes.rb | ||
pluck_first.rb | ||
rails_multisite.rb | ||
rails4.rb | ||
raw_handlebars.rb | ||
safe_buffer.rb | ||
safe_migrations.rb | ||
schema_cache_concurrency.rb | ||
schema_migration_details.rb | ||
sprockets_patches.rb | ||
translate_accelerator.rb |