Project

General

Profile

Actions

Feature #41450

closed

Include attachment filename in "File added" email notification subject

Added by minoura makoto 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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
Actions #1

Updated by minoura makoto 3 months ago

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

Correction: wiki attachments are not notified, sorry.

Actions #2

Updated by Holger Just 3 months ago

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.

Actions #3

Updated by minoura makoto 3 months ago

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.

Actions #4

Updated by Go MAEDA 2 months ago

  • Target version set to 6.0.0

Setting the target version to 6.0.0.

Actions #5

Updated by Go MAEDA 2 months ago

  • 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.

Actions #6

Updated by Go MAEDA 2 months ago

  • Status changed from Resolved to Closed
Actions #7

Updated by minoura makoto 2 months ago

Thank you, Maeda-san!

Actions

Also available in: Atom PDF