Bug description
In the Japanese locale file pkg/i18n/lang/ja-JP.json, several translation strings that should use the %[1]s (string) verb are missing the s, i.e. they use the bare %[1] instead of %[1]s.
Since %[1] alone is not a valid Go fmt verb, fmt.Sprintf treats the character immediately following it (usually the Japanese closing quote 」) as the verb, which is also invalid. This causes Go's fmt package to emit its error placeholder instead of the interpolated value, e.g.:
タスク「%!」(string=My Task Title)(%[3]s) は期限を過ぎました
instead of the intended:
タスク「My Task Title」(...) は期限を過ぎました
This affects real user-facing emails, e.g. the "task overdue" notification subject/body.
Affected keys (pkg/i18n/lang/ja-JP.json)
notifications.task.reminder.subject "「%[1]」(%[2]s) のリマインダー"
notifications.task.reminder.message "タスク「%[1]」(%[2]s) のリマインダーです。"
notifications.task.assigned.subject_to_assignee "「%[1]」(%[2]s) の担当者に割り当てられました"
notifications.task.assigned.message_to_assignee "%[1]s があなたを「%[2]」の担当者に割り当てました。"
notifications.task.assigned.subject_to_others "「%[1]」(%[2]s) の担当者に %[3]s が割り当てられました"
notifications.task.assigned.subject_to_others_self "「%[1]」(%[2]s) は %[3]s が自身に割り当てました"
notifications.task.deleted.subject "「%[1]」(%[2]s) が削除されました"
notifications.task.deleted.message "%[1]s がタスク「%[2]」(%[3]s) を削除しました"
notifications.task.overdue.subject "タスク「%[1]」(%[2]s) は期限を過ぎました"
notifications.task.overdue.message "タスク「%[1]」(%[2]s) は期限を%[3]s過ぎましたが、まだ完了していません。"
notifications.project.created "%[1]s がプロジェクト「%[2]」を作成しました"
notifications.team.member_added.subject "%[1]s がVikunjaのチーム「%[2]」に追加しました"
In every case above, the %[N] right before 」 should be %[N]s.
Steps to reproduce
- Set a user's language to Japanese (
ja-JP).
- Let a task become overdue (or trigger any of the notification types listed above), so Vikunja sends the corresponding notification email.
- Observe that the task title (or team/project name) in the subject/body is replaced with a Go fmt error string like
%!」(string=...) instead of the actual title.
Expected behavior
The task/project/team name should be correctly interpolated into the message, e.g. タスク「My Task」(...) は期限を過ぎました.
Environment
- Vikunja version: confirmed on
v2.6.0 (also present on main as of this report)
- Deployment: official
vikunja/vikunja Docker image
- This bug is in the Japanese (
ja-JP) locale content only; it does not affect other languages.
Suggested fix
Add the missing s to each %[N] placeholder listed above so it reads %[N]s, matching the pattern used correctly elsewhere in the same file (e.g. notifications.task.mentioned.subject).
Bug description
In the Japanese locale file
pkg/i18n/lang/ja-JP.json, several translation strings that should use the%[1]s(string) verb are missing thes, i.e. they use the bare%[1]instead of%[1]s.Since
%[1]alone is not a valid Gofmtverb,fmt.Sprintftreats the character immediately following it (usually the Japanese closing quote」) as the verb, which is also invalid. This causes Go's fmt package to emit its error placeholder instead of the interpolated value, e.g.:instead of the intended:
This affects real user-facing emails, e.g. the "task overdue" notification subject/body.
Affected keys (pkg/i18n/lang/ja-JP.json)
In every case above, the
%[N]right before」should be%[N]s.Steps to reproduce
ja-JP).%!」(string=...)instead of the actual title.Expected behavior
The task/project/team name should be correctly interpolated into the message, e.g.
タスク「My Task」(...) は期限を過ぎました.Environment
v2.6.0(also present onmainas of this report)vikunja/vikunjaDocker imageja-JP) locale content only; it does not affect other languages.Suggested fix
Add the missing
sto each%[N]placeholder listed above so it reads%[N]s, matching the pattern used correctly elsewhere in the same file (e.g.notifications.task.mentioned.subject).