Skip to content

Commit

Permalink
footer: Reorganize the aria-label translations
Browse files Browse the repository at this point in the history
* Moves aria-label translation strings of the footer
  into a separate sub-category in `locales/footer.en.yml`,
  allowing the individual translation key names to be much shorter.
  'refuge-restrooms-on-twitter-aria-label'
  => 'aria-labels.refuge-restrooms-on-twitter"

* Shorten the key names further from e.g.:
  'refuge-restrooms-on-twitter' => 'twitter'

* Updates `_footer.html.haml` to use the new key names.

  Thanks again @tkwidmer for the review.
  • Loading branch information
DeeDeeG committed Jan 17, 2018
1 parent 2e204a8 commit 591080e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions app/views/layouts/_footer.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
%footer
.footer
%a.iconLink{:href => "https://github.com/RefugeRestrooms/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-github-aria-label')}}
%a.iconLink{:href => "https://github.com/RefugeRestrooms/refugerestrooms", :aria => { :label => t('.aria-labels.github')}}
%i.icon.fa.fa-github-square.fa-3x
%a.iconLink{:href => "https://twitter.com/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-twitter-aria-label')}}
%a.iconLink{:href => "https://twitter.com/refugerestrooms", :aria => { :label => t('.aria-labels.twitter')}}
%i.icon.fa.fa-twitter-square.fa-3x
%a.iconLink{:href => "https://www.facebook.com/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-facebook-aria-label')}}
%a.iconLink{:href => "https://www.facebook.com/refugerestrooms", :aria => { :label => t('.aria-labels.facebook')}}
%i.icon.fa.fa-facebook-square.fa-3x
%a.iconLink{:href => "http://blog.refugerestrooms.org/", :aria => { :label => t('.refuge-restrooms-blog-on-tumblr-aria-label')}}
%a.iconLink{:href => "http://blog.refugerestrooms.org/", :aria => { :label => t('.aria-labels.tumblr')}}
%i.icon.fa.fa-tumblr-square.fa-3x
%a.iconLink{:href => contact_path, :aria => { :label => t('.email-refuge-restrooms-aria-label')}}
%a.iconLink{:href => contact_path, :aria => { :label => t('.aria-labels.email')}}
%i.icon.fa.fa-envelope.fa-3x
%br/
= t('.refuge-restrooms-is-open-source')
Expand Down
11 changes: 6 additions & 5 deletions config/locales/footer.en.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
en:
layouts:
footer:
refuge-restrooms-on-github-aria-label: 'Refuge Restrooms on GitHub'
refuge-restrooms-on-twitter-aria-label: 'Refuge Restrooms on twitter'
refuge-restrooms-on-facebook-aria-label: 'Refuge Restrooms on Facebook'
refuge-restrooms-blog-on-tumblr-aria-label: 'Refuge Restrooms blog on tumblr'
email-refuge-restrooms-aria-label: 'Email Refuge Restrooms'
aria-labels:
github: 'Refuge Restrooms on GitHub'
twitter: 'Refuge Restrooms on twitter'
facebook: 'Refuge Restrooms on Facebook'
tumblr: 'Refuge Restrooms blog on tumblr'
email: 'Email Refuge Restrooms'
refuge-restrooms-is-open-source: 'refuge restrooms is open source.'
code-on-github: 'code on github.'
contribute-to-the-project: 'contribute to the project'
Expand Down

0 comments on commit 591080e

Please sign in to comment.