Skip to content

Commit 0438553

Browse files
committed
Added is_read to SampleStory to fix broken test
1 parent 90d3373 commit 0438553

6 files changed

Lines changed: 22 additions & 5 deletions

File tree

app/utils/sample_story.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class SampleStory < Struct.new(:source, :title, :lead, :published)
1+
class SampleStory < Struct.new(:source, :title, :lead, :is_read, :published)
22
def id; -1; end
33
def headline; title; end
44
def permalink; "#"; end
@@ -23,5 +23,6 @@ def body
2323
booth vice literally.</p>
2424
eos
2525
end
26+
def is_read; false; end
2627
def published; Time.now; end
2728
end

app/views/archive.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
</div>
1313
<div id="pagination">
1414
<% if @read_stories.previous_page %>
15-
<a href="?page=<%= @read_stories.previous_page %>"><i class="icon-double-angle-left"></i> Previous</a>
15+
<a href="?page=<%= @read_stories.previous_page %>"><i class="icon-double-angle-left"></i> <%= t('archive.previous') %></a>
1616
<% end %>
1717
Page <%= @read_stories.current_page %> of <%= @read_stories.total_pages %>
1818
<% if @read_stories.next_page %>
19-
<a href="?page=<%= @read_stories.next_page %>">Next <i class="icon-double-angle-right"></i></a>
19+
<a href="?page=<%= @read_stories.next_page %>"><%= t('archive.next') %> <i class="icon-double-angle-right"></i></a>
2020
<% end %>
2121
</div>
2222
<% else %>
2323
<div id="add-some-feeds">
24-
<p>Sorry, you haven't read any stories yet!</p>
24+
<p><%= t('archive.sorry') %></p>
2525
</div>
2626
<% end %>

app/views/partials/_zen.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<%= t('partials.zen.gtfo') %> <span id="gtfo"><%= t('partials.zen.go_make') %></span>.
77
</small>
88
<small>
9-
<p>Or keep procrastinating and check out your <a href="/archive">archive</a>.</p>
9+
<p><%= t('partials.zen.procrastinate') %> <a href="/archive"><%= t('partials.zen.archive') %></a>.</p>
1010
</small>
1111
</p>
1212
</div>

config/locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@ en:
8080
description: "We're getting you some stories to read, give us a second."
8181
start: "Start Reading"
8282
ready: "Okay, it's ready!"
83+
archive:
84+
next: "Next"
85+
previous: "Previous"
86+
sorry: "Sorry, you haven't read any stories yet!"

config/locales/es.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ es:
4343
zero: "You&#8217;ve reached RSS Zero&trade;"
4444
gtfo: 'Ahora deja de leer blogs y'
4545
go_make: 've a hacer algo'
46+
procrastinate: "Or keep procrastinating and check out your"
47+
archive: "archive"
4648
sessions:
4749
new:
4850
title: 'Stringer que habla'
@@ -80,3 +82,7 @@ es:
8082
description: "Estamos recibiendo algunas historias para leer, darnos un segundo."
8183
start: "Comenzar a leer"
8284
ready: "Okay, ¡esta listo!"
85+
archive:
86+
next: "Next"
87+
previous: "Previous"
88+
sorry: "Sorry, you haven't read any stories yet!"

config/locales/pt.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pt:
4343
zero: "Você alcançou RSS Zero&trade;"
4444
gtfo: 'Agora pare de ler blogs e'
4545
go_make: 'vá fazer algo'
46+
procrastinate: "Or keep procrastinating and check out your"
47+
archive: "archive"
4648
sessions:
4749
new:
4850
title: 'Stringer fala'
@@ -80,3 +82,7 @@ pt:
8082
description: "Nós estamos pegando algumas histórias para leitura, dê-nos um segundo."
8183
start: "Começar Leitura"
8284
ready: "Ok, está pronto!"
85+
archive:
86+
next: "Next"
87+
previous: "Previous"
88+
sorry: "Sorry, you haven't read any stories yet!"

0 commit comments

Comments
 (0)