From 3c6ddc9cecc250b3853025ca8b10a964bed0ff97 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 15 Sep 2007 15:20:08 +0000 Subject: [PATCH] Changed author display on issues, news and document files. git-svn-id: http://redmine.rubyforge.org/svn/trunk@732 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 4 ++++ app/views/documents/show.rhtml | 2 +- app/views/issues/show.rhtml | 2 +- app/views/news/_news.rhtml | 4 ++-- app/views/news/show.rhtml | 2 +- lang/bg.yml | 3 +++ lang/de.yml | 3 +++ lang/en.yml | 2 +- lang/es.yml | 3 +++ lang/fr.yml | 2 +- lang/it.yml | 3 +++ lang/ja.yml | 3 +++ lang/nl.yml | 3 +++ lang/pt-br.yml | 3 +++ lang/pt.yml | 3 +++ lang/sv.yml | 3 +++ lang/zh.yml | 3 +++ 17 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 794c6a63c..9f7b85707 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -73,6 +73,10 @@ module ApplicationHelper @date_format_setting == 0 ? l_datetime(time) : (time.strftime("%Y-%m-%d") + ' ' + l_time(time)) end + def authoring(created, author) + l(:label_added_time_by, author.name, distance_of_time_in_words(Time.now, created)) + end + def day_name(day) l(:general_day_names).split(',')[day-1] end diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml index 2dc76ead6..85d769097 100644 --- a/app/views/documents/show.rhtml +++ b/app/views/documents/show.rhtml @@ -19,7 +19,7 @@ <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> (<%= number_to_human_size attachment.filesize %>)
- <%= attachment.author.name %>, <%= format_date(attachment.created_on) %>
+ <%= authoring attachment.created_on, attachment.author %>
<%= lwr(:label_download, attachment.downloads) %> <% end %> diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 6be93d483..865810f42 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -8,7 +8,7 @@

<%= @issue.tracker.name %> #<%= @issue.id %>: <%=h @issue.subject %>

- <%= l(:label_added_time_by, distance_of_time_in_words(Time.now, @issue.created_on), link_to_user(@issue.author)) %>. + <%= authoring @issue.created_on, @issue.author %>. <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) if @issue.created_on != @issue.updated_on %>.

diff --git a/app/views/news/_news.rhtml b/app/views/news/_news.rhtml index 7a065ba4e..17a410102 100644 --- a/app/views/news/_news.rhtml +++ b/app/views/news/_news.rhtml @@ -1,5 +1,5 @@

<%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %> <%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
<% unless news.summary.blank? %><%=h news.summary %>
<% end %> -<%= news.author.name %>, <%= format_time(news.created_on) %>
-<%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %>

+<%= authoring news.created_on, news.author %> +<%= "
#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase}" if news.comments_count > 0 %>

diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml index fd05e4234..5f92801f4 100644 --- a/app/views/news/show.rhtml +++ b/app/views/news/show.rhtml @@ -6,7 +6,7 @@

<%=h @news.title %>

<% unless @news.summary.empty? %><%=h @news.summary %>
<% end %> -<%= @news.author.name %>, <%= format_time(@news.created_on) %>

+<%= authoring @news.created_on, @news.author %>

<%= textilizable(@news.description) %>
diff --git a/lang/bg.yml b/lang/bg.yml index d3a8e2bd6..c3ce4f129 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Заглавие setting_app_subtitle: Описание @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Вход button_submit: Изпращане diff --git a/lang/de.yml b/lang/de.yml index 1bc63f5cd..7e7441dd8 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Applikation Titel setting_app_subtitle: Applikation Untertitel @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Einloggen button_submit: OK diff --git a/lang/en.yml b/lang/en.yml index af5dea1ea..f89cfae7e 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -417,7 +417,7 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules -label_added_time_by: Added %s ago by %s +label_added_time_by: Added by %s %s ago label_updated_time: Updated %s ago button_login: Login diff --git a/lang/es.yml b/lang/es.yml index 5915f4b93..9deecd9ad 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Título del aplicación setting_app_subtitle: Subtítulo del aplicación @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Conexión button_submit: Someter diff --git a/lang/fr.yml b/lang/fr.yml index 315fe8d91..852b04f95 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -417,7 +417,7 @@ label_sort_by: Trier par "%s" label_send_test_email: Envoyer un email de test label_feeds_access_key_created_on: Clé d'accès RSS créée il y a %s label_module_plural: Modules -label_added_time_by: Ajouté il y a %s par %s +label_added_time_by: Ajouté par %s il y a %s label_updated_time: Mis à jour il y a %s button_login: Connexion diff --git a/lang/it.yml b/lang/it.yml index 212f029ef..acaeb65b7 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Titolo applicazione setting_app_subtitle: Sottotitolo applicazione @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Login button_submit: Invia diff --git a/lang/ja.yml b/lang/ja.yml index 1bed4b7e5..8134cefa2 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -159,6 +159,7 @@ field_issue_to_id: 関連する問題 field_delay: 遅延 field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: アプリケーションのタイトル setting_app_subtitle: アプリケーションのサブタイトル @@ -417,6 +418,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: ログイン button_submit: 変更 diff --git a/lang/nl.yml b/lang/nl.yml index 78ca987ea..75c2996ac 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -158,6 +158,7 @@ field_issue_to_id: Gerelateerd issue field_delay: Vertraging field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Applicatie titel setting_app_subtitle: Applicatie ondertitel @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Inloggen button_submit: Toevoegen diff --git a/lang/pt-br.yml b/lang/pt-br.yml index 81bbba701..dd61d3ed3 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Titulo da aplicacao setting_app_subtitle: Sub-titulo da aplicacao @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Login button_submit: Enviar diff --git a/lang/pt.yml b/lang/pt.yml index 10153e2b8..fad533d37 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -158,6 +158,7 @@ field_issue_to_id: Tarefa relacionada field_delay: Atraso field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Título da aplicação setting_app_subtitle: Sub-título da aplicação @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Login button_submit: Enviar diff --git a/lang/sv.yml b/lang/sv.yml index edb9416f7..7244f86ea 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -158,6 +158,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: Applikationstitel setting_app_subtitle: Applicationsunderrubrik @@ -416,6 +417,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: Logga in button_submit: Skicka diff --git a/lang/zh.yml b/lang/zh.yml index f043436aa..bdce4ebbe 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -161,6 +161,7 @@ field_issue_to_id: Related issue field_delay: Delay field_assignable: Issues can be assigned to this role field_redirect_existing_links: Redirect existing links +field_estimated_hours: Estimated time setting_app_title: 应用程序标题 setting_app_subtitle: 应用程序子标题 @@ -418,6 +419,8 @@ label_sort_by: Sort by "%s" label_send_test_email: Send a test email label_feeds_access_key_created_on: RSS access key created %s ago label_module_plural: Modules +label_added_time_by: Added by %s %s ago +label_updated_time: Updated %s ago button_login: 登录 button_submit: 提交 -- 2.39.5