From e2609b9758bce891629a6b1949b810e3bcc8a83f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 2 Mar 2015 00:06:02 +0000 Subject: [PATCH] Remove unused code --- app/controllers/geocoder_controller.rb | 29 -------------------------- config/locales/en.yml | 13 ------------ 2 files changed, 42 deletions(-) diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index 11460f8c0..a4e1ded86 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -293,35 +293,6 @@ class GeocoderController < ApplicationController REXML::Document.new(fetch_text(url)) end - def format_distance(distance) - t("geocoder.distance", :count => distance) - end - - def format_direction(bearing) - return t("geocoder.direction.south_west") if bearing >= 22.5 && bearing < 67.5 - return t("geocoder.direction.south") if bearing >= 67.5 && bearing < 112.5 - return t("geocoder.direction.south_east") if bearing >= 112.5 && bearing < 157.5 - return t("geocoder.direction.east") if bearing >= 157.5 && bearing < 202.5 - return t("geocoder.direction.north_east") if bearing >= 202.5 && bearing < 247.5 - return t("geocoder.direction.north") if bearing >= 247.5 && bearing < 292.5 - return t("geocoder.direction.north_west") if bearing >= 292.5 && bearing < 337.5 - t("geocoder.direction.west") - end - - def format_name(name) - name.gsub(/( *\[[^\]]*\])*$/, "") - end - - def count_results(results) - count = 0 - - results.each do |source| - count += source[:results].length if source[:results] - end - - count - end - def escape_query(query) URI.escape(query, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]", false, "N")) end diff --git a/config/locales/en.yml b/config/locales/en.yml index a5c2f6453..65b7f3639 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -902,19 +902,6 @@ en: results: no_results: "No results found" more_results: "More results" - distance: - zero: "less than 1km" - one: "about 1km" - other: "about %{count}km" - direction: - south_west: "south-west" - south: "south" - south_east: "south-east" - east: "east" - north_east: "north-east" - north: "north" - north_west: "north-west" - west: "west" layouts: project_name: # in -- 2.43.2