Skip to content

Commit

Permalink
No need to handle array language aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Nov 1, 2015
1 parent 96333a0 commit d17cb86
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/twitter_cldr/shared/locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,13 @@ def replace_deprecated_subtags(locale)
def replace_deprecated_language_subtags(locale)
language = locale.language ? locale.language.to_sym : nil
if found_alias = aliases_resource[:language][language]
replacement = if found_alias.is_a?(Array)
found_alias.first
else
found_alias
end

locale.language = found_alias
end
end

def replace_deprecated_territory_subtags(locale)
region = locale.region ? locale.region.to_sym : nil
if found_alias = aliases_resource[:territory][region]
replacement = if found_alias.is_a?(Array)
found_alias.first
else
found_alias
end

locale.region = found_alias
end
end
Expand Down

0 comments on commit d17cb86

Please sign in to comment.