From 6dcebe0d3155822211cfeb0f4211b4acf29b63ee Mon Sep 17 00:00:00 2001 From: thomaschen <99703040@nccu.edu.tw> Date: Thu, 22 Aug 2013 16:54:58 +0800 Subject: [PATCH] fix error and some i18n --- .../dictionary/back_end/dictionary_vocabs/new.html.erb | 2 +- .../dictionary/back_end/dictionary_vocabs/show.html.erb | 9 +++++++++ vendor/built_in_modules/dictionary/config/locales/en.yml | 2 +- .../built_in_modules/dictionary/config/locales/zh_tw.yml | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/new.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/new.html.erb index 23d95c7de..7ed119cb2 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/new.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/new.html.erb @@ -12,4 +12,4 @@ <% end %> <%= form_for @vocab, url: panel_dictionary_back_end_dictionary_vocabs_path do |f| %> <%= render 'form', f: f %> -<% end %>s \ No newline at end of file +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb index 918fae5d4..46b443cec 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb @@ -13,6 +13,15 @@ <%= t :definition, :scope => :dictionary %>
<%= @vocab.definition %>
+ + <%= t :time, :scope => :dictionary %> + <% 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 %> + <%= link_to t(:edit),edit_panel_dictionary_back_end_dictionary_vocab_path(@vocab) %> | diff --git a/vendor/built_in_modules/dictionary/config/locales/en.yml b/vendor/built_in_modules/dictionary/config/locales/en.yml index 6d5cde3e8..2a2798d80 100644 --- a/vendor/built_in_modules/dictionary/config/locales/en.yml +++ b/vendor/built_in_modules/dictionary/config/locales/en.yml @@ -17,5 +17,5 @@ en: category: Category word: Word definition: Definition - time: Time + time: Created time ago: ago \ No newline at end of file diff --git a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml index d2645e1fb..a1b4bf966 100644 --- a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml @@ -21,5 +21,5 @@ zh_tw: category: 類別 word: 字彙 definition: 定義 - time: 時間 + time: 建立時間 ago: 前