Fix invalid language resulting in no fallback being set on statuses (#17722)
This commit is contained in:
@ -241,6 +241,15 @@ module LanguagesHelper
|
||||
code
|
||||
end
|
||||
|
||||
def valid_locale_cascade(*arr)
|
||||
arr.each do |str|
|
||||
locale = valid_locale_or_nil(str)
|
||||
return locale if locale.present?
|
||||
end
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
def valid_locale?(locale)
|
||||
locale.present? && SUPPORTED_LOCALES.key?(locale.to_sym)
|
||||
end
|
||||
|
Reference in New Issue
Block a user