Skip to content
Snippets Groups Projects
Commit 48dcf191 authored by Markus Reiter's avatar Markus Reiter
Browse files

Ignore unparsable system languages.

parent c9aa25e6
No related branches found
No related tags found
No related merge requests found
......@@ -138,7 +138,17 @@ module Hbc
raise CaskInvalidError.new(cask, "No default language specified.")
end
MacOS.languages.map(&Locale.method(:parse)).each do |locale|
locales = MacOS.languages
.map do |language|
begin
Locale.parse(language)
rescue Locale::ParserError
nil
end
end
.compact
locales.each do |locale|
key = locale.detect(@language_blocks.keys)
next if key.nil?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment