Ticket #7689: mail_daemon.patch
File mail_daemon.patch, 10.5 KB (added by , 13 years ago) |
---|
-
src/preferences/mail/ConfigViews.cpp
28 28 29 29 #include <MailSettings.h> 30 30 31 #include <MDRLanguage.h>32 33 31 #include "FilterConfigView.h" 34 32 35 33 -
src/servers/mail/DeskbarView.cpp
10 10 #include <malloc.h> 11 11 12 12 #include <Bitmap.h> 13 #include <Catalog.h> 13 14 #include <Deskbar.h> 14 15 #include <Directory.h> 15 16 #include <Entry.h> … … 36 37 #include <E-mail.h> 37 38 #include <MailDaemon.h> 38 39 #include <MailSettings.h> 39 #include <MDRLanguage.h>40 40 41 41 #include "DeskbarViewIcons.h" 42 42 43 44 #undef B_TRANSLATE_CONTEXT 45 #define B_TRANSLATE_CONTEXT "DeskbarView" 46 47 43 48 const char* kTrackerSignature = "application/x-vnd.Be-TRAK"; 44 49 45 50 … … 462 467 BPopUpMenu* menu = new BPopUpMenu(B_EMPTY_STRING, false, false); 463 468 menu->SetFont(be_plain_font); 464 469 465 menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ( 466 "Create new message", "N) 新規メッセージ作成")B_UTF8_ELLIPSIS, 467 new BMessage(MD_OPEN_NEW))); 470 menu->AddItem(new BMenuItem(B_TRANSLATE("Create new message" 471 B_UTF8_ELLIPSIS), new BMessage(MD_OPEN_NEW))); 468 472 menu->AddSeparatorItem(); 469 473 470 474 BMessenger tracker(kTrackerSignature); … … 530 534 531 535 // Hack for R5's buggy Query Notification 532 536 #ifdef HAIKU_TARGET_PLATFORM_BEOS 533 menu->AddItem(new BMenuItem( 534 MDR_DIALECT_CHOICE("Refresh New Mail Count", 535 "未読メールカウントを更新"), 537 menu->AddItem(new BMenuItem(B_TRANSLATE("Refresh New Mail Count"), 536 538 new BMessage(MD_REFRESH_QUERY))); 537 539 #endif 538 540 … … 540 542 541 543 if (fNewMessages > 0) { 542 544 BString string; 543 MDR_DIALECT_CHOICE(544 string << fNewMessages << " new message"545 << (fNewMessages != 1 ? "s" : B_EMPTY_STRING),546 string << fNewMessages << " 通の未読メッセージ");545 if (fNewMessages != 1) 546 string << fNewMessages << B_TRANSLATE(" new messages"); 547 else 548 string << fNewMessages << B_TRANSLATE(" new message"); 547 549 548 550 _GetNewQueryRef(ref); 549 551 … … 554 556 navMenu->SetNavDir(&ref); 555 557 556 558 menu->AddItem(item); 557 } else { 558 menu->AddItem(item = new BMenuItem( 559 MDR_DIALECT_CHOICE ("No new messages","未読メッセージなし"), NULL)); 559 } 560 else { 561 menu->AddItem(item = new BMenuItem(B_TRANSLATE("No new messages"), 562 NULL)); 560 563 item->SetEnabled(false); 561 564 } 562 565 563 566 BMailAccounts accounts; 564 567 if (modifiers() & B_SHIFT_KEY) { 565 BMenu *accountMenu = new BMenu( 566 MDR_DIALECT_CHOICE ("Check for mails only","R) メール受信のみ")); 568 BMenu *accountMenu = new BMenu(B_TRANSLATE("Check for mails only")); 567 569 BFont font; 568 570 menu->GetFont(&font); 569 571 accountMenu->SetFont(&font); … … 577 579 accountMenu->AddItem(new BMenuItem(account->Name(), message)); 578 580 } 579 581 if (accounts.CountAccounts() == 0) { 580 item = new BMenuItem( "<no accounts>", NULL);582 item = new BMenuItem(B_TRANSLATE("<no accounts>"), NULL); 581 583 item->SetEnabled(false); 582 584 accountMenu->AddItem(item); 583 585 } … … 586 588 new BMessage(MD_CHECK_FOR_MAILS))); 587 589 588 590 // Not used: 589 // menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ( 590 // "Check For Mails Only","メール受信のみ"), new BMessage(MD_CHECK_FOR_MAILS))); 591 menu->AddItem(new BMenuItem( 592 MDR_DIALECT_CHOICE ("Send pending mails", "M) 保留メールを送信"), 593 new BMessage(MD_SEND_MAILS))); 591 // menu->AddItem(new BMenuItem(B_TRANSLATE("Check For Mails Only"), 592 // new BMessage(MD_CHECK_FOR_MAILS))); 593 menu->AddItem(new BMenuItem(B_TRANSLATE("Send pending mails"), 594 new BMessage(MD_SEND_MAILS))); 594 595 } else { 595 menu->AddItem(item = new BMenuItem( 596 MDR_DIALECT_CHOICE ("Check for mail now", "C) メールチェック"), 596 menu->AddItem(item = new BMenuItem(B_TRANSLATE("Check for mail now"), 597 597 new BMessage(MD_CHECK_SEND_NOW))); 598 598 if (accounts.CountAccounts() == 0) 599 599 item->SetEnabled(false); 600 600 } 601 601 602 602 menu->AddSeparatorItem(); 603 menu->AddItem(new BMenuItem( 604 MDR_DIALECT_CHOICE ("Preferences", "P) メール環境設定") B_UTF8_ELLIPSIS, 603 menu->AddItem(new BMenuItem(B_TRANSLATE("Preferences" B_UTF8_ELLIPSIS), 605 604 new BMessage(MD_OPEN_PREFS))); 606 605 607 606 if (modifiers() & B_SHIFT_KEY) { 608 menu->AddItem(new BMenuItem( 609 MDR_DIALECT_CHOICE ("Shutdown mail services", "Q) 終了"), 607 menu->AddItem(new BMenuItem(B_TRANSLATE("Shutdown mail services"), 610 608 new BMessage(B_QUIT_REQUESTED))); 611 609 } 612 610 -
src/servers/mail/MailDaemon.cpp
13 13 #include <vector> 14 14 15 15 #include <Beep.h> 16 #include <Catalog.h> 16 17 #include <Deskbar.h> 17 18 #include <Directory.h> 18 19 #include <Entry.h> … … 28 29 #include <MailDaemon.h> 29 30 #include <MailMessage.h> 30 31 #include <MailSettings.h> 31 #include <MDRLanguage.h>32 32 33 33 34 #undef B_TRANSLATE_CONTEXT 35 #define B_TRANSLATE_CONTEXT "MailDaemon" 36 37 34 38 void 35 39 makeIndices() 36 40 { … … 159 163 } 160 164 161 165 BString string; 162 MDR_DIALECT_CHOICE( 163 if (fNewMessages > 0) 164 string << fNewMessages; 165 else 166 string << "No"; 166 if (fNewMessages > 0) { 167 167 if (fNewMessages != 1) 168 string << " new messages.";168 string << fNewMessages << B_TRANSLATE(" new messages."); 169 169 else 170 string << " new message.";, 171 if (fNewMessages > 0) 172 string << fNewMessages << " 通の未読メッセージがあります "; 173 else 174 string << "未読メッセージはありません"; 175 ); 170 string << fNewMessages << B_TRANSLATE(" new message."); 171 } 172 else 173 string = B_TRANSLATE("No new messages."); 174 176 175 fCentralBeep = false; 177 176 fMailStatusWindow->SetDefaultMessage(string); 178 177 … … 473 472 474 473 if (fAlertString != B_EMPTY_STRING) { 475 474 fAlertString.Truncate(fAlertString.Length() - 1); 476 BAlert* alert = new BAlert(MDR_DIALECT_CHOICE("New Messages", 477 "新着メッセージ"), fAlertString.String(), "OK", NULL, NULL, 478 B_WIDTH_AS_USUAL); 475 BAlert* alert = new BAlert(B_TRANSLATE("New Messages"), 476 fAlertString.String(), "OK", NULL, NULL, B_WIDTH_AS_USUAL); 479 477 alert->SetFeel(B_NORMAL_WINDOW_FEEL); 480 478 alert->Go(NULL); 481 479 fAlertString = B_EMPTY_STRING; … … 519 517 case 'numg': 520 518 { 521 519 int32 numMessages = msg->FindInt32("num_messages"); 522 MDR_DIALECT_CHOICE(523 fAlertString << numMessages << " new message";524 if (numMessages > 1)525 fAlertString << 's';520 if (numMessages > 1) 521 fAlertString << numMessages << B_TRANSLATE(" new messages"); 522 else 523 fAlertString << numMessages << B_TRANSLATE(" new message"); 526 524 527 fAlertString << " for " << msg->FindString("name") 528 << '\n';, 529 530 fAlertString << msg->FindString("name") << "より\n" 531 << numMessages << " 通のメッセージが届きました "; 532 ); 525 fAlertString << B_TRANSLATE(" for ") << msg->FindString("name") 526 << '\n'; 533 527 break; 534 528 } 535 529 … … 548 542 549 543 BString string; 550 544 551 MDR_DIALECT_CHOICE( 552 if (fNewMessages > 0) 553 string << fNewMessages; 554 else 555 string << "No"; 545 if (fNewMessages > 0) { 556 546 if (fNewMessages != 1) 557 string << " new messages.";547 string << fNewMessages << B_TRANSLATE(" new messages."); 558 548 else 559 string << " new message.";, 549 string << fNewMessages << B_TRANSLATE(" new message."); 550 } 551 else 552 string << B_TRANSLATE("No new messages."); 560 553 561 if (fNewMessages > 0)562 string << fNewMessages << " 通の未読メッセージがあります";563 else564 string << "未読メッセージはありません";565 );566 567 554 fMailStatusWindow->SetDefaultMessage(string.String()); 568 555 break; 569 556 } … … 715 702 BVolume volume; 716 703 717 704 map<int32, send_mails_info> messages; 718 719 705 706 720 707 int32 account = -1; 721 708 if (msg->FindInt32("account", &account) != B_OK) 722 709 account = -1; -
src/servers/mail/StatusWindow.cpp
1 1 /* 2 2 * Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved. 3 * Copyright 2004-20 09, Haiku Inc. All rights reserved.3 * Copyright 2004-2011, Haiku Inc. All rights reserved. 4 4 * 5 5 * Distributed under the terms of the MIT License. 6 6 */ … … 13 13 14 14 #include "MailSettings.h" 15 15 16 #include <MDRLanguage.h>17 18 16 #include <Application.h> 19 17 #include <Box.h> 20 18 #include <Button.h> 19 #include <Catalog.h> 21 20 #include <Directory.h> 22 21 #include <E-mail.h> 23 22 #include <FindDirectory.h> … … 34 33 #include <assert.h> 35 34 36 35 36 #undef B_TRANSLATE_CONTEXT 37 #define B_TRANSLATE_CONTEXT "StatusWindow" 38 39 37 40 static BLocker sLock; 38 41 39 42 … … 50 53 frame.InsetBy(90.0 + 5.0, 5.0); 51 54 52 55 fCheckNowButton = new BButton(frame, "check_mail", 53 MDR_DIALECT_CHOICE ("Check mail now","メールチェック"),56 B_TRANSLATE("Check mail now"), 54 57 new BMessage('mbth'), B_FOLLOW_LEFT_RIGHT, 55 58 B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_NAVIGABLE); 56 59 fCheckNowButton->ResizeToPreferred(); … … 62 65 frame.InsetBy(-90.0, 0.0); 63 66 64 67 fMessageView = new BStringView(frame, "message_view", "", 65 68 B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE); 66 69 fMessageView->SetAlignment(B_ALIGN_CENTER); 67 fMessageView->SetText( MDR_DIALECT_CHOICE ("No new messages.","未読メッセージはありません"));70 fMessageView->SetText(B_TRANSLATE("No new messages.")); 68 71 float framewidth = frame.Width(); 69 72 fMessageView->ResizeToPreferred(); 70 73 fMessageView->ResizeTo(framewidth, fMessageView->Bounds().Height()); -
src/servers/mail/Jamfile
12 12 13 13 SubDirHdrs [ FDirName $(HAIKU_TOP) headers os add-ons mail_daemon ] ; 14 14 15 AddResources mail_daemon : mail_daemon.rdef DeskbarViewIcons.rdef ;16 17 15 Server mail_daemon : 18 16 DeskbarView.cpp 19 17 ErrorLogWindow.cpp … … 22 20 main.cpp 23 21 Notifier.cpp 24 22 StatusWindow.cpp 23 : be libmail.so tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++) 24 $(TARGET_NETWORK_LIBS) 25 : mail_daemon.rdef DeskbarViewIcons.rdef 25 26 ; 26 27 27 LinkAgainst mail_daemon : be libmail.so tracker $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS) ;28 29 28 Package haiku-maildaemon-cvs : 30 29 mail_daemon : 31 30 boot beos system servers ; 32 31 33 32 Packages haiku-maildaemon-cvs : 34 33 README LICENSE HISTORY install.sh ; 34 35 DoCatalogs mail_daemon : 36 x-vnd.Haiku-mail_daemon 37 : 38 DeskbarView.cpp 39 MailDaemon.cpp 40 StatusWindow.cpp 41 ;