Project

General

Profile

Actions

Feature #41450

closed

Include attachment filename in "File added" email notification subject

Feature #41450: Include attachment filename in "File added" email notification subject

Added by minoura makoto about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
Resolution:
Fixed

Description

Currently attachments_added (for wiki, documents and files) mail notifications looks like this:

Subject: [PROJECT] New file

I think this is too silent. Attached patch adds the (first, if multiple files are added) filename in the subject of the mail.

Subject: [PROJECT] New file: FILENAME.doc and 3 files


Files

filename_in_subject.diff (2.19 KB) filename_in_subject.diff minoura makoto, 2024-10-08 10:06
filename_in_subject_v2.diff (2.2 KB) filename_in_subject_v2.diff minoura makoto, 2024-10-11 02:05

Related issues 1 (0 open — 1 closed)

Related to Redmine - Defect #44619: "File added" notification fails for Japanese users when exactly two files are addedClosedGo MAEDAActions

Updated by minoura makoto about 2 years ago Actions #1

Currently attachments_added (for wiki, documents and files) mail notifications looks like this:

Correction: wiki attachments are not notified, sorry.

Updated by Holger Just about 2 years ago Actions #2

I don't have a strong opinion on the general validity of this change.

Just one nitpick though: different languages have widely differing pluralization rules, most importantly for small numbers. Thus, rather than a single label_attachment_count translation, we should use Rails pluralization features. See https://guides.rubyonrails.org/i18n.html#pluralization

An existing example of this could be the label_x_projects translation.

Updated by minoura makoto about 2 years ago Actions #3

Thank you for your comment.

Just one nitpick though: different languages have widely differing pluralization rules, ...

You're right. "FILE.pdf and 1 files" is not correct English, and I didn't know that notation. I revised the patch.

Updated by Go MAEDA about 2 years ago Actions #4

  • Target version set to 6.0.0

Setting the target version to 6.0.0.

Updated by Go MAEDA about 2 years ago Actions #5

  • Subject changed from Show the attachment filename in notification Email subject to Include attachment filename in "File added" email notification subject
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

I have committed the patch in r23148. Thank you for your contribution.

I made a change to the Japanese translation of "label_attachment_count" for ":other" count, updating it from "他%{count}件" to "ほか%{count}件". This change follows the Japanese government's recommendation to use the kana "ほか" instead of the kanji "他" in this context, particularly in official documents, as described in Cabinet public notice 公用文における漢字使用等について issued in 2010.

Updated by Go MAEDA about 2 years ago Actions #6

  • Status changed from Resolved to Closed

Updated by minoura makoto about 2 years ago Actions #7

Thank you, Maeda-san!

Updated by Go MAEDA about 2 months ago Actions #8

  • Related to Defect #44619: "File added" notification fails for Japanese users when exactly two files are added added
Actions

Also available in: PDF Atom