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 13 hours ago. Updated about 12 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

Also available in: Atom PDF