Project

General

Profile

Feature #41450 » filename_in_subject.diff

minoura makoto, 2024-10-08 10:06

View differences:

app/models/mailer.rb
187 187
      added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id)
188 188
      added_to = "#{l(:label_document)}: #{container.title}"
189 189
    end
190
    if attachments.length == 1
191
      title = ": #{attachments[0].filename}"
192
    elsif attachments.length > 1
193
      title = ": #{l(:label_attachment_count,
194
                   :filename => attachments[0].filename,
195
                   :count => attachments.length-1)}"
196
    else
197
      # length == 0: never happens
198
      title = ""
199
    end
190 200
    redmine_headers 'Project' => container.project.identifier
191 201
    @attachments = attachments
192 202
    @user = user
193 203
    @added_to = added_to
194 204
    @added_to_url = added_to_url
195 205
    mail :to => user,
196
      :subject => "[#{container.project.name}] #{l(:label_attachment_new)}"
206
      :subject => "[#{container.project.name}] #{l(:label_attachment_new)}#{title}"
197 207
  end
198 208

  
199 209
  # Notifies users about new attachments
config/locales/en.yml
1420 1420
  text_user_destroy_confirmation: "Are you sure you want to delete this user and remove all references to them? This cannot be undone. Often, locking a user instead of deleting them is the better solution. To confirm, please enter their login (%{login}) below."
1421 1421
  text_project_destroy_enter_identifier: "To confirm, please enter the project's identifier (%{identifier}) below."
1422 1422
  field_name_or_email_or_login: Name, email or login
1423
  label_attachment_count: "%{filename} and %{count} files"
config/locales/ja.yml
1446 1446
  setting_copy_attachments_on_issue_copy: チケットをコピーするとき添付ファイルもコピー
1447 1447
  field_thousands_delimiter: 3桁区切り表示
1448 1448
  label_involved_principals: 作成者 / 直前担当者
1449
  label_attachment_count: "%{filename}、他%{count}件"
(1-1/2)