- name = t 'printable_name.with_name_html', :name => content_tag(:bdi, object.tags["name:#{locale}"].to_s), :id => content_tag(:bdi, name)
- elsif object.tags.include? 'name'
- name = t 'printable_name.with_name_html', :name => content_tag(:bdi, object.tags['name'].to_s), :id => content_tag(:bdi, name)
+ name = t "printable_name.with_name_html", :name => content_tag(:bdi, object.tags["name:#{locale}"].to_s), :id => content_tag(:bdi, name)
+ elsif object.tags.include? "name"
+ name = t "printable_name.with_name_html", :name => content_tag(:bdi, object.tags["name"].to_s), :id => content_tag(:bdi, name)
- link_to h(key), url, :title => t('browse.tag_details.wiki_link.key', :key => key)
+ link_to h(key), url, :title => t("browse.tag_details.wiki_link.key", :key => key)
def format_value(key, value)
if wp = wikipedia_link(key, value)
def format_value(key, value)
if wp = wikipedia_link(key, value)
- link_to h(wp[:title]), wp[:url], :title => t('browse.tag_details.wikipedia_link', :page => wp[:title])
+ link_to h(wp[:title]), wp[:url], :title => t("browse.tag_details.wikipedia_link", :page => wp[:title])
- link_to h(wdt[:title]), wdt[:url], :title => t('browse.tag_details.wikidata_link', :page => wdt[:title])
+ link_to h(wdt[:title]), wdt[:url], :title => t("browse.tag_details.wikidata_link", :page => wdt[:title])
- link_to h(value), url, :title => t('browse.tag_details.wiki_link.tag', :key => key, :value => value)
+ link_to h(value), url, :title => t("browse.tag_details.wiki_link.tag", :key => key, :value => value)
- link_to h(value), url, :title => t('browse.tag_details.telephone_link', :phone_number => value)
+ link_to h(value), url, :title => t("browse.tag_details.telephone_link", :phone_number => value)
def wikipedia_link(key, value)
# Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
def wikipedia_link(key, value)
# Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
end
elsif key =~ /^wikipedia:(\S+)$/
# Language is in the key, so assume value is the title
end
elsif key =~ /^wikipedia:(\S+)$/
# Language is in the key, so assume value is the title
# remove all whitespace instead of encoding it http://tools.ietf.org/html/rfc3966#section-5.1.1
# "+1 (234) 567-8901 " -> "+1(234)567-8901"
# remove all whitespace instead of encoding it http://tools.ietf.org/html/rfc3966#section-5.1.1
# "+1 (234) 567-8901 " -> "+1(234)567-8901"