X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/22292debda11f9940ed98faa5f9c01697d6bfcaa..f4dba81b6460be14cacbe067956cb74b9743a18d:/app/helpers/browse_helper.rb?ds=inline diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index 67420151c..aed0c518f 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -4,12 +4,14 @@ module BrowseHelper end def printable_name(object, version=false) - name = object.id.to_s + name = t 'printable_name.with_id', :id => object.id.to_s if version - name = "#{name}, v#{object.version.to_s}" + name = t 'printable_name.with_version', :id => name, :version => object.version.to_s end - if object.tags.include? 'name' - name = "#{object.tags['name'].to_s} (#{name})" + if object.tags.include? "name:#{I18n.locale}" + name = t 'printable_name.with_name', :name => object.tags["name:#{I18n.locale}"].to_s, :id => name + elsif object.tags.include? 'name' + name = t 'printable_name.with_name', :name => object.tags['name'].to_s, :id => name end return name end