diff --git a/app/views/search/common/_facet_sidebar.html.erb b/app/views/search/common/_facet_sidebar.html.erb
index 98320cd3a..2f4f0cb94 100644
--- a/app/views/search/common/_facet_sidebar.html.erb
+++ b/app/views/search/common/_facet_sidebar.html.erb
@@ -7,7 +7,7 @@ Variable that should be available
- @facet_params - The facet filters the user has applied
%>
@@ -28,10 +28,10 @@ Variable that should be available
-
- Filter
+ <%= t('sidebar.filter.heading') %>
<% if @facet_params.present? %>
<%= link_to clear_filters_path, class: 'btn btn-xs btn-secondary font-size-sm clear-filters-btn' do %>
- Clear filters
+ <%= t('sidebar.filter.values.clear_filters') %>
<% end %>
<% end %>
@@ -53,20 +53,23 @@ Variable that should be available
<% end %>
<% if resource_type.name == 'Event' %>
- <%= render partial: 'search/common/facet_sidebar_boolean_filter', locals: { facet_field: 'include_expired',
- count: '-',
- enable_text: 'Show past events',
- disable_text: 'Hide past events' } %>
- <%= render partial: 'search/common/facet_sidebar_boolean_filter', locals: { facet_field: 'include_disabled',
- count: '-',
- enable_text: 'Show disabled events',
- disable_text: 'Hide disabled events' } %>
+ <%= render partial: 'search/common/facet_sidebar_boolean_filter',
+ locals: { facet_field: 'include_expired',
+ count: '-',
+ enable_text: t('sidebar.filter.values.show_past_events'),
+ disable_text: t('sidebar.filter.values.hide_past_events') } %>
+ <%= render partial: 'search/common/facet_sidebar_boolean_filter',
+ locals: { facet_field: 'include_disabled',
+ count: '-',
+ enable_text: t('sidebar.filter.values.show_disabled_events'),
+ disable_text: t('sidebar.filter.values.hide_disabled_events') } %>
<% elsif resource_type.name == 'Material' || resource_type.name == 'LearningPath' %>
<% resource_name = resource_type.model_name.human.downcase.pluralize %>
- <%= render partial: 'search/common/facet_sidebar_boolean_filter', locals: { facet_field: 'include_archived',
- count: '-',
- enable_text: "Show archived #{resource_name}",
- disable_text: "Hide archived #{resource_name}" } %>
+ <%= render partial: 'search/common/facet_sidebar_boolean_filter',
+ locals: { facet_field: 'include_archived',
+ count: '-',
+ enable_text: t('sidebar.filter.values.show_archived', resource: resource_name),
+ disable_text: t('sidebar.filter.values.hide_archived', resource: resource_name) } %>
<% end %>
<% if TeSS::Config.facets_max_age_list.include?(resource_type.name) %>
diff --git a/app/views/search/common/_facet_sidebar_curation.html.erb b/app/views/search/common/_facet_sidebar_curation.html.erb
index d88018d84..0a9d7587a 100644
--- a/app/views/search/common/_facet_sidebar_curation.html.erb
+++ b/app/views/search/common/_facet_sidebar_curation.html.erb
@@ -5,7 +5,7 @@
-
- Curate
+ <%= t('sidebar.curate.heading') %>
@@ -15,12 +15,15 @@
-
-
Last Checked
+
<%= t('sidebar.curate.values.last_checked') %>
- <% [[1, '1 day'], [3, '3 days'], [7, '1 week'], [30, '1 month']].each do |days, text| %>
- <% text = "More than #{text} ago" %>
+ <% [[1, t('sidebar.curate.values.one_day')],
+ [3, t('sidebar.curate.values.three_days')],
+ [7, t('sidebar.curate.values.one_week')],
+ [30, t('sidebar.curate.values.one_month')]].each do |days, text| %>
+ <% text = t('sidebar.curate.values.more_than', value: text) %>
<% if days == params[:days_since_scrape].to_i %>
-
<%= remove_filter_link(:days_since_scrape, days, title: text, replace: true, class: 'facet-option') %>
@@ -36,10 +39,11 @@
<% end %>
<% if show_hidden_filter %>
- <%= render partial: 'search/common/facet_sidebar_boolean_filter', locals: { facet_field: 'include_hidden',
- count: '-',
- enable_text: 'Show hidden items',
- disable_text: 'Hide hidden items' } %>
+ <%= render partial: 'search/common/facet_sidebar_boolean_filter',
+ locals: { facet_field: 'include_hidden',
+ count: '-',
+ enable_text: t('sidebar.hidden.values.show_hidden'),
+ disable_text: t('sidebar.hidden.values.hide_hidden') } %>
<% end %>
<% end %>
diff --git a/app/views/search/common/_facet_sidebar_max_age.html.erb b/app/views/search/common/_facet_sidebar_max_age.html.erb
index 604e5a56f..7ee3c40bf 100644
--- a/app/views/search/common/_facet_sidebar_max_age.html.erb
+++ b/app/views/search/common/_facet_sidebar_max_age.html.erb
@@ -3,7 +3,7 @@
-
-
Date added
+
<%= t('facets.titles.date_added') %>
diff --git a/app/views/search/common/_search_filters.html.erb b/app/views/search/common/_search_filters.html.erb
index ada65238c..a8995c590 100644
--- a/app/views/search/common/_search_filters.html.erb
+++ b/app/views/search/common/_search_filters.html.erb
@@ -38,7 +38,7 @@ Globals
<%# The search term %>
<% unless params[:q].blank? %>
- Search query:
+ <%= t('search_query') %>
<%= remove_filter_link('q', params[:q], class: 'label label-default filter-button') %>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 139768e79..5a2622973 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -765,6 +765,7 @@ en:
organizer: Organiser
titles:
language: 'Language'
+ date_added: 'Date added'
languages: # Only needed to override default names from I18nData
el: 'Greek'
errors:
@@ -794,6 +795,7 @@ en:
mailer:
events_require_approval:
subject: "Last week's events on %{site_name}"
+ search_query: 'Search query:'
sidebar:
sort:
heading: Sort
@@ -806,6 +808,29 @@ en:
latest: Latest
most_recent: Most recent
last_finished: Last finished
+ curate:
+ heading: Curate
+ values:
+ last_checked: Last Checked
+ more_than: 'More than %{value} ago'
+ one_day: '1 day'
+ three_day: '3 days'
+ one_week: '1 week'
+ one_month: '1 month'
+ filter:
+ heading: 'Filter'
+ values:
+ clear_filters: 'Clear filters'
+ show_past_events: 'Show past events'
+ hide_past_events: 'Hide past events'
+ show_disabled_events: 'Show disabled events'
+ hide_disabled_events: 'Hide disabled events'
+ show_archived: 'Show archived %{resource}'
+ hide_archived: 'Hide archived %{resource}'
+ hidden:
+ values:
+ show_hidden: 'Show hidden items'
+ hide_hidden: 'Hide hidden items'
collections:
show:
curate_materials: "Curate materials"