Skip to content

ja-JP locale: missing s verb in several placeholders breaks notification emails (renders as %!」(string=...)) #3729

Description

@itsumonotakumi

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

  1. Set a user's language to Japanese (ja-JP).
  2. Let a task become overdue (or trigger any of the notification types listed above), so Vikunja sends the corresponding notification email.
  3. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/emailSMTP config, mail templates, outgoing mailarea/i18nTranslations, localization, localized date/time formatsarea/notificationsNotification system, in-app notifications, notification controlswaiting for reply

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions