Skip to content

Commit

Permalink
Remove un-needed edge case sort condition in languages helper (mastod…
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Sep 3, 2024
1 parent 219458d commit c9641c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/helpers/languages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ module LanguagesHelper

# Helper for self.sorted_locale_keys
private_class_method def self.locale_name_for_sorting(locale)
if locale.blank? || locale == 'und'
'000'
elsif (supported_locale = SUPPORTED_LOCALES[locale.to_sym])
if (supported_locale = SUPPORTED_LOCALES[locale.to_sym])
ASCIIFolding.new.fold(supported_locale[1]).downcase
elsif (regional_locale = REGIONAL_LOCALE_NAMES[locale.to_sym])
ASCIIFolding.new.fold(regional_locale).downcase
Expand Down

0 comments on commit c9641c8

Please sign in to comment.