- res = _("%{thing} is #{nick ? "from" : "located in"}") % {
- :thing => (nick ? nick : Resolv::getaddress(host)),
- :country => geo[:country]
- }
-
- res << " %{city}" % {
- :city => geo[:city]
- } unless geo[:city].to_s.empty?
+ location = []
+ location << geo[:city] unless geo[:city].nil_or_empty?
+ location << geo[:region] unless geo[:region].nil_or_empty? or geo[:region] == geo[:city]
+ location << geo[:country] unless geo[:country].nil_or_empty?