added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id)
added_to = "#{l(:label_document)}: #{container.title}"
end
+ summary = l(:label_attachment_summary,
+ :filename => attachments.first.filename,
+ :count => attachments.length - 1)
redmine_headers 'Project' => container.project.identifier
@attachments = attachments
@user = user
@added_to = added_to
@added_to_url = added_to_url
mail :to => user,
- :subject => "[#{container.project.name}] #{l(:label_attachment_new)}"
+ :subject => "[#{container.project.name}] #{l(:label_attachment_new)}: #{summary}"
end
# Notifies users about new attachments
label_attachment_plural: Files
label_file_added: File added
label_attachment_description: File description
+ label_attachment_summary:
+ zero: "%{filename}"
+ one: "%{filename} and 1 file"
+ other: "%{filename} and %{count} files"
label_report: Report
label_report_plural: Reports
label_news: News
setting_copy_attachments_on_issue_copy: チケットをコピーするとき添付ファイルもコピー
field_thousands_delimiter: 3桁区切り表示
label_involved_principals: 作成者 / 直前担当者
+ label_attachment_summary:
+ zero: "%{filename}"
+ other: "%{filename} ほか%{count}件"
mail = ActionMailer::Base.deliveries.last
assert_not_nil mail
- assert_equal "[eCookbook] New file", mail.subject
+ assert_equal '[eCookbook] New file: testfile.txt', mail.subject
assert_mail_body_match 'testfile.txt', mail
end