Remove duplicate i18n text to remove marker
We had two different keys with the same text and were passing it as a parameter. Since the text is the same in any case, we don't need a parameter for it. Note we are using the `proposals` i18n key instead of creating a new one in a `shared` namespace one because creating a new key would mean that we'd lose the already existing translations in Crowdin.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
class Shared::MapLocationComponent < ApplicationComponent
|
||||
attr_reader :remove_marker_label, :investments_coordinates, :form
|
||||
attr_reader :investments_coordinates, :form
|
||||
|
||||
def initialize(map_location, remove_marker_label: nil, investments_coordinates: nil, form: nil)
|
||||
def initialize(map_location, investments_coordinates: nil, form: nil)
|
||||
@map_location = map_location
|
||||
@remove_marker_label = remove_marker_label
|
||||
@investments_coordinates = investments_coordinates
|
||||
@form = form
|
||||
end
|
||||
@@ -30,6 +29,10 @@ class Shared::MapLocationComponent < ApplicationComponent
|
||||
map_location.zoom.presence || Setting["map.zoom"]
|
||||
end
|
||||
|
||||
def remove_marker_label
|
||||
t("proposals.form.map_remove_marker")
|
||||
end
|
||||
|
||||
def remove_marker_link_id
|
||||
"remove-marker-link-#{dom_id(map_location)}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user