Patch by taos. Adds missing localization to Mail status window + cosmetic changes in Mail

preflet. Replacing B_TRANSLATE with B_TRANSLATE_COMMENT to better discern "never" and 
"Never".



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-07-14 20:31:12 +00:00
parent d316dc57de
commit f9b2ba2b84
4 changed files with 22 additions and 10 deletions

View File

@ -308,7 +308,7 @@ ConfigWindow::ConfigWindow()
BPopUpMenu* frequencyPopUp = new BPopUpMenu(B_EMPTY_STRING);
const char* frequencyStrings[] = {
B_TRANSLATE("never"),
B_TRANSLATE_COMMENT("never", "mail checking frequency"),
B_TRANSLATE("minutes"),
B_TRANSLATE("hours"),
B_TRANSLATE("days")};
@ -348,7 +348,7 @@ ConfigWindow::ConfigWindow()
BPopUpMenu *statusPopUp = new BPopUpMenu(B_EMPTY_STRING);
const char *statusModes[] = {
B_TRANSLATE("Never"),
B_TRANSLATE_COMMENT("Never", "show status window"),
B_TRANSLATE("While sending"),
B_TRANSLATE("While sending and receiving"),
B_TRANSLATE("Always")};
@ -898,18 +898,18 @@ ConfigWindow::_AddAccountToView(BMailAccountSettings* account)
item = new AccountItem(label, account, ACCOUNT_ITEM);
fAccountsListView->AddItem(item);
item = new AccountItem(B_TRANSLATE("· Incoming"), account, INBOUND_ITEM);
item = new AccountItem(B_TRANSLATE("\t\t· Incoming"), account, INBOUND_ITEM);
fAccountsListView->AddItem(item);
if (!account->IsInboundEnabled())
item->SetEnabled(false);
item = new AccountItem(B_TRANSLATE("· Outgoing"), account,
item = new AccountItem(B_TRANSLATE("\t\t· Outgoing"), account,
OUTBOUND_ITEM);
fAccountsListView->AddItem(item);
if (!account->IsOutboundEnabled())
item->SetEnabled(false);
item = new AccountItem(B_TRANSLATE("· E-mail filters"), account,
item = new AccountItem(B_TRANSLATE("\t\t· E-mail filters"), account,
FILTER_ITEM);
fAccountsListView->AddItem(item);
}

View File

@ -38,5 +38,6 @@ DoCatalogs mail_daemon :
:
DeskbarView.cpp
MailDaemon.cpp
Notifier.cpp
StatusWindow.cpp
;

View File

@ -4,10 +4,15 @@
* Distributed under the terms of the MIT License.
*/
#include <Catalog.h>
#include "Notifier.h"
#undef B_TRANSLATE_CONTEXT
#define B_TRANSLATE_CONTEXT "Notifier"
DefaultNotifier::DefaultNotifier(const char* accountName, bool inbound,
ErrorLogWindow* errorWindow, MailStatusWindow* statusWindow)
:
@ -17,9 +22,11 @@ DefaultNotifier::DefaultNotifier(const char* accountName, bool inbound,
fStatusWindow(statusWindow)
{
BString desc;
desc += (fIsInbound == true) ? "Fetching" : "Sending";
desc += " mail for ";
desc += fAccountName;
if (fIsInbound == true)
desc << B_TRANSLATE("Fetching mail for %name");
else
desc << B_TRANSLATE("Sending mail for %name");
desc.ReplaceFirst("%name", fAccountName);
fStatusWindow->Lock();
fStatusView = fStatusWindow->NewStatusView(desc, fIsInbound != false);

View File

@ -481,10 +481,14 @@ MailStatusView::AddProgress(int32 how_much)
strcpy(pre_text,status->TrailingText());
char final[80];
if (by_bytes) {
sprintf(final,"%.1f / %.1f kb (%d / %d messages)",float(float(status->CurrentValue() + how_much) / 1024),float(float(status->MaxValue()) / 1024),(int)items_now+1,(int)total_items);
sprintf(final, B_TRANSLATE("%.1f / %.1f kb (%d / %d messages)"),
float(float(status->CurrentValue() + how_much) / 1024),
float(float(status->MaxValue()) / 1024),(int)items_now+1,
(int)total_items);
status->Update(how_much,NULL,final);
} else {
sprintf(final,"%d / %d messages",(int)items_now,(int)total_items);
sprintf(final, B_TRANSLATE("%d / %d messages"),(int)items_now,
(int)total_items);
status->Update(how_much,NULL,final);
}
UnlockLooper();