mirror of
https://github.com/discourse/discourse.git
synced 2026-07-29 15:54:48 -05:00
Always use locale fallback on server
This commit is contained in:
@@ -22,16 +22,5 @@ class FallbackLocaleList < Hash
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class NoFallbackLocaleList < FallbackLocaleList
|
I18n.fallbacks = FallbackLocaleList.new
|
||||||
def [](locale)
|
I18n.config.missing_interpolation_argument_handler = proc { throw(:exception) }
|
||||||
[locale]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if Rails.env.development?
|
|
||||||
I18n.fallbacks = NoFallbackLocaleList.new
|
|
||||||
else
|
|
||||||
I18n.fallbacks = FallbackLocaleList.new
|
|
||||||
I18n.config.missing_interpolation_argument_handler = proc { throw(:exception) }
|
|
||||||
end
|
|
||||||
|
|||||||
Reference in New Issue
Block a user