i18n for plantings#index

This commit is contained in:
Brenda Wallace
2018-04-23 15:40:56 +12:00
parent 9112d4e2bb
commit 85eea89792
2 changed files with 7 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
= render 'nav', owner: @owner, show_all: @show_all
- if @owner
= link_to "View #{@owner}'s profile >>", member_path(@owner)
= link_to t('.view_owners_profile', owner: @owner), member_path(@owner)
.pagination
= page_entries_info @plantings
@@ -20,12 +20,7 @@
= will_paginate @plantings
%ul.list-inline
%li The data on this page is available in the following formats:
- if @owner
%li= link_to "CSV", plantings_by_owner_path(@owner, format: 'csv')
%li= link_to "JSON", plantings_by_owner_path(@owner, format: 'json')
%li= link_to "RSS", plantings_by_owner_path(@owner, format: 'rss')
- else
%li= link_to "CSV", plantings_path(format: 'csv')
%li= link_to "JSON", plantings_path(format: 'json')
%li= link_to "RSS", plantings_path(format: 'rss')
%li= t('.the_data_on_this_page_is_available_in_the_following_formats')
- ['csv', 'json', 'rss'].each do |format|
%li= link_to format.upcase,
(@owner ? plantings_by_owner_path(@owner, format: format) : plantings_path(format: format))

View File

@@ -188,6 +188,8 @@ en:
crop_plantings: Everyone's %{crop} plantings
default: Everyone's plantings
owner_plantings: "%{owner} plantings"
view_owners_profile: View %{owner}'s profile >>
the_data_on_this_page_is_available_in_the_following_formats: 'The data on this page is available in the following formats:'
string: "%{crop} planting in %{garden} by %{owner}"
posts:
index: