Project

General

Profile

Actions

Defect #44619

closed

"File added" notification fails for Japanese users when exactly two files are added

Added by Takenori TAKAKI about 12 hours ago. Updated about 11 hours ago.

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

Description

Steps to reproduce

  1. Set the language of a user who receives notifications to Japanese.
  2. Add exactly two attachments to a project's Files (New file) or to a Document.
  3. Check the notification email ("File added").

Actual behavior

The email is not sent. The following error is raised:

I18n::InvalidPluralizationData (translation data {zero: "%{filename}", other: "%{filename} ほか%{count}件"} can not be used with :count => 1. key 'one' is missing.)

It does not happen with one attachment, or with three or more attachments.

Expected behavior

The email is sent, with a subject like "[eCookbook] 新しいファイル: foo.txt ほか1件".

Cause

label_attachment_summary in config/locales/ja.yml has no one entry. It was introduced in #41450 (r23148) and affects 6.0 and later.

Patch

The following patch adds the missing one entry to ja.yml.

diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index d45b9fe045..7569cd53e7 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -1443,6 +1443,7 @@ ja:
   label_involved_principals: 作成者 / 直近の関係者
   label_attachment_summary:
     zero: "%{filename}" 
+    one: "%{filename} ほか%{count}件" 
     other: "%{filename} ほか%{count}件" 
   setting_wiki_tablesort_enabled: コンテンツ内テーブルの Tablesort (JavaScript) による並べ替え
   label_progressbar: 進捗バー

Related issues

Related to Redmine - Feature #41450: Include attachment filename in "File added" email notification subjectClosedGo MAEDAActions
Actions #1

Updated by Go MAEDA about 11 hours ago

  • Status changed from New to Confirmed
  • Target version set to 6.1.6
  • Affected version set to 6.0.0
Actions #2

Updated by Go MAEDA about 11 hours ago

  • Related to Feature #41450: Include attachment filename in "File added" email notification subject added
Actions #3

Updated by Go MAEDA about 11 hours ago

  • Subject changed from Notification email fails to be sent in Japanese when two attachments are added to Files or Documents to "File added" notification fails for Japanese users when exactly two files are added
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix in r25255. Thank you for reporting the issue.

Actions #4

Updated by Go MAEDA about 11 hours ago

  • Status changed from Confirmed to Closed

Merged the fix into the stable branches in r25256 and r25257.

Actions

Also available in: Atom PDF