Skip to content

Commit

Permalink
search buttons: Make translation-ready
Browse files Browse the repository at this point in the history
* Add translation strings in `config/locales/search.en.yml`

* Update `layouts/_search.html.haml` to use translation strings
  • Loading branch information
DeeDeeG committed Jan 15, 2018
1 parent 5337341 commit 7c87ccf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/layouts/_search.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
.input-group
= text_field_tag :search, params[:search], class: "form-control search-bar", aria: {label: t("search_bar.enter_location")}
.input-group-btn
%button.btn.btn-light-purple.submit-search-button{type: "button", title: "Search", value: "Search", aria: { label: "Search" }}
%button.btn.btn-light-purple.submit-search-button{type: "button", title: t('.search'), value: t('.search'), aria: { label: t('.search') }}
%i.fa.fa-search.fa-2x
%i.fa.fa-refresh.fa-spin.fa-2x
%button.btn.btn-light-purple.current-location-button{type: "button", title: "Search by Current Location", aria: { label: "Search by Current Location" }, value: (splash ? "Search Current Location" : nil ) }
%button.btn.btn-light-purple.current-location-button{type: "button", title: t('.search-by-current-location'), aria: { label: t('.search-by-current-location') }, value: (splash ? t('.search-by-current-location') : nil ) }
%i.fa.fa-location-arrow.fa-2x
%i.fa.fa-refresh.fa-spin.fa-2x
6 changes: 6 additions & 0 deletions config/locales/search.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
en:
layouts:
search:
search: 'Search'
search-by-current-location: 'Search by Current Location'

0 comments on commit 7c87ccf

Please sign in to comment.