Better ruby3 forwarding for localization and have a default locale of en
This commit is contained in:
@@ -15,9 +15,9 @@ module Cmtool
|
|||||||
end
|
end
|
||||||
|
|
||||||
# overwrite i18n l, to handle nil values
|
# overwrite i18n l, to handle nil values
|
||||||
def l(*args)
|
def l(*args, **options)
|
||||||
return '' unless args.first
|
return '' unless args.first
|
||||||
super(*args)
|
super(*args, **options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def site_title
|
def site_title
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ module Cmtool
|
|||||||
end
|
end
|
||||||
|
|
||||||
def locales
|
def locales
|
||||||
Rails.configuration.i18n.available_locales.presence || []
|
Rails.configuration.i18n.available_locales.presence || [:en]
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_locale
|
def default_locale
|
||||||
|
|||||||
Reference in New Issue
Block a user