Actions
Defect #44619
closed"File added" notification fails for Japanese users when exactly two files are added
Resolution:
Fixed
Affected version:
Description
Steps to reproduce¶
- Set the language of a user who receives notifications to Japanese.
- Add exactly two attachments to a project's Files (New file) or to a Document.
- 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
Actions