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