Skip to content

Commit

Permalink
Make achievements and actions views translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
jvBatista committed May 23, 2023
1 parent 6d25b5f commit c29ab3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
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

0 comments on commit c29ab3f

Please sign in to comment.