Skip to content

Commit

Permalink
Use the location name for the current locale
Browse files Browse the repository at this point in the history
Part of #233, if we have a name specific to the current locale then use
that, otherwise default to English
  • Loading branch information
ijdickinson committed Aug 4, 2020
1 parent 7330875 commit aa1560f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def rdf_type?(rdf_types)
rdf_types.blank? || rdf_types.include?(type)
end

def label(lang = :en)
@labels[lang]
def label(lang = I18n.locale)
@labels[lang] || @labels[:en]
end

def <=>(other_location, lang = :en)
Expand Down

0 comments on commit aa1560f

Please sign in to comment.