Skip to content
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 achievements and actions views translatable #1557

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/nonprofits/_achievements.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- partial start: nonprofits/_achievements -->
<% unless @nonprofit.achievements&.join.blank? %>
<aside class='u-marginBottom--15 pastelBox--grey stripedBox u-relative'>
<header>Highlights</header>
<header><%= t('nonprofits.page.achievements.highlights') %></header>
<table>
<% @nonprofit.achievements.each do |ach| %>
<% if !ach.blank? %>
Expand Down
8 changes: 4 additions & 4 deletions app/views/nonprofits/_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<aside class='u-marginBottom--15'>
<% if current_nonprofit_user? %>
<button class='button--jumbo u-width--full' open-modal='newCampaign' if-branded='background-color, dark'>
Start a Campaign
<%= t('nonprofits.page.actions.start_campaign') %>
</button>
<% else %>
<a class='button u-width--full' if-branded='background-color, dark' target='_blank' href='/peer-to-peer?npo_id=<%=@nonprofit.id %>'>
Start a Campaign for <%= @nonprofit.name %>
<%= t('nonprofits.page.actions.start_campaign_for', nonprofit_name: @nonprofit.name) %>
</a>
<% end %>
</button>
<% if current_nonprofit_user? %>
<button class='button--jumbo u-width--full' open-modal='newEvent' data-when-confirmed if-branded='background-color, dark'>
Create an Event
<%= t('nonprofits.page.actions.create_event') %>
</button>
<% end %>
</aside>
<!-- partial end: nonprofits/_actions -->
<!-- partial end: nonprofits/_actions -->
11 changes: 11 additions & 0 deletions config/locales/en/nonprofits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# License: CC0-1.0

en:
nonprofits:
page:
achievements:
highlights: Highlights
actions:
start_campaign: Start a Campaign
start_campaign_for: "Start a Campaign for %{nonprofit_name}"
create_event: Create an Event
Loading