Skip to content

Commit

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

* Update `index.html.haml` to evaluate translation strings

* Update `show.html.haml` to evaluate translation strings
  • Loading branch information
DeeDeeG committed Jan 15, 2018
1 parent 1c6ef8f commit 5a37427
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/restrooms/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%i.fa.fa-child

.map-toggle-btn.mapToggle.linkbutton.btn-lg.btn-light-purple
Map View
= t('.map-view-button-label')

.restrooms-index-content
.row
Expand Down
4 changes: 2 additions & 2 deletions app/views/restrooms/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
method: 'put' do
%button.btn.btn-lg.btn-success
%i.fa.fa-thumbs-up
Thumbs Up
= t('.thumbs-up-button-label')
= link_to restroom_path(restroom: { downvote: true }),
method: 'put' do
%button.btn.btn-lg.btn-danger
%i.fa.fa-thumbs-down
Thumbs Down
= t('.thumbs-down-button-label')
.row.headroom
.col-xs-12
Expand Down
8 changes: 8 additions & 0 deletions config/locales/restrooms.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
en:
restrooms:
index:
map-view-button-label: 'Map View'

show:
thumbs-up-button-label: 'Thumbs Up'
thumbs-down-button-label: 'Thumbs Down'

0 comments on commit 5a37427

Please sign in to comment.