Ticket #7689: notifier.diff

File notifier.diff, 1.2 KB (added by mt, 13 years ago)
  • src/add-ons/mail_daemon/inbound_filters/notifier/filter.cpp

     
    6767        system_beep("New E-mail");
    6868
    6969    if (fStrategy & alert) {
    70         BString text;
     70        BString text, numString;
    7171        if (fNNewMessages != 1)
    72             text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
    73                 " new messages") << B_TRANSLATE(" for ")
    74                 << fMailProtocol.AccountSettings().Name() << ".";
     72            text << B_TRANSLATE("You have %num new messages for %name.");
    7573        else
    76             text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
    77                 " new message") << B_TRANSLATE(" for ")
    78                 << fMailProtocol.AccountSettings().Name() << ".";
     74            text << B_TRANSLATE("You have %num new message for %name.");
    7975
     76        numString << fNNewMessages;
     77        text.ReplaceFirst("%num", numString);
     78        text.ReplaceFirst("%name", fMailProtocol.AccountSettings().Name());
     79
    8080        BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(),
    8181            "OK", NULL, NULL, B_WIDTH_AS_USUAL);
    8282        alert->SetFeel(B_NORMAL_WINDOW_FEEL);