fix error and some i18n

This commit is contained in:
thomaschen 2013-08-22 16:54:58 +08:00 committed by chris
parent 667b7f2bd5
commit 6dcebe0d31
4 changed files with 12 additions and 3 deletions

View File

@ -12,4 +12,4 @@
<% end %>
<%= form_for @vocab, url: panel_dictionary_back_end_dictionary_vocabs_path do |f| %>
<%= render 'form', f: f %>
<% end %>s
<% end %>

View File

@ -13,6 +13,15 @@
<td ><%= t :definition, :scope => :dictionary %></td>
<td><pre><%= @vocab.definition %></pre></td>
</tr>
<tr>
<td><%= t :time, :scope => :dictionary %></td>
<td><% if @vocab.created_at > Time.now.beginning_of_day %>
<%="#{time_ago_in_words(@vocab.created_at)}"%>
<%=t :ago,:scope => :dictionary%>
<% else %>
<%= @vocab.created_at.strftime("%Y/%m/%d") %>
<% end %></td>
</tr>
<tr>
<td ></td>
<td><%= link_to t(:edit),edit_panel_dictionary_back_end_dictionary_vocab_path(@vocab) %> |

View File

@ -17,5 +17,5 @@ en:
category: Category
word: Word
definition: Definition
time: Time
time: Created time
ago: ago

View File

@ -21,5 +21,5 @@ zh_tw:
category: 類別
word: 字彙
definition: 定義
time: 時間
time: 建立時間
ago: