-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make remaining pages translation-ready #421
Changes from 8 commits
be9e684
ce2cb91
dd0a1f1
1c6ef8f
5a37427
9abc8fb
5337341
7c87ccf
70c7c9c
aede79b
7847997
8f8d7ef
ba3fefa
2bc775f
ad63129
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
- if @contact.restroom_name.present? | ||
%h1 Request Edit for #{@contact.restroom_name} Restroom | ||
- titlestring = t('.request-edit-for') | ||
- titlestring << " " | ||
- titlestring << @contact.restroom_name | ||
- titlestring << " " | ||
- titlestring << t('.restroom') | ||
%h1= titlestring | ||
- else | ||
%h1 Contact | ||
%h1= t('.contact-title') | ||
= simple_form_for @contact, html: {class: 'form-vertical headroom'} do |f| | ||
%p | ||
= f.input :name, :required => true | ||
|
@@ -10,6 +15,6 @@ | |
.hidden | ||
= f.hidden_field :restroom_id, :required => false | ||
= f.hidden_field :restroom_name, :required => false | ||
= f.hidden_field :nickname, :hint => 'Leave this field blank!' | ||
= f.hidden_field :nickname, :hint => t('.leave-this-field-blank') | ||
.form-actions | ||
= f.button :submit, 'Send message', :class=> "linkbutton" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a translation here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was a weird experience trying to translate this (buttons in per plataformatec/simple_form#i18n:
The translation ended up here: simple_form.en.yml, Line 27 This seemed like the logical place to put it. I do notice that I accidentally changed the string from "Send message" -> "Submit message" so I can change that back if you like. [Edit: Addressed in this commit:] 8f8d7ef |
||
= f.button :submit, :class=> "linkbutton" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
%footer | ||
.footer | ||
%a.iconLink{:href => "https://github.com/RefugeRestrooms/refugerestrooms", :aria => { :label => "Refuge Restrooms on github"}} | ||
%a.iconLink{:href => "https://github.com/RefugeRestrooms/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-github-aria-label')}} | ||
%i.icon.fa.fa-github-square.fa-3x | ||
%a.iconLink{:href => "https://twitter.com/refugerestrooms", :aria => { :label => "Refuge Restrooms on twitter"}} | ||
%a.iconLink{:href => "https://twitter.com/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-twitter-aria-label')}} | ||
%i.icon.fa.fa-twitter-square.fa-3x | ||
%a.iconLink{:href => "https://www.facebook.com/refugerestrooms", :aria => { :label => "Refuge Restrooms on facebook"}} | ||
%a.iconLink{:href => "https://www.facebook.com/refugerestrooms", :aria => { :label => t('.refuge-restrooms-on-facebook-aria-label')}} | ||
%i.icon.fa.fa-facebook-square.fa-3x | ||
%a.iconLink{:href => "http://blog.refugerestrooms.org/", :aria => { :label => "Refuge Restrooms's blog on tumblr"}} | ||
%a.iconLink{:href => "http://blog.refugerestrooms.org/", :aria => { :label => t('.refuge-restrooms-blog-on-tumblr-aria-label')}} | ||
%i.icon.fa.fa-tumblr-square.fa-3x | ||
%a.iconLink{:href => contact_path, :aria => { :label => "Email Refuge Restrooms"}} | ||
%a.iconLink{:href => contact_path, :aria => { :label => t('.email-refuge-restrooms-aria-label')}} | ||
%i.icon.fa.fa-envelope.fa-3x | ||
%br/ | ||
refuge restrooms is open source. | ||
%a{:href => "https://github.com/RefugeRestrooms/refugerestrooms"} code on github. | ||
= t('.refuge-restrooms-is-open-source') | ||
%a{:href => "https://github.com/RefugeRestrooms/refugerestrooms"} #{t('.code-on-github')} | ||
%br/ | ||
contribute to the project | ||
%a{:href => "https://patreon.com/refugerestrooms"} on patreon. | ||
= t('.contribute-to-the-project') | ||
%a{:href => "https://patreon.com/refugerestrooms"} #{t('.on-patreon')} | ||
%br/ | ||
= "\© copyleft #{Date.today.year} refuge restrooms.".html_safe | ||
= "\© #{t('.copyleft')} #{Date.today.year} #{t('.refuge-restrooms')}".html_safe |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
en: | ||
contacts: | ||
new: | ||
request-edit-for: 'Request Edit for' | ||
restroom: 'Restroom' | ||
contact-title: 'Contact' | ||
leave-this-field-blank: 'Leave this field blank!' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
en: | ||
layouts: | ||
footer: | ||
refuge-restrooms-on-github-aria-label: 'Refuge Restrooms on GitHub' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'd recommend maybe storing these a little differently to make them a little more readable.
That way when you call them you do t('footer.aira-labels.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' | ||
refuge-restrooms-is-open-source: 'refuge restrooms is open source.' | ||
code-on-github: 'code on github.' | ||
contribute-to-the-project: 'contribute to the project' | ||
on-patreon: 'on patreon.' | ||
copyleft: 'copyleft' | ||
refuge-restrooms: 'refuge restrooms.' |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
en: | ||
layouts: | ||
navigation: | ||
toggle-navigation-button-label: 'Toggle navigation' | ||
submit-a-new-restroom-hyperlink-label: 'Submit a New Restroom' | ||
about-hyperlink-label: 'About' | ||
contact-hyperlink-label: 'Contact' | ||
|
||
resources-dropdown-button-label: 'Resources' | ||
download-unisex-restroom-signs-hyperlink-label: 'Download Unisex Restroom Signs' | ||
public-api-hyperlink-label: Public API |
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' |
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' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
en: | ||
pages: | ||
index: | ||
life-is-tough: 'Sometimes life is tough...' | ||
find-refuge: 'Find Refuge' | ||
add-restroom-button-label: 'Add A Restroom' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can actually interpolate this.
t('request-edit-for', restroom_name: @contact.restroom_name)
and then define the translation like this:request-edit-for: 'Request Edit for %{restroom_name} Restroom'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I18n, takes the param restroom_name and shoves it into the %{restroom_name} param