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");
|
system_beep("New E-mail");
|
||||||
|
|
||||||
if (fStrategy & alert) {
|
if (fStrategy & alert) {
|
||||||
BString text;
|
BString text, numString;
|
||||||
if (fNNewMessages != 1)
|
if (fNNewMessages != 1)
|
||||||
text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
|
text << B_TRANSLATE("You have %num new messages for %name.");
|
||||||
" new messages") << B_TRANSLATE(" for ")
|
|
||||||
<< fMailProtocol.AccountSettings().Name() << ".";
|
|
||||||
else
|
else
|
||||||
text << B_TRANSLATE("You have ") << fNNewMessages << B_TRANSLATE(
|
text << B_TRANSLATE("You have %num new message for %name.");
|
||||||
" new message") << B_TRANSLATE(" for ")
|
|
||||||
<< fMailProtocol.AccountSettings().Name() << ".";
|
numString << fNNewMessages;
|
||||||
|
text.ReplaceFirst("%num", numString);
|
||||||
|
text.ReplaceFirst("%name", fMailProtocol.AccountSettings().Name());
|
||||||
|
|
||||||
BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(),
|
BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(),
|
||||||
"OK", NULL, NULL, B_WIDTH_AS_USUAL);
|
"OK", NULL, NULL, B_WIDTH_AS_USUAL);
|
||||||
|
|||||||
@@ -517,13 +517,16 @@ MailDaemonApp::MessageReceived(BMessage* msg)
|
|||||||
case 'numg':
|
case 'numg':
|
||||||
{
|
{
|
||||||
int32 numMessages = msg->FindInt32("num_messages");
|
int32 numMessages = msg->FindInt32("num_messages");
|
||||||
|
BString numString;
|
||||||
|
|
||||||
if (numMessages > 1)
|
if (numMessages > 1)
|
||||||
fAlertString << numMessages << B_TRANSLATE(" new messages");
|
fAlertString << B_TRANSLATE("%num new messages for %name\n");
|
||||||
else
|
else
|
||||||
fAlertString << numMessages << B_TRANSLATE(" new message");
|
fAlertString << B_TRANSLATE("%num new message for %name\n");
|
||||||
|
|
||||||
fAlertString << B_TRANSLATE(" for ") << msg->FindString("name")
|
numString << numMessages;
|
||||||
<< '\n';
|
fAlertString.ReplaceFirst("%num", numString);
|
||||||
|
fAlertString.ReplaceFirst("%name", msg->FindString("name"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user