Patch by mt who also puts the Japanese mail translation into HTA. Thanks! Closes #7689.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42293 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -67,15 +67,15 @@ NotifyFilter::MailboxSynced(status_t status)
|
||||
system_beep("New E-mail");
|
||||
|
||||
if (fStrategy & alert) {
|
||||
BString text;
|
||||
BString text, numString;
|
||||
if (fNNewMessages != 1)
|
||||
text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
|
||||
" new messages") << B_TRANSLATE(" for ")
|
||||
<< fMailProtocol.AccountSettings().Name() << ".";
|
||||
text << B_TRANSLATE("You have %num new messages for %name.");
|
||||
else
|
||||
text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
|
||||
" new message") << B_TRANSLATE(" for ")
|
||||
<< fMailProtocol.AccountSettings().Name() << ".";
|
||||
text << B_TRANSLATE("You have %num new message for %name.");
|
||||
|
||||
numString << fNNewMessages;
|
||||
text.ReplaceFirst("%num", numString);
|
||||
text.ReplaceFirst("%name", fMailProtocol.AccountSettings().Name());
|
||||
|
||||
BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(),
|
||||
"OK", NULL, NULL, B_WIDTH_AS_USUAL);
|
||||
|
||||
@@ -517,13 +517,16 @@ MailDaemonApp::MessageReceived(BMessage* msg)
|
||||
case 'numg':
|
||||
{
|
||||
int32 numMessages = msg->FindInt32("num_messages");
|
||||
BString numString;
|
||||
|
||||
if (numMessages > 1)
|
||||
fAlertString << numMessages << B_TRANSLATE(" new messages");
|
||||
fAlertString << B_TRANSLATE("%num new messages for %name\n");
|
||||
else
|
||||
fAlertString << numMessages << B_TRANSLATE(" new message");
|
||||
fAlertString << B_TRANSLATE("%num new message for %name\n");
|
||||
|
||||
fAlertString << B_TRANSLATE(" for ") << msg->FindString("name")
|
||||
<< '\n';
|
||||
numString << numMessages;
|
||||
fAlertString.ReplaceFirst("%num", numString);
|
||||
fAlertString.ReplaceFirst("%name", msg->FindString("name"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user