Commit dead6a28 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Removed translated email templates attachments_added and document_added (no longer usefull).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@834 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0682b8cf
......@@ -52,7 +52,7 @@ class DocumentsController < ApplicationController
a = Attachment.create(:container => @document, :file => file, :author => logged_in_user)
@attachments << a unless a.new_record?
} if params[:attachments] and params[:attachments].is_a? Array
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? && Setting.notified_events.include?('document_added')
Mailer.deliver_attachments_added(@attachments) if !@attachments.empty? && Setting.notified_events.include?('document_added')
redirect_to :action => 'show', :id => @document
end
......
......@@ -182,7 +182,7 @@ class ProjectsController < ApplicationController
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
} if params[:attachments] and params[:attachments].is_a? Array
flash[:notice] = l(:notice_successful_create)
Mailer.deliver_document_add(@document) if Setting.notified_events.include?('document_added')
Mailer.deliver_document_added(@document) if Setting.notified_events.include?('document_added')
redirect_to :action => 'list_documents', :id => @project
end
end
......@@ -449,7 +449,7 @@ class ProjectsController < ApplicationController
a = Attachment.create(:container => @version, :file => file, :author => logged_in_user)
@attachments << a unless a.new_record?
} if params[:attachments] and params[:attachments].is_a? Array
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? && Setting.notified_events.include?('file_added')
Mailer.deliver_attachments_added(@attachments) if !@attachments.empty? && Setting.notified_events.include?('file_added')
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end
@versions = @project.versions.sort
......
......@@ -60,7 +60,7 @@ class Mailer < ActionMailer::Base
@body['journal']= journal
end
def document_add(document)
def document_added(document)
set_language_if_valid(Setting.default_language)
@recipients = document.project.users.collect { |u| u.mail if u.mail_notification }.compact
@from = Setting.mail_from
......@@ -68,21 +68,18 @@ class Mailer < ActionMailer::Base
@body['document'] = document
end
def attachments_add(attachments)
def attachments_added(attachments)
set_language_if_valid(Setting.default_language)
container = attachments.first.container
url = ''
added_to = ''
case container.class.name
when 'Version'
url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'projects', :action => 'list_files', :id => container.project_id)
url = {:only_path => false, :host => Setting.host_name, :controller => 'projects', :action => 'list_files', :id => container.project_id}
added_to = "#{l(:label_version)}: #{container.name}"
when 'Document'
url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => container.id)
url = {:only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => container.id}
added_to = "#{l(:label_document)}: #{container.title}"
when 'Issue'
url = url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => container.id)
added_to = "#{container.tracker.name} ##{container.id}: #{container.subject}"
end
@recipients = container.project.users.collect { |u| u.mail if u.mail_notification }.compact
@from = Setting.mail_from
......
<%= @added_to %>
<%= @attachments.size %> files(s) added.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> файл(а) добавени.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> files(s) added.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> fichier(s) ajouté(s).
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> file aggiunti.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> ファイルが追加されました。
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> bestand(en) toegevoegd.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> plik(ów) dodane.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> arquivo(s) adicionado.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> arquivo(s) adicionado.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> fil(er) tillagda.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= @added_to %>
<%= @attachments.size %> ļ.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
<%= link_to @added_to, @url %><br />
<ul><% @attachments.each do |attachment | %>
<li><%= attachment.filename %></li>
<% end %></ul>
<%= @added_to %><% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= url_for @url %>
Добавен е документ в <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Ein Dokument wurde hinzugefügt: <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Un document a été ajouté à <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Un documento e' stato aggiunto a <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
文書が <%= @document.project.name %> (<%= @document.category.name %>) に追加されました:
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Een document is toegevoegd aan <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Dokument został dodany do <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
\ No newline at end of file
Um documento foi adicionado no projeto <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Um documento foi adicionado no projeto <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
Ett dokument har lagts till i <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
��һ���ĵ��ѱ����뵽��Ŀ�� <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
<%= link_to @document.title, :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
(<%= @document.category.name %>)<br />
<br />
<%= textilizable(@document.description) %>
A document has been added to <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
<%= @document.title %> (<%= @document.category.name %>)
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
<%= @document.description %>
......@@ -41,7 +41,7 @@ class MailerTest < Test::Unit::TestCase
document = Document.find(1)
GLoc.valid_languages.each do |lang|
Setting.default_language = lang.to_s
assert Mailer.deliver_document_add(document)
assert Mailer.deliver_document_added(document)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment