A platform for community discussion. Free, open, simple.
DEV: Reload current client locale file in development mode
Gerhard Schlagere180e14a55d5
diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rbindex ae7c6f42eab..be3fa39b99d 100644--- a/lib/js_locale_helper.rb+++ b/lib/js_locale_helper.rb@@ -27,12 +27,7 @@ module JsLocaleHelperendend- def self.load_translations(locale, opts = nil)- opts ||= {}-- @loaded_translations = nil if opts[:force]- @plugin_translations = nil if opts[:force]-+ def self.load_translations(locale)@loaded_translations ||= HashWithIndifferentAccess.new@loaded_translations[locale] ||= beginlocale_str = locale.to_s@@ -115,6 +110,12 @@ module JsLocaleHelperI18n.locale = locale_sym+ if Rails.env.development?+ @loaded_translations = nil+ @plugin_translations = nil+ @loaded_merges = nil+ end+translations =if locale_sym == :enload_translations(locale_sym)