Skip to content

Commit

Permalink
Fix label used in translation file
Browse files Browse the repository at this point in the history
  • Loading branch information
nomadicoder committed Mar 29, 2018
1 parent 2c5fe3a commit 933761e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/helpers/blacklight/configuration_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module Blacklight::ConfigurationHelperBehavior

##
# Index fields to display for a type of document
#
#
# @param [SolrDocument] document
# @return [Array<Blacklight::Configuration::Field>]
# @return [Array<Blacklight::Configuration::Field>]
def index_fields document=nil
blacklight_config.index_fields
end
Expand All @@ -17,7 +17,7 @@ def sort_fields
active_sort_fields.map { |_sort_key, field_config| [sort_field_label(field_config.key), field_config.key] }
end
deprecation_deprecate :sort_fields

def active_sort_fields
blacklight_config.sort_fields.select { |sort_key, field_config| should_render_field?(field_config) }
end
Expand All @@ -26,7 +26,7 @@ def active_sort_fields
def search_fields
search_field_options_for_select
end

# Returns suitable argument to options_for_select method, to create
# an html select based on #search_field_list. Skips search_fields
# marked :include_in_simple_select => false
Expand Down Expand Up @@ -115,7 +115,7 @@ def label_for_search_field(key)
field_config ||= Blacklight::Configuration::NullField.new(key: key)

field_label(
:"blacklight.search.fields.search.#{field_config.key}",
:"blacklight.search.fields.default",
:"blacklight.search.fields.#{field_config.key}",
(field_config.label if field_config),
key.to_s.humanize
Expand All @@ -137,11 +137,11 @@ def sort_field_label(key)
# Look up the label for a solr field.
#
# @overload label
# @param [Symbol] an i18n key
# @param [Symbol] an i18n key
#
# @overload label, i18n_key, another_i18n_key, and_another_i18n_key
# @param [String] default label to display if the i18n look up fails
# @param [Symbol] i18n keys to attempt to look up
# @param [Symbol] i18n keys to attempt to look up
# before falling back to the label
# @param [Symbol] any number of additional keys
# @param [Symbol] ...
Expand Down Expand Up @@ -205,15 +205,15 @@ def default_sort_field
def default_per_page
blacklight_config.default_per_page || blacklight_config.per_page.first
end

##
# The available options for results per page, in the style of #options_for_select
def per_page_options_for_select
blacklight_config.per_page.map do |count|
[t(:'blacklight.search.per_page.label', :count => count).html_safe, count]
end
end

##
# Determine whether to render a field by evaluating :if and :unless conditions
#
Expand Down

0 comments on commit 933761e

Please sign in to comment.