Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36668 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia
2010-05-06 21:01:54 +00:00
parent e904ecc93e
commit 8c9c8c0e1f
10 changed files with 454 additions and 391 deletions
+28 -22
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -742,8 +742,9 @@ TContentView::MessageReceived(BMessage *msg)
} else { } else {
beep(); beep();
(new BAlert("", (new BAlert("",
TR("An error occurred trying to open this signature."), B_TRANSLATE("An error occurred trying to open this "
TR("Sorry")))->Go(); "signature."),
B_TRANSLATE("Sorry")))->Go();
} }
break; break;
} }
@@ -882,9 +883,9 @@ TTextView::TTextView(BRect frame, BRect text, bool incoming,
// //
fEnclosureMenu = new BPopUpMenu("Enclosure", false, false); fEnclosureMenu = new BPopUpMenu("Enclosure", false, false);
fEnclosureMenu->SetFont(&menuFont); fEnclosureMenu->SetFont(&menuFont);
fEnclosureMenu->AddItem(new BMenuItem(TR("Save attachment" B_UTF8_ELLIPSIS), fEnclosureMenu->AddItem(new BMenuItem(
new BMessage(M_SAVE))); B_TRANSLATE("Save attachment" B_UTF8_ELLIPSIS), new BMessage(M_SAVE)));
fEnclosureMenu->AddItem(new BMenuItem(TR("Open attachment"), fEnclosureMenu->AddItem(new BMenuItem(B_TRANSLATE("Open attachment"),
new BMessage(M_OPEN))); new BMessage(M_OPEN)));
// //
@@ -892,9 +893,9 @@ TTextView::TTextView(BRect frame, BRect text, bool incoming,
// //
fLinkMenu = new BPopUpMenu("Link", false, false); fLinkMenu = new BPopUpMenu("Link", false, false);
fLinkMenu->SetFont(&menuFont); fLinkMenu->SetFont(&menuFont);
fLinkMenu->AddItem(new BMenuItem(TR("Open this link"), fLinkMenu->AddItem(new BMenuItem(B_TRANSLATE("Open this link"),
new BMessage(M_OPEN))); new BMessage(M_OPEN)));
fLinkMenu->AddItem(new BMenuItem(TR("Copy link location"), fLinkMenu->AddItem(new BMenuItem(B_TRANSLATE("Copy link location"),
new BMessage(M_COPY))); new BMessage(M_COPY)));
SetDoesUndo(true); SetDoesUndo(true);
@@ -1444,7 +1445,8 @@ TTextView::MessageReceived(BMessage *msg)
case B_INPUT_METHOD_STOPPED: case B_INPUT_METHOD_STOPPED:
fInputMethodUndoState.active = false; fInputMethodUndoState.active = false;
if (fInputMethodUndoBuffer.CountItems() > 0) { if (fInputMethodUndoBuffer.CountItems() > 0) {
KUndoItem *undo = fInputMethodUndoBuffer.ItemAt(fInputMethodUndoBuffer.CountItems() - 1); KUndoItem *undo = fInputMethodUndoBuffer.ItemAt(
fInputMethodUndoBuffer.CountItems() - 1);
if (undo->History == K_INSERTED){ if (undo->History == K_INSERTED){
fUndoBuffer.MakeNewUndoItem(); fUndoBuffer.MakeNewUndoItem();
fUndoBuffer.AddUndo(undo->RedoText, undo->Length, fUndoBuffer.AddUndo(undo->RedoText, undo->Length,
@@ -1548,7 +1550,7 @@ TTextView::MouseDown(BPoint where)
BMenuItem *addItem = NULL; BMenuItem *addItem = NULL;
if (!foundWord && gUserDict >= 0) { if (!foundWord && gUserDict >= 0) {
menu.AddSeparatorItem(); menu.AddSeparatorItem();
addItem = new BMenuItem(TR("Add"), NULL); addItem = new BMenuItem(B_TRANSLATE("Add"), NULL);
menu.AddItem(addItem); menu.AddItem(addItem);
} }
@@ -1890,7 +1892,8 @@ TTextView::Open(hyper_text *enclosure)
if (result != B_NO_ERROR && result != B_ALREADY_RUNNING) { if (result != B_NO_ERROR && result != B_ALREADY_RUNNING) {
beep(); beep();
(new BAlert("", (new BAlert("",
TR("There is no installed handler for URL links."), B_TRANSLATE("There is no installed handler for "
"URL links."),
"Sorry"))->Go(); "Sorry"))->Go();
} }
break; break;
@@ -2039,8 +2042,9 @@ TTextView::Save(BMessage *msg, bool makeNewFile)
if (result != B_NO_ERROR) { if (result != B_NO_ERROR) {
beep(); beep();
(new BAlert("", TR("An error occurred trying to save the attachment."), (new BAlert("", B_TRANSLATE("An error occurred trying to save "
TR("Sorry")))->Go(); "the attachment."),
B_TRANSLATE("Sorry")))->Go();
} }
return result; return result;
@@ -3279,8 +3283,9 @@ TTextView::Undo(BClipboard */*clipboard*/)
} else { } else {
::beep(); ::beep();
(new BAlert("", (new BAlert("",
TR("Inconsistency occurred in the undo/redo buffer."), B_TRANSLATE("Inconsistency occurred in the undo/redo "
TR("OK")))->Go(); "buffer."),
B_TRANSLATE("OK")))->Go();
} }
break; break;
} }
@@ -3325,8 +3330,9 @@ TTextView::Redo()
case K_REPLACED: case K_REPLACED:
::beep(); ::beep();
(new BAlert("", (new BAlert("",
TR("Inconsistency occurred in the undo/redo buffer."), B_TRANSLATE("Inconsistency occurred in the undo/redo "
TR("OK")))->Go(); "buffer."),
B_TRANSLATE("OK")))->Go();
break; break;
} }
ScrollToSelection(); ScrollToSelection();
+15 -14
View File
@@ -19,24 +19,25 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// //
// Enclosures.cpp // Enclosures.cpp
// The enclosures list view (TListView), the list items (TListItem), // The enclosures list view (TListView), the list items (TListItem),
// and the view containing the list and handling the messages (TEnclosuresView). // and the view containing the list
// and handling the messages (TEnclosuresView).
//-------------------------------------------------------------------- //--------------------------------------------------------------------
#include "Enclosures.h" #include "Enclosures.h"
@@ -139,7 +140,7 @@ TEnclosuresView::TEnclosuresView(BRect rect, BRect wind_rect)
BRect r; BRect r;
r.left = ENCLOSE_TEXT_H + font.StringWidth( r.left = ENCLOSE_TEXT_H + font.StringWidth(
TR("Attachments: ")) + 5; B_TRANSLATE("Attachments: ")) + 5;
r.top = ENCLOSE_FIELD_V; r.top = ENCLOSE_FIELD_V;
r.right = wind_rect.right - wind_rect.left - B_V_SCROLL_BAR_WIDTH - 9; r.right = wind_rect.right - wind_rect.left - B_V_SCROLL_BAR_WIDTH - 9;
r.bottom = Frame().Height() - 8; r.bottom = Frame().Height() - 8;
@@ -224,10 +225,10 @@ TEnclosuresView::MessageReceived(BMessage *msg)
if (window && window->Mail()) if (window && window->Mail())
window->Mail()->RemoveComponent(item->Component()); window->Mail()->RemoveComponent(item->Component());
(new BAlert("", TR( (new BAlert("", B_TRANSLATE(
"Removing attachments from a forwarded mail is not yet " "Removing attachments from a forwarded mail is not yet "
"implemented!\nIt will not yet work correctly."), "implemented!\nIt will not yet work correctly."),
TR("OK")))->Go(); B_TRANSLATE("OK")))->Go();
} }
else else
watch_node(item->NodeRef(), B_STOP_WATCHING, this); watch_node(item->NodeRef(), B_STOP_WATCHING, this);
@@ -278,8 +279,8 @@ TEnclosuresView::MessageReceived(BMessage *msg)
{ {
beep(); beep();
(new BAlert("", (new BAlert("",
TR("Only files can be added as attachments."), B_TRANSLATE("Only files can be added as attachments."),
TR("OK")))->Go(); B_TRANSLATE("OK")))->Go();
} }
} }
break; break;
@@ -423,9 +424,9 @@ TListView::MouseDown(BPoint point)
BPopUpMenu menu("enclosure", false, false); BPopUpMenu menu("enclosure", false, false);
menu.SetFont(&font); menu.SetFont(&font);
menu.AddItem(new BMenuItem(TR("Open attachment"), menu.AddItem(new BMenuItem(B_TRANSLATE("Open attachment"),
new BMessage(LIST_INVOKED))); new BMessage(LIST_INVOKED)));
menu.AddItem(new BMenuItem(TR("Remove attachment"), menu.AddItem(new BMenuItem(B_TRANSLATE("Remove attachment"),
new BMessage(M_REMOVE))); new BMessage(M_REMOVE)));
BPoint menuStart = ConvertToScreen(point); BPoint menuStart = ConvertToScreen(point);
+11 -10
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
// =========================================================================== // ===========================================================================
@@ -113,7 +113,8 @@ FindPanel::FindPanel(BRect rect)
fTextControl->MakeFocus(); fTextControl->MakeFocus();
AddChild(fTextControl); AddChild(fTextControl);
fFindButton = new BButton(BRect(0, 0, 90, 20),"FINDBUTTON", TR("Find"), fFindButton = new BButton(BRect(0, 0, 90, 20),"FINDBUTTON",
B_TRANSLATE("Find"),
new BMessage(FINDBUTTON),B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); new BMessage(FINDBUTTON),B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
fFindButton->ResizeToPreferred(); fFindButton->ResizeToPreferred();
AddChild(fFindButton); AddChild(fFindButton);
@@ -214,9 +215,9 @@ void FindPanel::Find()
FindWindow::FindWindow() FindWindow::FindWindow()
: BWindow(FindWindow::fLastPosition, TR("Find"), B_FLOATING_WINDOW, : BWindow(FindWindow::fLastPosition, B_TRANSLATE("Find"),
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK B_FLOATING_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_CLOSE_ON_ESCAPE) | B_WILL_ACCEPT_FIRST_CLICK | B_CLOSE_ON_ESCAPE)
{ {
fFindPanel = new FindPanel(Bounds()); fFindPanel = new FindPanel(Bounds());
AddChild(fFindPanel); AddChild(fFindPanel);
+36 -32
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
#include "MailApp.h" #include "MailApp.h"
@@ -159,7 +159,7 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
BMessage* msg; BMessage* msg;
float x = StringWidth( /* The longest title string in the header area */ float x = StringWidth( /* The longest title string in the header area */
TR("Attachments: ")) + 9; B_TRANSLATE("Attachments: ")) + 9;
float y = TO_FIELD_V; float y = TO_FIELD_V;
BMenuBar* dummy = new BMenuBar(BRect(0, 0, 100, 15), "Dummy"); BMenuBar* dummy = new BMenuBar(BRect(0, 0, 100, 15), "Dummy");
@@ -248,17 +248,18 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
if (fIncoming && !resending) { if (fIncoming && !resending) {
// Set up the character set pop-up menu on the right of "To" box. // Set up the character set pop-up menu on the right of "To" box.
r.Set (windowRect.Width() - widestCharacterSet - r.Set (windowRect.Width() - widestCharacterSet -
StringWidth (TR("Decoding:")) - 2 * SEPARATOR_MARGIN, y - 2, StringWidth (B_TRANSLATE("Decoding:")) - 2 * SEPARATOR_MARGIN,
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight); y - 2, windowRect.Width() - SEPARATOR_MARGIN,
field = new BMenuField (r, "decoding", TR("Decoding:"), fEncodingMenu, y + menuFieldHeight);
true /* fixedSize */, field = new BMenuField (r, "decoding", B_TRANSLATE("Decoding:"),
fEncodingMenu, true /* fixedSize */,
B_FOLLOW_TOP | B_FOLLOW_RIGHT, B_FOLLOW_TOP | B_FOLLOW_RIGHT,
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP); B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
field->SetDivider(field->StringWidth(TR("Decoding:")) + 5); field->SetDivider(field->StringWidth(B_TRANSLATE("Decoding:")) + 5);
AddChild(field); AddChild(field);
r.Set(SEPARATOR_MARGIN, y, r.Set(SEPARATOR_MARGIN, y,
field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight); field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight);
sprintf(string, TR("From:")); sprintf(string, B_TRANSLATE("From:"));
} else { } else {
r.Set(x - 12, y, windowRect.Width() - SEPARATOR_MARGIN, r.Set(x - 12, y, windowRect.Width() - SEPARATOR_MARGIN,
y + menuFieldHeight); y + menuFieldHeight);
@@ -285,9 +286,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
if (!fIncoming || resending) { if (!fIncoming || resending) {
r.right = r.left - 5; r.right = r.left - 5;
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("To:")) + 25); r.left = r.right - ceilf(be_plain_font->StringWidth(
B_TRANSLATE("To:")) + 25);
r.top -= 1; r.top -= 1;
fToMenu = new QPopupMenu(TR("To:")); fToMenu = new QPopupMenu(B_TRANSLATE("To:"));
field = new BMenuField(r, "", "", fToMenu, true, field = new BMenuField(r, "", "", fToMenu, true,
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
field->SetDivider(0.0); field->SetDivider(0.0);
@@ -299,14 +301,14 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
if (!fIncoming || resending) { if (!fIncoming || resending) {
// Put the character set box on the right of the From field. // Put the character set box on the right of the From field.
r.Set(windowRect.Width() - widestCharacterSet - r.Set(windowRect.Width() - widestCharacterSet -
StringWidth(TR("Encoding:")) - 2 * SEPARATOR_MARGIN, StringWidth(B_TRANSLATE("Encoding:")) - 2 * SEPARATOR_MARGIN,
y - 2, windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight); y - 2, windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
BMenuField* encodingField = new BMenuField(r, "encoding", BMenuField* encodingField = new BMenuField(r, "encoding",
TR("Encoding:"), fEncodingMenu, true /* fixedSize */, B_TRANSLATE("Encoding:"), fEncodingMenu, true /* fixedSize */,
B_FOLLOW_TOP | B_FOLLOW_RIGHT, B_FOLLOW_TOP | B_FOLLOW_RIGHT,
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP); B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
encodingField->SetDivider(encodingField->StringWidth(TR("Encoding:")) encodingField->SetDivider(encodingField->StringWidth(
+ 5); B_TRANSLATE("Encoding:")) + 5);
AddChild(encodingField); AddChild(encodingField);
field = encodingField; field = encodingField;
@@ -358,8 +360,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
} }
r.Set(SEPARATOR_MARGIN, y - 2, r.Set(SEPARATOR_MARGIN, y - 2,
field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight); field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight);
field = new BMenuField(r, "account", TR("From:"), fAccountMenu, field = new BMenuField(r, "account", B_TRANSLATE("From:"),
true /* fixedSize */, fAccountMenu, true /* fixedSize */,
B_FOLLOW_TOP | B_FOLLOW_LEFT_RIGHT, B_FOLLOW_TOP | B_FOLLOW_LEFT_RIGHT,
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP); B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
AddChild(field, encodingField); AddChild(field, encodingField);
@@ -374,8 +376,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight); windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
if (account) if (account)
r.right -= SEPARATOR_MARGIN + ACCOUNT_FIELD_WIDTH; r.right -= SEPARATOR_MARGIN + ACCOUNT_FIELD_WIDTH;
fAccountTo = new TTextControl(r, TR("To:"), NULL, fIncoming, false, fAccountTo = new TTextControl(r, B_TRANSLATE("To:"), NULL, fIncoming,
B_FOLLOW_LEFT_RIGHT); false, B_FOLLOW_LEFT_RIGHT);
fAccountTo->SetEnabled(false); fAccountTo->SetEnabled(false);
fAccountTo->SetDivider(x - 12 - SEPARATOR_MARGIN); fAccountTo->SetDivider(x - 12 - SEPARATOR_MARGIN);
fAccountTo->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT); fAccountTo->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
@@ -383,8 +385,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
if (account) { if (account) {
r.left = r.right + 6; r.right = windowRect.Width() - SEPARATOR_MARGIN; r.left = r.right + 6; r.right = windowRect.Width() - SEPARATOR_MARGIN;
fAccount = new TTextControl(r, TR("Account:"), NULL, fIncoming, fAccount = new TTextControl(r, B_TRANSLATE("Account:"), NULL,
false, B_FOLLOW_RIGHT | B_FOLLOW_TOP); fIncoming, false, B_FOLLOW_RIGHT | B_FOLLOW_TOP);
fAccount->SetEnabled(false); fAccount->SetEnabled(false);
AddChild(fAccount); AddChild(fAccount);
} }
@@ -395,8 +397,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
r.Set(SEPARATOR_MARGIN, y, r.Set(SEPARATOR_MARGIN, y,
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight); windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
y += controlHeight; y += controlHeight;
fSubject = new TTextControl(r, TR("Subject:"), new BMessage(SUBJECT_FIELD), fSubject = new TTextControl(r, B_TRANSLATE("Subject:"),
fIncoming, false, B_FOLLOW_LEFT_RIGHT); new BMessage(SUBJECT_FIELD),fIncoming, false, B_FOLLOW_LEFT_RIGHT);
AddChild(fSubject); AddChild(fSubject);
(msg = new BMessage(FIELD_CHANGED))->AddInt32("bitmask", FIELD_SUBJECT); (msg = new BMessage(FIELD_CHANGED))->AddInt32("bitmask", FIELD_SUBJECT);
fSubject->SetModificationMessage(msg); fSubject->SetModificationMessage(msg);
@@ -418,9 +420,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
fCc->SetModificationMessage(msg); fCc->SetModificationMessage(msg);
r.right = r.left - 5; r.right = r.left - 5;
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("Cc:")) + 25); r.left = r.right - ceilf(be_plain_font->StringWidth(
B_TRANSLATE("Cc:")) + 25);
r.top -= 1; r.top -= 1;
fCcMenu = new QPopupMenu(TR("Cc:")); fCcMenu = new QPopupMenu(B_TRANSLATE("Cc:"));
field = new BMenuField(r, "", "", fCcMenu, true, field = new BMenuField(r, "", "", fCcMenu, true,
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
@@ -428,7 +431,7 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
field->SetEnabled(true); field->SetEnabled(true);
AddChild(field); AddChild(field);
r.Set(BCC_FIELD_H + be_plain_font->StringWidth(TR("Bcc:")), y, r.Set(BCC_FIELD_H + be_plain_font->StringWidth(B_TRANSLATE("Bcc:")), y,
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight); windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
y += controlHeight; y += controlHeight;
fBcc = new TTextControl(r, "", new BMessage(BCC_FIELD), fBcc = new TTextControl(r, "", new BMessage(BCC_FIELD),
@@ -441,9 +444,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
fBcc->SetModificationMessage(msg); fBcc->SetModificationMessage(msg);
r.right = r.left - 5; r.right = r.left - 5;
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("Bcc:")) + 25); r.left = r.right - ceilf(be_plain_font->StringWidth(
B_TRANSLATE("Bcc:")) + 25);
r.top -= 1; r.top -= 1;
fBccMenu = new QPopupMenu(TR("Bcc:")); fBccMenu = new QPopupMenu(B_TRANSLATE("Bcc:"));
field = new BMenuField(r, "", "", fBccMenu, true, field = new BMenuField(r, "", "", fBccMenu, true,
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
field->SetDivider(0.0); field->SetDivider(0.0);
+9 -9
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -122,8 +122,8 @@ TMailApp::TMailApp()
// set default values // set default values
fContentFont.SetSize(12.0); fContentFont.SetSize(12.0);
fAutoMarkRead = true; fAutoMarkRead = true;
fSignature = (char*)malloc(strlen(TR("None")) + 1); fSignature = (char*)malloc(strlen(B_TRANSLATE("None")) + 1);
strcpy(fSignature, TR("None")); strcpy(fSignature, B_TRANSLATE("None"));
fReplyPreamble = (char*)malloc(1); fReplyPreamble = (char*)malloc(1);
fReplyPreamble[0] = '\0'; fReplyPreamble[0] = '\0';
@@ -149,7 +149,7 @@ TMailApp::~TMailApp()
void void
TMailApp::AboutRequested() TMailApp::AboutRequested()
{ {
BAlert *alert = new BAlert("about", TR("Mail\n\n" BAlert *alert = new BAlert("about", B_TRANSLATE("Mail\n\n"
"Written by Robert Polic.\n" "Written by Robert Polic.\n"
"Enhanced by the Dr. Zoidberg crew.\n\n" "Enhanced by the Dr. Zoidberg crew.\n\n"
"Copyright 1991-2001, Be Incorporated.\n" "Copyright 1991-2001, Be Incorporated.\n"
+8 -8
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -97,9 +97,9 @@ TMenu::BuildMenu()
BMessage *msg = new BMessage(M_RANDOM_SIG); BMessage *msg = new BMessage(M_RANDOM_SIG);
if (!fPopup) { if (!fPopup) {
AddItem(new BMenuItem(TR("Random"), msg, '0'), 0); AddItem(new BMenuItem(B_TRANSLATE("Random"), msg, '0'), 0);
} else { } else {
AddItem(new BMenuItem(TR("Random"), msg), 0); AddItem(new BMenuItem(B_TRANSLATE("Random"), msg), 0);
} }
} }
} }
+140 -116
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -202,11 +202,12 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
// File Menu // File Menu
menu = new BMenu(TR("File")); menu = new BMenu(B_TRANSLATE("File"));
msg = new BMessage(M_NEW); msg = new BMessage(M_NEW);
msg->AddInt32("type", M_NEW); msg->AddInt32("type", M_NEW);
menu->AddItem(item = new BMenuItem(TR("New mail message"), msg, 'N')); menu->AddItem(item = new BMenuItem(B_TRANSLATE("New mail message"),
msg, 'N'));
item->SetTarget(be_app); item->SetTarget(be_app);
// Cheap hack - only show the drafts menu when composing messages. Insert // Cheap hack - only show the drafts menu when composing messages. Insert
@@ -222,7 +223,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
if (!fIncoming) { if (!fIncoming) {
QueryMenu *queryMenu; QueryMenu *queryMenu;
queryMenu = new QueryMenu(TR("Open draft"), false); queryMenu = new QueryMenu(B_TRANSLATE("Open draft"), false);
queryMenu->SetTargetForItems(be_app); queryMenu->SetTargetForItems(be_app);
queryMenu->SetPredicate("MAIL:draft==1"); queryMenu->SetPredicate("MAIL:draft==1");
@@ -230,32 +231,32 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
} }
if (!fIncoming || resending) { if (!fIncoming || resending) {
menu->AddItem(fSendLater = new BMenuItem(TR("Save as draft"), menu->AddItem(fSendLater = new BMenuItem(B_TRANSLATE("Save as draft"),
new BMessage(M_SAVE_AS_DRAFT), 'S')); new BMessage(M_SAVE_AS_DRAFT), 'S'));
} }
if (!resending && fIncoming) { if (!resending && fIncoming) {
menu->AddSeparatorItem(); menu->AddSeparatorItem();
subMenu = new BMenu(TR("Close and ")); subMenu = new BMenu(B_TRANSLATE("Close and "));
if (file.GetAttrInfo(B_MAIL_ATTR_STATUS, &info) == B_NO_ERROR) if (file.GetAttrInfo(B_MAIL_ATTR_STATUS, &info) == B_NO_ERROR)
file.ReadAttr(B_MAIL_ATTR_STATUS, B_STRING_TYPE, 0, str, info.size); file.ReadAttr(B_MAIL_ATTR_STATUS, B_STRING_TYPE, 0, str, info.size);
else else
str[0] = 0; str[0] = 0;
if (!strcmp(str, "New")) { if (!strcmp(str, "New")) {
subMenu->AddItem(item = new BMenuItem(TR("Leave as New"), subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Leave as New"),
new BMessage(M_CLOSE_SAME), 'W', B_SHIFT_KEY)); new BMessage(M_CLOSE_SAME), 'W', B_SHIFT_KEY));
#if 0 #if 0
subMenu->AddItem(item = new BMenuItem(TR("Set to Read"), subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Set to Read"),
new BMessage(M_CLOSE_READ), 'W')); new BMessage(M_CLOSE_READ), 'W'));
#endif #endif
message = M_CLOSE_READ; message = M_CLOSE_READ;
} else { } else {
if (strlen(str)) if (strlen(str))
sprintf(status, TR("Leave as '%s'"), str); sprintf(status, B_TRANSLATE("Leave as '%s'"), str);
else else
sprintf(status, TR("Leave same")); sprintf(status, B_TRANSLATE("Leave same"));
subMenu->AddItem(item = new BMenuItem(status, subMenu->AddItem(item = new BMenuItem(status,
new BMessage(M_CLOSE_SAME), 'W')); new BMessage(M_CLOSE_SAME), 'W'));
message = M_CLOSE_SAME; message = M_CLOSE_SAME;
@@ -263,87 +264,93 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
new BMessage(M_CLOSE_SAME)); new BMessage(M_CLOSE_SAME));
} }
subMenu->AddItem(new BMenuItem(TR("Move to trash"), subMenu->AddItem(new BMenuItem(B_TRANSLATE("Move to trash"),
new BMessage(M_DELETE), 'T', B_CONTROL_KEY)); new BMessage(M_DELETE), 'T', B_CONTROL_KEY));
AddShortcut('T', B_SHIFT_KEY | B_COMMAND_KEY, AddShortcut('T', B_SHIFT_KEY | B_COMMAND_KEY,
new BMessage(M_DELETE_NEXT)); new BMessage(M_DELETE_NEXT));
subMenu->AddSeparatorItem(); subMenu->AddSeparatorItem();
subMenu->AddItem(new BMenuItem(TR("Set to Saved"), subMenu->AddItem(new BMenuItem(B_TRANSLATE("Set to Saved"),
new BMessage(M_CLOSE_SAVED), 'W', B_CONTROL_KEY)); new BMessage(M_CLOSE_SAVED), 'W', B_CONTROL_KEY));
if (add_query_menu_items(subMenu, INDEX_STATUS, M_STATUS, if (add_query_menu_items(subMenu, INDEX_STATUS, M_STATUS,
TR("Set to %s")) > 0) B_TRANSLATE("Set to %s")) > 0)
subMenu->AddSeparatorItem(); subMenu->AddSeparatorItem();
subMenu->AddItem(new BMenuItem(TR("Set to" B_UTF8_ELLIPSIS), subMenu->AddItem(new BMenuItem(B_TRANSLATE("Set to" B_UTF8_ELLIPSIS),
new BMessage(M_CLOSE_CUSTOM))); new BMessage(M_CLOSE_CUSTOM)));
#if 0 #if 0
subMenu->AddItem(new BMenuItem(new TMenu( subMenu->AddItem(new BMenuItem(new TMenu(
TR("Set to" B_UTF8_ELLIPSIS), INDEX_STATUS, M_STATUS, false, false), B_TRANSLATE("Set to" B_UTF8_ELLIPSIS), INDEX_STATUS, M_STATUS,
false, false),
new BMessage(M_CLOSE_CUSTOM))); new BMessage(M_CLOSE_CUSTOM)));
#endif #endif
menu->AddItem(subMenu); menu->AddItem(subMenu);
} else { } else {
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(TR("Close"), menu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
new BMessage(B_CLOSE_REQUESTED), 'W')); new BMessage(B_CLOSE_REQUESTED), 'W'));
} }
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fPrint = new BMenuItem(TR("Page setup" B_UTF8_ELLIPSIS), menu->AddItem(fPrint = new BMenuItem(
B_TRANSLATE("Page setup" B_UTF8_ELLIPSIS),
new BMessage(M_PRINT_SETUP))); new BMessage(M_PRINT_SETUP)));
menu->AddItem(fPrint = new BMenuItem(TR("Print" B_UTF8_ELLIPSIS), menu->AddItem(fPrint = new BMenuItem(
B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
new BMessage(M_PRINT), 'P')); new BMessage(M_PRINT), 'P'));
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("About Mail" B_UTF8_ELLIPSIS), B_TRANSLATE("About Mail" B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED))); new BMessage(B_ABOUT_REQUESTED)));
item->SetTarget(be_app); item->SetTarget(be_app);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(TR("Quit"), menu->AddItem(item = new BMenuItem(B_TRANSLATE("Quit"),
new BMessage(B_QUIT_REQUESTED), 'Q')); new BMessage(B_QUIT_REQUESTED), 'Q'));
item->SetTarget(be_app); item->SetTarget(be_app);
// Edit Menu // Edit Menu
menu = new BMenu(TR("Edit")); menu = new BMenu(B_TRANSLATE("Edit"));
menu->AddItem(fUndo = new BMenuItem(TR("Undo"), new BMessage(B_UNDO), menu->AddItem(fUndo = new BMenuItem(B_TRANSLATE("Undo"),
'Z', 0)); new BMessage(B_UNDO), 'Z', 0));
fUndo->SetTarget(NULL, this); fUndo->SetTarget(NULL, this);
menu->AddItem(fRedo = new BMenuItem(TR("Redo"), new BMessage(M_REDO), menu->AddItem(fRedo = new BMenuItem(B_TRANSLATE("Redo"),
'Z', B_SHIFT_KEY)); new BMessage(M_REDO), 'Z', B_SHIFT_KEY));
fRedo->SetTarget(NULL, this); fRedo->SetTarget(NULL, this);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fCut = new BMenuItem(TR("Cut"), new BMessage(B_CUT), 'X')); menu->AddItem(fCut = new BMenuItem(B_TRANSLATE("Cut"),
new BMessage(B_CUT), 'X'));
fCut->SetTarget(NULL, this); fCut->SetTarget(NULL, this);
menu->AddItem(fCopy = new BMenuItem(TR("Copy"), new BMessage(B_COPY), 'C')); menu->AddItem(fCopy = new BMenuItem(B_TRANSLATE("Copy"),
new BMessage(B_COPY), 'C'));
fCopy->SetTarget(NULL, this); fCopy->SetTarget(NULL, this);
menu->AddItem(fPaste = new BMenuItem(TR("Paste"), new BMessage(B_PASTE), menu->AddItem(fPaste = new BMenuItem(B_TRANSLATE("Paste"),
new BMessage(B_PASTE),
'V')); 'V'));
fPaste->SetTarget(NULL, this); fPaste->SetTarget(NULL, this);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(TR("Select all"), new BMessage(M_SELECT), menu->AddItem(item = new BMenuItem(B_TRANSLATE("Select all"),
'A')); new BMessage(M_SELECT), 'A'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
item->SetTarget(NULL, this); item->SetTarget(NULL, this);
menu->AddItem(new BMenuItem(TR("Find" B_UTF8_ELLIPSIS), menu->AddItem(new BMenuItem(B_TRANSLATE("Find" B_UTF8_ELLIPSIS),
new BMessage(M_FIND), 'F')); new BMessage(M_FIND), 'F'));
menu->AddItem(new BMenuItem(TR("Find again"), new BMessage(M_FIND_AGAIN), menu->AddItem(new BMenuItem(B_TRANSLATE("Find again"),
'G')); new BMessage(M_FIND_AGAIN), 'G'));
if (!fIncoming) { if (!fIncoming) {
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fQuote =new BMenuItem(TR("Quote"), menu->AddItem(fQuote =new BMenuItem(B_TRANSLATE("Quote"),
new BMessage(M_QUOTE), B_RIGHT_ARROW)); new BMessage(M_QUOTE), B_RIGHT_ARROW));
menu->AddItem(fRemoveQuote = new BMenuItem(TR("Remove quote"), menu->AddItem(fRemoveQuote = new BMenuItem(B_TRANSLATE("Remove quote"),
new BMessage(M_REMOVE_QUOTE), B_LEFT_ARROW)); new BMessage(M_REMOVE_QUOTE), B_LEFT_ARROW));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
fSpelling = new BMenuItem(TR("Check spelling"), fSpelling = new BMenuItem(B_TRANSLATE("Check spelling"),
new BMessage(M_CHECK_SPELLING), ';'); new BMessage(M_CHECK_SPELLING), ';');
menu->AddItem(fSpelling); menu->AddItem(fSpelling);
if (fApp->StartWithSpellCheckOn()) if (fApp->StartWithSpellCheckOn())
@@ -351,63 +358,64 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
} }
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("Preferences" B_UTF8_ELLIPSIS), B_TRANSLATE("Preferences" B_UTF8_ELLIPSIS),
new BMessage(M_PREFS),',')); new BMessage(M_PREFS),','));
item->SetTarget(be_app); item->SetTarget(be_app);
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("Accounts" B_UTF8_ELLIPSIS), B_TRANSLATE("Accounts" B_UTF8_ELLIPSIS),
new BMessage(M_ACCOUNTS),'-')); new BMessage(M_ACCOUNTS),'-'));
item->SetTarget(be_app); item->SetTarget(be_app);
// View Menu // View Menu
if (!resending && fIncoming) { if (!resending && fIncoming) {
menu = new BMenu(TR("View")); menu = new BMenu(B_TRANSLATE("View"));
menu->AddItem(fHeader = new BMenuItem(TR("Show header"), menu->AddItem(fHeader = new BMenuItem(B_TRANSLATE("Show header"),
new BMessage(M_HEADER), 'H')); new BMessage(M_HEADER), 'H'));
menu->AddItem(fRaw = new BMenuItem(TR("Show raw message"), menu->AddItem(fRaw = new BMenuItem(B_TRANSLATE("Show raw message"),
new BMessage(M_RAW))); new BMessage(M_RAW)));
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
} }
// Message Menu // Message Menu
menu = new BMenu(TR("Message")); menu = new BMenu(B_TRANSLATE("Message"));
if (!resending && fIncoming) { if (!resending && fIncoming) {
BMenuItem *menuItem; BMenuItem *menuItem;
menu->AddItem(new BMenuItem(TR("Reply"), new BMessage(M_REPLY),'R')); menu->AddItem(new BMenuItem(B_TRANSLATE("Reply"),
menu->AddItem(new BMenuItem(TR("Reply to sender"), new BMessage(M_REPLY),'R'));
menu->AddItem(new BMenuItem(B_TRANSLATE("Reply to sender"),
new BMessage(M_REPLY_TO_SENDER),'R',B_OPTION_KEY)); new BMessage(M_REPLY_TO_SENDER),'R',B_OPTION_KEY));
menu->AddItem(new BMenuItem(TR("Reply to all"), menu->AddItem(new BMenuItem(B_TRANSLATE("Reply to all"),
new BMessage(M_REPLY_ALL), 'R', B_SHIFT_KEY)); new BMessage(M_REPLY_ALL), 'R', B_SHIFT_KEY));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(TR("Forward"), new BMessage(M_FORWARD), menu->AddItem(new BMenuItem(B_TRANSLATE("Forward"),
'J')); new BMessage(M_FORWARD), 'J'));
menu->AddItem(new BMenuItem(TR("Forward without attachments"), menu->AddItem(new BMenuItem(B_TRANSLATE("Forward without attachments"),
new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS))); new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS)));
menu->AddItem(menuItem = new BMenuItem(TR("Resend"), menu->AddItem(menuItem = new BMenuItem(B_TRANSLATE("Resend"),
new BMessage(M_RESEND))); new BMessage(M_RESEND)));
menu->AddItem(menuItem = new BMenuItem(TR("Copy to new"), menu->AddItem(menuItem = new BMenuItem(B_TRANSLATE("Copy to new"),
new BMessage(M_COPY_TO_NEW), 'D')); new BMessage(M_COPY_TO_NEW), 'D'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
fDeleteNext = new BMenuItem(TR("Move to trash"), fDeleteNext = new BMenuItem(B_TRANSLATE("Move to trash"),
new BMessage(M_DELETE_NEXT), 'T'); new BMessage(M_DELETE_NEXT), 'T');
menu->AddItem(fDeleteNext); menu->AddItem(fDeleteNext);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
fPrevMsg = new BMenuItem(TR("Previous message"), fPrevMsg = new BMenuItem(B_TRANSLATE("Previous message"),
new BMessage(M_PREVMSG), B_UP_ARROW); new BMessage(M_PREVMSG), B_UP_ARROW);
menu->AddItem(fPrevMsg); menu->AddItem(fPrevMsg);
fNextMsg = new BMenuItem(TR("Next message"), new BMessage(M_NEXTMSG), fNextMsg = new BMenuItem(B_TRANSLATE("Next message"),
B_DOWN_ARROW); new BMessage(M_NEXTMSG), B_DOWN_ARROW);
menu->AddItem(fNextMsg); menu->AddItem(fNextMsg);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
fSaveAddrMenu = subMenu = new BMenu(TR("Save address")); fSaveAddrMenu = subMenu = new BMenu(B_TRANSLATE("Save address"));
// create the list of addresses // create the list of addresses
@@ -462,23 +470,24 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
} }
} else { } else {
menu->AddItem(fSendNow = new BMenuItem(TR("Send message"), menu->AddItem(fSendNow = new BMenuItem(B_TRANSLATE("Send message"),
new BMessage(M_SEND_NOW), 'M')); new BMessage(M_SEND_NOW), 'M'));
if (!fIncoming) { if (!fIncoming) {
menu->AddSeparatorItem(); menu->AddSeparatorItem();
fSignature = new TMenu(TR("Add signature"), INDEX_SIGNATURE, fSignature = new TMenu(B_TRANSLATE("Add signature"),
M_SIGNATURE); INDEX_SIGNATURE, M_SIGNATURE);
menu->AddItem(new BMenuItem(fSignature)); menu->AddItem(new BMenuItem(fSignature));
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("Edit signatures" B_UTF8_ELLIPSIS), B_TRANSLATE("Edit signatures" B_UTF8_ELLIPSIS),
new BMessage(M_EDIT_SIGNATURE))); new BMessage(M_EDIT_SIGNATURE)));
item->SetTarget(be_app); item->SetTarget(be_app);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fAdd = new BMenuItem(TR( menu->AddItem(fAdd = new BMenuItem(
"Add enclosure" B_UTF8_ELLIPSIS), B_TRANSLATE("Add enclosure" B_UTF8_ELLIPSIS),
new BMessage(M_ADD), 'E')); new BMessage(M_ADD), 'E'));
menu->AddItem(fRemove = new BMenuItem(TR("Remove enclosure"), menu->AddItem(fRemove = new BMenuItem(
B_TRANSLATE("Remove enclosure"),
new BMessage(M_REMOVE), 'T')); new BMessage(M_REMOVE), 'T'));
} }
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
@@ -486,7 +495,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
// Queries Menu // Queries Menu
fQueryMenu = new BMenu(TR("Queries")); fQueryMenu = new BMenu(B_TRANSLATE("Queries"));
fMenuBar->AddItem(fQueryMenu); fMenuBar->AddItem(fQueryMenu);
_RebuildQueryMenu(true); _RebuildQueryMenu(true);
@@ -543,8 +552,8 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
BString signature = fApp->Signature(); BString signature = fApp->Signature();
if (!fIncoming && strcmp(signature.String(), TR("None")) != 0) { if (!fIncoming && strcmp(signature.String(), B_TRANSLATE("None")) != 0) {
if (strcmp(signature.String(), TR("Random")) == 0) if (strcmp(signature.String(), B_TRANSLATE("Random")) == 0)
PostMessage(M_RANDOM_SIG); PostMessage(M_RANDOM_SIG);
else { else {
// Create a query to find this signature // Create a query to find this signature
@@ -602,41 +611,47 @@ TMailWindow::BuildButtonBar()
bbar = new ButtonBar(BRect(0, 0, 100, 100), "ButtonBar", 2, 3, 0, 1, 10, bbar = new ButtonBar(BRect(0, 0, 100, 100), "ButtonBar", 2, 3, 0, 1, 10,
2); 2);
bbar->AddButton(TR("New"), 28, new BMessage(M_NEW)); bbar->AddButton(B_TRANSLATE("New"), 28, new BMessage(M_NEW));
bbar->AddDivider(5); bbar->AddDivider(5);
fButtonBar = bbar; fButtonBar = bbar;
if (fResending) { if (fResending) {
fSendButton = bbar->AddButton(TR("Send"), 8, new BMessage(M_SEND_NOW)); fSendButton = bbar->AddButton(B_TRANSLATE("Send"), 8,
new BMessage(M_SEND_NOW));
bbar->AddDivider(5); bbar->AddDivider(5);
} else if (!fIncoming) { } else if (!fIncoming) {
fSendButton = bbar->AddButton(TR("Send"), 8, new BMessage(M_SEND_NOW)); fSendButton = bbar->AddButton(B_TRANSLATE("Send"), 8,
new BMessage(M_SEND_NOW));
fSendButton->SetEnabled(false); fSendButton->SetEnabled(false);
fSigButton = bbar->AddButton(TR("Signature"), 4, fSigButton = bbar->AddButton(B_TRANSLATE("Signature"), 4,
new BMessage(M_SIG_MENU)); new BMessage(M_SIG_MENU));
fSigButton->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON); fSigButton->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
fSaveButton = bbar->AddButton(TR("Save"), 44, fSaveButton = bbar->AddButton(B_TRANSLATE("Save"), 44,
new BMessage(M_SAVE_AS_DRAFT)); new BMessage(M_SAVE_AS_DRAFT));
fSaveButton->SetEnabled(false); fSaveButton->SetEnabled(false);
fPrintButton = bbar->AddButton(TR("Print"), 16, new BMessage(M_PRINT)); fPrintButton = bbar->AddButton(B_TRANSLATE("Print"), 16,
new BMessage(M_PRINT));
fPrintButton->SetEnabled(false); fPrintButton->SetEnabled(false);
bbar->AddButton(TR("Trash"), 0, new BMessage(M_DELETE)); bbar->AddButton(B_TRANSLATE("Trash"), 0, new BMessage(M_DELETE));
bbar->AddDivider(5); bbar->AddDivider(5);
} else { } else {
BmapButton *button = bbar->AddButton(TR("Reply"), 12, BmapButton *button = bbar->AddButton(B_TRANSLATE("Reply"), 12,
new BMessage(M_REPLY)); new BMessage(M_REPLY));
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON); button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
button = bbar->AddButton(TR("Forward"), 40, new BMessage(M_FORWARD)); button = bbar->AddButton(B_TRANSLATE("Forward"), 40,
new BMessage(M_FORWARD));
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON); button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
fPrintButton = bbar->AddButton(TR("Print"), 16, new BMessage(M_PRINT)); fPrintButton = bbar->AddButton(B_TRANSLATE("Print"), 16,
bbar->AddButton(TR("Trash"), 0, new BMessage(M_DELETE_NEXT)); new BMessage(M_PRINT));
bbar->AddButton(B_TRANSLATE("Trash"), 0, new BMessage(M_DELETE_NEXT));
if (fApp->ShowSpamGUI()) { if (fApp->ShowSpamGUI()) {
button = bbar->AddButton("Spam", 48, new BMessage(M_SPAM_BUTTON)); button = bbar->AddButton("Spam", 48, new BMessage(M_SPAM_BUTTON));
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON); button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
} }
bbar->AddDivider(5); bbar->AddDivider(5);
fNextButton = bbar->AddButton(TR("Next"), 24, new BMessage(M_NEXTMSG)); fNextButton = bbar->AddButton(B_TRANSLATE("Next"), 24,
bbar->AddButton(TR("Previous"), 20, new BMessage(M_PREVMSG)); new BMessage(M_NEXTMSG));
bbar->AddButton(B_TRANSLATE("Previous"), 20, new BMessage(M_PREVMSG));
if (!fAutoMarkRead) { if (!fAutoMarkRead) {
_AddReadButton(); _AddReadButton();
} }
@@ -1053,10 +1068,11 @@ TMailWindow::MessageReceived(BMessage *msg)
if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK
&& buttons == B_SECONDARY_MOUSE_BUTTON) { && buttons == B_SECONDARY_MOUSE_BUTTON) {
BPopUpMenu menu("Reply To", false, false); BPopUpMenu menu("Reply To", false, false);
menu.AddItem(new BMenuItem(TR("Reply"),new BMessage(M_REPLY))); menu.AddItem(new BMenuItem(B_TRANSLATE("Reply"),
menu.AddItem(new BMenuItem(TR("Reply to sender"), new BMessage(M_REPLY)));
menu.AddItem(new BMenuItem(B_TRANSLATE("Reply to sender"),
new BMessage(M_REPLY_TO_SENDER))); new BMessage(M_REPLY_TO_SENDER)));
menu.AddItem(new BMenuItem(TR("Reply to all"), menu.AddItem(new BMenuItem(B_TRANSLATE("Reply to all"),
new BMessage(M_REPLY_ALL))); new BMessage(M_REPLY_ALL)));
BPoint where; BPoint where;
@@ -1079,9 +1095,10 @@ TMailWindow::MessageReceived(BMessage *msg)
if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK
&& buttons == B_SECONDARY_MOUSE_BUTTON) { && buttons == B_SECONDARY_MOUSE_BUTTON) {
BPopUpMenu menu("Forward", false, false); BPopUpMenu menu("Forward", false, false);
menu.AddItem(new BMenuItem(TR("Forward"), menu.AddItem(new BMenuItem(B_TRANSLATE("Forward"),
new BMessage(M_FORWARD))); new BMessage(M_FORWARD)));
menu.AddItem(new BMenuItem(TR("Forward without attachments"), menu.AddItem(new BMenuItem(
B_TRANSLATE("Forward without attachments"),
new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS))); new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS)));
BPoint where; BPoint where;
@@ -1140,8 +1157,8 @@ TMailWindow::MessageReceived(BMessage *msg)
tracker.SendMessage(&msg); tracker.SendMessage(&msg);
} else { } else {
(new BAlert("", (new BAlert("",
TR("Need Tracker to move items to trash"), B_TRANSLATE("Need Tracker to move items to trash"),
TR("Sorry")))->Go(); B_TRANSLATE("Sorry")))->Go();
} }
} }
} else { } else {
@@ -1297,9 +1314,10 @@ TMailWindow::MessageReceived(BMessage *msg)
1, &arg); 1, &arg);
if (result != B_NO_ERROR) if (result != B_NO_ERROR)
(new BAlert("", TR( (new BAlert("", B_TRANSLATE(
"Sorry, could not find an application that supports" "Sorry, could not find an application that "
" the 'Person' data type."), TR("OK")))->Go(); "supports the 'Person' data type."),
B_TRANSLATE("OK")))->Go();
} }
free(arg); free(arg);
} }
@@ -1512,9 +1530,9 @@ TMailWindow::MessageReceived(BMessage *msg)
if (!gDictCount) { if (!gDictCount) {
beep(); beep();
(new BAlert("", (new BAlert("",
TR("Mail couldn't find its dictionary."), B_TRANSLATE("Mail couldn't find its dictionary."),
TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
B_STOP_ALERT))->Go(); B_OFFSET_SPACING, B_STOP_ALERT))->Go();
} else { } else {
fSpelling->SetMarked(!fSpelling->IsMarked()); fSpelling->SetMarked(!fSpelling->IsMarked());
fContentView->fTextView->EnableSpellCheck( fContentView->fTextView->EnableSpellCheck(
@@ -1622,9 +1640,11 @@ TMailWindow::QuitRequested()
|| (fEnclosuresView != NULL || (fEnclosuresView != NULL
&& fEnclosuresView->fList->CountItems()))) { && fEnclosuresView->fList->CountItems()))) {
if (fResending) { if (fResending) {
BAlert *alert = new BAlert("", BAlert *alert = new BAlert("", B_TRANSLATE(
TR("Do you wish to send this message before closing?"), "Do you wish to send this message before closing?"),
TR("Discard"), TR("Cancel"), TR("Send"), B_TRANSLATE("Discard"),
B_TRANSLATE("Cancel"),
B_TRANSLATE("Send"),
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT);
alert->SetShortcut(0, 'd'); alert->SetShortcut(0, 'd');
alert->SetShortcut(1, B_ESCAPE); alert->SetShortcut(1, B_ESCAPE);
@@ -1641,9 +1661,11 @@ TMailWindow::QuitRequested()
} }
} else { } else {
BAlert *alert = new BAlert("", BAlert *alert = new BAlert("",
TR("Do you wish to save this message as a draft before closing?" B_TRANSLATE("Do you wish to save this message as a draft "
), "before closing?"),
TR("Don't save"), TR("Cancel"), TR("Save"), B_TRANSLATE("Don't save"),
B_TRANSLATE("Cancel"),
B_TRANSLATE("Save"),
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT);
alert->SetShortcut(0, 'd'); alert->SetShortcut(0, 'd');
alert->SetShortcut(1, B_ESCAPE); alert->SetShortcut(1, B_ESCAPE);
@@ -2201,8 +2223,8 @@ TMailWindow::Send(bool now)
status_t status = SaveAsDraft(); status_t status = SaveAsDraft();
if (status != B_OK) { if (status != B_OK) {
beep(); beep();
(new BAlert("", TR("E-mail draft could not be saved!"), (new BAlert("", B_TRANSLATE("E-mail draft could not be saved!"),
TR("OK")))->Go(); B_TRANSLATE("OK")))->Go();
} }
return status; return status;
} }
@@ -2283,7 +2305,7 @@ TMailWindow::Send(bool now)
BString messageString; BString messageString;
BString countString; BString countString;
countString << count; countString << count;
messageString << TR("Your main text contains %ld" messageString << B_TRANSLATE("Your main text contains %ld"
" unencodable characters. Perhaps a different " " unencodable characters. Perhaps a different "
"character set would work better? Hit Send to send it " "character set would work better? Hit Send to send it "
"anyway " "anyway "
@@ -2292,8 +2314,8 @@ TMailWindow::Send(bool now)
"and try fixing it up."); "and try fixing it up.");
messageString.ReplaceFirst("%ld", countString); messageString.ReplaceFirst("%ld", countString);
userAnswer = (new BAlert("Question", messageString.String(), userAnswer = (new BAlert("Question", messageString.String(),
TR("Send"), B_TRANSLATE("Send"),
TR("Cancel"), B_TRANSLATE("Cancel"),
NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
B_WARNING_ALERT))->Go(); B_WARNING_ALERT))->Go();
if (userAnswer == 1) { if (userAnswer == 1) {
@@ -2427,9 +2449,9 @@ TMailWindow::Send(bool now)
fSent = true; fSent = true;
int32 start = (new BAlert("no daemon", int32 start = (new BAlert("no daemon",
TR("The mail_daemon is not running. The message is queued and " B_TRANSLATE("The mail_daemon is not running. The message is "
"will be sent when the mail_daemon is started."), "queued and will be sent when the mail_daemon is started."),
TR("Start now"), TR("OK")))->Go(); B_TRANSLATE("Start now"), B_TRANSLATE("OK")))->Go();
if (start == 0) { if (start == 0) {
result = be_roster->Launch("application/x-vnd.Be-POST"); result = be_roster->Launch("application/x-vnd.Be-POST");
@@ -2437,7 +2459,8 @@ TMailWindow::Send(bool now)
BMailDaemon::SendQueuedMail(); BMailDaemon::SendQueuedMail();
} else { } else {
errorMessage errorMessage
<< TR("The mail_daemon could not be started:\n\t") << B_TRANSLATE("The mail_daemon could not be "
"started:\n\t")
<< strerror(result); << strerror(result);
} }
} }
@@ -2464,7 +2487,7 @@ TMailWindow::Send(bool now)
if (result != B_NO_ERROR && result != B_MAIL_NO_DAEMON) { if (result != B_NO_ERROR && result != B_MAIL_NO_DAEMON) {
beep(); beep();
(new BAlert("", errorMessage.String(), TR("OK")))->Go(); (new BAlert("", errorMessage.String(), B_TRANSLATE("OK")))->Go();
} }
if (close) { if (close) {
PostMessage(B_QUIT_REQUESTED); PostMessage(B_QUIT_REQUESTED);
@@ -2687,7 +2710,7 @@ ErrorExit:
"Possibly useful error code: %s (%ld).", "Possibly useful error code: %s (%ld).",
filePath.Path(), CommandWord, strerror (errorCode), errorCode); filePath.Path(), CommandWord, strerror (errorCode), errorCode);
(new BAlert("", errorString, (new BAlert("", errorString,
TR("OK")))->Go(); B_TRANSLATE("OK")))->Go();
return errorCode; return errorCode;
} }
@@ -2973,7 +2996,8 @@ TMailWindow::_RebuildQueryMenu(bool firstTime)
delete item; delete item;
} }
fQueryMenu->AddItem(new BMenuItem(TR("Edit queries" B_UTF8_ELLIPSIS), fQueryMenu->AddItem(new BMenuItem(B_TRANSLATE("Edit queries"
B_UTF8_ELLIPSIS),
new BMessage(M_EDIT_QUERIES), 'E', B_SHIFT_KEY)); new BMessage(M_EDIT_QUERIES), 'E', B_SHIFT_KEY));
bool queryItemsAdded = false; bool queryItemsAdded = false;
@@ -3138,10 +3162,10 @@ TMailWindow::_AddReadButton()
int32 buttonIndex = fButtonBar->IndexOf(fNextButton); int32 buttonIndex = fButtonBar->IndexOf(fNextButton);
if (newMail) if (newMail)
fReadButton = fButtonBar->AddButton( fReadButton = fButtonBar->AddButton(
TR(" Read "), 24, new BMessage(M_READ), buttonIndex); B_TRANSLATE(" Read "), 24, new BMessage(M_READ), buttonIndex);
else else
fReadButton = fButtonBar->AddButton( fReadButton = fButtonBar->AddButton(
TR("Unread"), 28, new BMessage(M_UNREAD), buttonIndex); B_TRANSLATE("Unread"), 28, new BMessage(M_UNREAD), buttonIndex);
} }
+66 -52
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -101,7 +101,7 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
char** preamble, char** sig, uint32* encoding, bool* warnUnencodable, char** preamble, char** sig, uint32* encoding, bool* warnUnencodable,
bool* spellCheckStartOn, bool* autoMarkRead, uint8* buttonBar) bool* spellCheckStartOn, bool* autoMarkRead, uint8* buttonBar)
: :
BWindow(rect, TR("Mail preferences"), BWindow(rect, B_TRANSLATE("Mail preferences"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS), | B_AUTO_UPDATE_SIZE_LIMITS),
@@ -161,19 +161,20 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
interfaceLayout->AlignLayoutWith(mailLayout, B_HORIZONTAL); interfaceLayout->AlignLayoutWith(mailLayout, B_HORIZONTAL);
BBox* interfaceBox = new BBox(B_FANCY_BORDER, interfaceView); BBox* interfaceBox = new BBox(B_FANCY_BORDER, interfaceView);
interfaceBox->SetLabel(TR("User interface")); interfaceBox->SetLabel(B_TRANSLATE("User interface"));
BBox* mailBox = new BBox(B_FANCY_BORDER, mailView); BBox* mailBox = new BBox(B_FANCY_BORDER, mailView);
mailBox->SetLabel(TR("Mailing")); mailBox->SetLabel(B_TRANSLATE("Mailing"));
// revert, ok & cancel // revert, ok & cancel
BButton* okButton = new BButton("ok", TR("OK"), new BMessage(P_OK)); BButton* okButton = new BButton("ok", B_TRANSLATE("OK"),
new BMessage(P_OK));
okButton->MakeDefault(true); okButton->MakeDefault(true);
BButton* cancelButton = new BButton("cancel", TR("Cancel"), BButton* cancelButton = new BButton("cancel", B_TRANSLATE("Cancel"),
new BMessage(P_CANCEL)); new BMessage(P_CANCEL));
fRevert = new BButton("revert", TR("Revert"), fRevert = new BButton("revert", B_TRANSLATE("Revert"),
new BMessage(P_REVERT)); new BMessage(P_REVERT));
fRevert->SetEnabled(false); fRevert->SetEnabled(false);
@@ -181,47 +182,53 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
int32 layoutRow = 0; int32 layoutRow = 0;
fButtonBarMenu = _BuildButtonBarMenu(*buttonBar); fButtonBarMenu = _BuildButtonBarMenu(*buttonBar);
menu = new BMenuField("bar", TR("Button bar:"), fButtonBarMenu, NULL); menu = new BMenuField("bar", B_TRANSLATE("Button bar:"),
fButtonBarMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
fFontMenu = _BuildFontMenu(font); fFontMenu = _BuildFontMenu(font);
menu = new BMenuField("font", TR("Font:"), fFontMenu, NULL); menu = new BMenuField("font", B_TRANSLATE("Font:"),
fFontMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
fSizeMenu = _BuildSizeMenu(font); fSizeMenu = _BuildSizeMenu(font);
menu = new BMenuField("size", TR("Size:"), fSizeMenu, NULL); menu = new BMenuField("size", B_TRANSLATE("Size:"), fSizeMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
fColoredQuotesMenu = _BuildColoredQuotesMenu(fColoredQuotes); fColoredQuotesMenu = _BuildColoredQuotesMenu(fColoredQuotes);
menu = new BMenuField("cquotes", TR("Colored quotes:"), fColoredQuotesMenu, menu = new BMenuField("cquotes", B_TRANSLATE("Colored quotes:"),
NULL); fColoredQuotesMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
fSpellCheckStartOnMenu = _BuildSpellCheckStartOnMenu(fSpellCheckStartOn); fSpellCheckStartOnMenu = _BuildSpellCheckStartOnMenu(fSpellCheckStartOn);
menu = new BMenuField("spellCheckStartOn", TR("Initial spell check mode:"), menu = new BMenuField("spellCheckStartOn",
B_TRANSLATE("Initial spell check mode:"),
fSpellCheckStartOnMenu, NULL); fSpellCheckStartOnMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead); fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead);
menu = new BMenuField("autoMarkRead", menu = new BMenuField("autoMarkRead",
TR("Automatically mark mail as read:"), fAutoMarkReadMenu, NULL); B_TRANSLATE("Automatically mark mail as read:"),
fAutoMarkReadMenu, NULL);
add_menu_to_layout(menu, interfaceLayout, layoutRow); add_menu_to_layout(menu, interfaceLayout, layoutRow);
// Mail Accounts // Mail Accounts
layoutRow = 0; layoutRow = 0;
fAccountMenu = _BuildAccountMenu(fAccount); fAccountMenu = _BuildAccountMenu(fAccount);
menu = new BMenuField("account", TR("Default account:"), fAccountMenu, menu = new BMenuField("account", B_TRANSLATE("Default account:"),
NULL); fAccountMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
fReplyToMenu = _BuildReplyToMenu(fReplyTo); fReplyToMenu = _BuildReplyToMenu(fReplyTo);
menu = new BMenuField("replyTo", TR("Reply account:"), fReplyToMenu, NULL); menu = new BMenuField("replyTo", B_TRANSLATE("Reply account:"),
fReplyToMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
// Mail Contents // Mail Contents
fReplyPreamble = new BTextControl("replytext", TR("Reply preamble:"), fReplyPreamble = new BTextControl("replytext",
B_TRANSLATE("Reply preamble:"),
*preamble, new BMessage(P_REPLY_PREAMBLE)); *preamble, new BMessage(P_REPLY_PREAMBLE));
fReplyPreamble->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT); fReplyPreamble->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
@@ -236,24 +243,28 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
layoutRow++; layoutRow++;
fSignatureMenu = _BuildSignatureMenu(*sig); fSignatureMenu = _BuildSignatureMenu(*sig);
menu = new BMenuField("sig", TR("Auto signature:"), fSignatureMenu, NULL); menu = new BMenuField("sig", B_TRANSLATE("Auto signature:"),
fSignatureMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
fEncodingMenu = _BuildEncodingMenu(fEncoding); fEncodingMenu = _BuildEncodingMenu(fEncoding);
menu = new BMenuField("enc", TR("Encoding:"), fEncodingMenu, NULL); menu = new BMenuField("enc", B_TRANSLATE("Encoding:"),
fEncodingMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
fWarnUnencodableMenu = _BuildWarnUnencodableMenu(fWarnUnencodable); fWarnUnencodableMenu = _BuildWarnUnencodableMenu(fWarnUnencodable);
menu = new BMenuField("warnUnencodable", TR("Warn unencodable:"), menu = new BMenuField("warnUnencodable", B_TRANSLATE("Warn unencodable:"),
fWarnUnencodableMenu, NULL); fWarnUnencodableMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
fWrapMenu = _BuildWrapMenu(*wrap); fWrapMenu = _BuildWrapMenu(*wrap);
menu = new BMenuField("wrap", TR("Text wrapping:"), fWrapMenu, NULL); menu = new BMenuField("wrap", B_TRANSLATE("Text wrapping:"),
fWrapMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
fAttachAttributesMenu = _BuildAttachAttributesMenu(*attachAttributes); fAttachAttributesMenu = _BuildAttachAttributesMenu(*attachAttributes);
menu = new BMenuField("attachAttributes", TR("Attach attributes:"), menu = new BMenuField("attachAttributes",
B_TRANSLATE("Attach attributes:"),
fAttachAttributesMenu, NULL); fAttachAttributesMenu, NULL);
add_menu_to_layout(menu, mailLayout, layoutRow); add_menu_to_layout(menu, mailLayout, layoutRow);
@@ -370,7 +381,8 @@ TPrefsWindow::MessageReceived(BMessage* msg)
} }
strcpy(label,fReplyTo == ACCOUNT_USE_DEFAULT strcpy(label,fReplyTo == ACCOUNT_USE_DEFAULT
? TR("Use default account") : TR("Account from mail")); ? B_TRANSLATE("Use default account")
: B_TRANSLATE("Account from mail"));
if ((item = fReplyToMenu->FindItem(label)) != NULL) if ((item = fReplyToMenu->FindItem(label)) != NULL)
item->SetMarked(true); item->SetMarked(true);
@@ -379,8 +391,8 @@ TPrefsWindow::MessageReceived(BMessage* msg)
item->SetMarked(true); item->SetMarked(true);
strcpy(label, fAttachAttributes strcpy(label, fAttachAttributes
? TR("Include file attributes in attachments") ? B_TRANSLATE("Include file attributes in attachments")
: TR("No file attributes, just plain data")); : B_TRANSLATE("No file attributes, just plain data"));
if ((item = fAttachAttributesMenu->FindItem(label)) != NULL) if ((item = fAttachAttributesMenu->FindItem(label)) != NULL)
item->SetMarked(true); item->SetMarked(true);
@@ -482,8 +494,9 @@ TPrefsWindow::MessageReceived(BMessage* msg)
*fNewSignature = (char*)malloc(strlen(signature) + 1); *fNewSignature = (char*)malloc(strlen(signature) + 1);
strcpy(*fNewSignature, signature); strcpy(*fNewSignature, signature);
} else { } else {
*fNewSignature = (char*)malloc(strlen(TR("None")) + 1); *fNewSignature = (char*)malloc(
strcpy(*fNewSignature, TR("None")); strlen(B_TRANSLATE("None")) + 1);
strcpy(*fNewSignature, B_TRANSLATE("None"));
} }
break; break;
case P_ENC: case P_ENC:
@@ -595,13 +608,13 @@ TPrefsWindow::_BuildLevelMenu(int32 level)
menu = new BPopUpMenu(""); menu = new BPopUpMenu("");
msg = new BMessage(P_LEVEL); msg = new BMessage(P_LEVEL);
msg->AddInt32("level", L_BEGINNER); msg->AddInt32("level", L_BEGINNER);
menu->AddItem(item = new BMenuItem(TR("Beginner"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("Beginner"), msg));
if (level == L_BEGINNER) if (level == L_BEGINNER)
item->SetMarked(true); item->SetMarked(true);
msg = new BMessage(P_LEVEL); msg = new BMessage(P_LEVEL);
msg->AddInt32("level", L_EXPERT); msg->AddInt32("level", L_EXPERT);
menu->AddItem(item = new BMenuItem(TR("Expert"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("Expert"), msg));
if (level == L_EXPERT) if (level == L_EXPERT)
item->SetMarked(true); item->SetMarked(true);
@@ -647,13 +660,13 @@ TPrefsWindow::_BuildReplyToMenu(int32 account)
BMenuItem* item; BMenuItem* item;
BMessage* msg; BMessage* msg;
menu->AddItem(item = new BMenuItem(TR("Use default account"), menu->AddItem(item = new BMenuItem(B_TRANSLATE("Use default account"),
msg = new BMessage(P_REPLYTO))); msg = new BMessage(P_REPLYTO)));
msg->AddInt32("replyTo", ACCOUNT_USE_DEFAULT); msg->AddInt32("replyTo", ACCOUNT_USE_DEFAULT);
if (account == ACCOUNT_USE_DEFAULT) if (account == ACCOUNT_USE_DEFAULT)
item->SetMarked(true); item->SetMarked(true);
menu->AddItem(item = new BMenuItem(TR("Account from mail"), menu->AddItem(item = new BMenuItem(B_TRANSLATE("Account from mail"),
msg = new BMessage(P_REPLYTO))); msg = new BMessage(P_REPLYTO)));
msg->AddInt32("replyTo", ACCOUNT_FROM_MAIL); msg->AddInt32("replyTo", ACCOUNT_FROM_MAIL);
if (account == ACCOUNT_FROM_MAIL) if (account == ACCOUNT_FROM_MAIL)
@@ -671,11 +684,11 @@ TPrefsWindow::_BuildReplyPreambleMenu()
"%f - First name", "%f - First name",
"%l - Last name", "%l - Last name",
*/ */
TR("%n - Full name"), B_TRANSLATE("%n - Full name"),
TR("%e - E-mail address"), B_TRANSLATE("%e - E-mail address"),
TR("%d - Date"), B_TRANSLATE("%d - Date"),
"", "",
TR("\\n - Newline"), B_TRANSLATE("\\n - Newline"),
NULL NULL
}; };
@@ -709,15 +722,15 @@ TPrefsWindow::_BuildSignatureMenu(char* sig)
BPopUpMenu* menu = new BPopUpMenu(""); BPopUpMenu* menu = new BPopUpMenu("");
msg = new BMessage(P_SIG); msg = new BMessage(P_SIG);
msg->AddString("signature", TR("None")); msg->AddString("signature", B_TRANSLATE("None"));
menu->AddItem(item = new BMenuItem(TR("None"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("None"), msg));
if (!strcmp(sig, TR("None"))) if (!strcmp(sig, B_TRANSLATE("None")))
item->SetMarked(true); item->SetMarked(true);
msg = new BMessage(P_SIG); msg = new BMessage(P_SIG);
msg->AddString("signature", TR("Random")); msg->AddString("signature", B_TRANSLATE("Random"));
menu->AddItem(item = new BMenuItem(TR("Random"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("Random"), msg));
if (!strcmp(sig, TR("Random"))) if (!strcmp(sig, B_TRANSLATE("Random")))
item->SetMarked(true); item->SetMarked(true);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@@ -808,14 +821,14 @@ TPrefsWindow::_BuildAttachAttributesMenu(bool attachAttributes)
msg = new BMessage(P_ATTACH_ATTRIBUTES); msg = new BMessage(P_ATTACH_ATTRIBUTES);
msg->AddBool("attachAttributes", true); msg->AddBool("attachAttributes", true);
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("Include file attributes in attachments"), msg)); B_TRANSLATE("Include file attributes in attachments"), msg));
if (attachAttributes) if (attachAttributes)
item->SetMarked(true); item->SetMarked(true);
msg = new BMessage(P_ATTACH_ATTRIBUTES); msg = new BMessage(P_ATTACH_ATTRIBUTES);
msg->AddInt32("attachAttributes", false); msg->AddInt32("attachAttributes", false);
menu->AddItem(item = new BMenuItem( menu->AddItem(item = new BMenuItem(
TR("No file attributes, just plain data"), msg)); B_TRANSLATE("No file attributes, just plain data"), msg));
if (!attachAttributes) if (!attachAttributes)
item->SetMarked(true); item->SetMarked(true);
@@ -901,19 +914,20 @@ TPrefsWindow::_BuildButtonBarMenu(uint8 show)
msg = new BMessage(P_BUTTON_BAR); msg = new BMessage(P_BUTTON_BAR);
msg->AddInt8("bar", 1); msg->AddInt8("bar", 1);
menu->AddItem(item = new BMenuItem(TR("Show icons & labels"), msg)); menu->AddItem(item = new BMenuItem(
B_TRANSLATE("Show icons & labels"), msg));
if (show & 1) if (show & 1)
item->SetMarked(true); item->SetMarked(true);
msg = new BMessage(P_BUTTON_BAR); msg = new BMessage(P_BUTTON_BAR);
msg->AddInt8("bar", 2); msg->AddInt8("bar", 2);
menu->AddItem(item = new BMenuItem(TR("Show icons only"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show icons only"), msg));
if (show & 2) if (show & 2)
item->SetMarked(true); item->SetMarked(true);
msg = new BMessage(P_BUTTON_BAR); msg = new BMessage(P_BUTTON_BAR);
msg->AddInt8("bar", 0); msg->AddInt8("bar", 0);
menu->AddItem(item = new BMenuItem(TR("Hide"), msg)); menu->AddItem(item = new BMenuItem(B_TRANSLATE("Hide"), msg));
if (!show) if (!show)
item->SetMarked(true); item->SetMarked(true);
+7 -7
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
@@ -80,7 +80,7 @@ Settings::Settings()
fContentFont(be_fixed_font) fContentFont(be_fixed_font)
{ {
fContentFont.SetSize(12.0); fContentFont.SetSize(12.0);
fSignature = TR("None"); fSignature = B_TRANSLATE("None");
LoadSettings(); LoadSettings();
+47 -34
View File
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
of Be Incorporated in the United States and other countries. Other brand product registered trademarks of Be Incorporated in the United States and other
names are registered trademarks or trademarks of their respective holders. countries. Other brand product names are registered trademarks or trademarks
All rights reserved. of their respective holders. All rights reserved.
*/ */
#include "Signature.h" #include "Signature.h"
@@ -60,7 +60,7 @@ extern const char *kRedoStrings[];
TSignatureWindow::TSignatureWindow(BRect rect) TSignatureWindow::TSignatureWindow(BRect rect)
: :
BWindow (rect, TR("Signatures"), B_TITLED_WINDOW, 0), BWindow (rect, B_TRANSLATE("Signatures"), B_TITLED_WINDOW, 0),
fFile(NULL) fFile(NULL)
{ {
BMenu *menu; BMenu *menu;
@@ -70,30 +70,35 @@ TSignatureWindow::TSignatureWindow(BRect rect)
BRect r = Bounds(); BRect r = Bounds();
/*** Set up the menus ****/ /*** Set up the menus ****/
menu_bar = new BMenuBar(r, "MenuBar"); menu_bar = new BMenuBar(r, "MenuBar");
menu = new BMenu(TR("Signature")); menu = new BMenu(B_TRANSLATE("Signature"));
menu->AddItem(fNew = new BMenuItem(TR("New"), new BMessage(M_NEW), 'N')); menu->AddItem(fNew = new BMenuItem(B_TRANSLATE("New"),
fSignature = new TMenu(TR("Open"), INDEX_SIGNATURE, M_SIGNATURE); new BMessage(M_NEW), 'N'));
fSignature = new TMenu(B_TRANSLATE("Open"), INDEX_SIGNATURE, M_SIGNATURE);
menu->AddItem(new BMenuItem(fSignature)); menu->AddItem(new BMenuItem(fSignature));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fSave = new BMenuItem(TR("Save"), new BMessage(M_SAVE), 'S')); menu->AddItem(fSave = new BMenuItem(B_TRANSLATE("Save"),
menu->AddItem(fDelete = new BMenuItem(TR("Delete"), new BMessage(M_DELETE), new BMessage(M_SAVE), 'S'));
'T')); menu->AddItem(fDelete = new BMenuItem(B_TRANSLATE("Delete"),
new BMessage(M_DELETE), 'T'));
menu_bar->AddItem(menu); menu_bar->AddItem(menu);
menu = new BMenu(TR("Edit")); menu = new BMenu(B_TRANSLATE("Edit"));
menu->AddItem(fUndo = new BMenuItem(TR("Undo"), new BMessage(B_UNDO), 'Z')); menu->AddItem(fUndo = new BMenuItem(B_TRANSLATE("Undo"),
new BMessage(B_UNDO), 'Z'));
fUndo->SetTarget(NULL, this); fUndo->SetTarget(NULL, this);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fCut = new BMenuItem(TR("Cut"), new BMessage(B_CUT), 'X')); menu->AddItem(fCut = new BMenuItem(B_TRANSLATE("Cut"),
new BMessage(B_CUT), 'X'));
fCut->SetTarget(NULL, this); fCut->SetTarget(NULL, this);
menu->AddItem(fCopy = new BMenuItem(TR("Copy"), new BMessage(B_COPY), 'C')); menu->AddItem(fCopy = new BMenuItem(B_TRANSLATE("Copy"),
new BMessage(B_COPY), 'C'));
fCopy->SetTarget(NULL, this); fCopy->SetTarget(NULL, this);
menu->AddItem(fPaste = new BMenuItem(TR("Paste"), new BMessage(B_PASTE), menu->AddItem(fPaste = new BMenuItem(B_TRANSLATE("Paste"),
'V')); new BMessage(B_PASTE), 'V'));
fPaste->SetTarget(NULL, this); fPaste->SetTarget(NULL, this);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(TR("Select all"), new BMessage(M_SELECT), menu->AddItem(item = new BMenuItem(B_TRANSLATE("Select all"),
'A')); new BMessage(M_SELECT), 'A'));
item->SetTarget(NULL, this); item->SetTarget(NULL, this);
menu_bar->AddItem(menu); menu_bar->AddItem(menu);
@@ -189,9 +194,11 @@ TSignatureWindow::MessageReceived(BMessage* msg)
case M_DELETE: case M_DELETE:
if (!(new BAlert("", if (!(new BAlert("",
TR("Really delete this signature? This cannot be undone."), B_TRANSLATE("Really delete this signature? This cannot "
TR("Cancel"), TR("Delete"), NULL, B_WIDTH_AS_USUAL, "be undone."),
B_WARNING_ALERT))->Go()) B_TRANSLATE("Cancel"),
B_TRANSLATE("Delete"),
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go())
break; break;
if (fFile) { if (fFile) {
@@ -224,8 +231,9 @@ TSignatureWindow::MessageReceived(BMessage* msg)
else { else {
fFile = NULL; fFile = NULL;
beep(); beep();
(new BAlert("", TR("Couldn't open this signature. Sorry."), (new BAlert("",
TR("OK")))->Go(); B_TRANSLATE("Couldn't open this signature. Sorry."),
B_TRANSLATE("OK")))->Go();
} }
} }
break; break;
@@ -280,8 +288,11 @@ TSignatureWindow::Clear()
if (IsDirty()) { if (IsDirty()) {
beep(); beep();
BAlert *alert = new BAlert("", TR("Save changes to this signature?"), BAlert *alert = new BAlert("",
TR("Don't save"), TR("Cancel"), TR("Save"), B_TRANSLATE("Save changes to this signature?"),
B_TRANSLATE("Don't save"),
B_TRANSLATE("Cancel"),
B_TRANSLATE("Save"),
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->SetShortcut(0, 'd'); alert->SetShortcut(0, 'd');
alert->SetShortcut(1, B_ESCAPE); alert->SetShortcut(1, B_ESCAPE);
@@ -374,8 +385,9 @@ TSignatureWindow::Save()
err_exit: err_exit:
beep(); beep();
(new BAlert("", TR("An error occurred trying to save this signature."), (new BAlert("",
TR("Sorry")))->Go(); B_TRANSLATE("An error occurred trying to save this signature."),
B_TRANSLATE("Sorry")))->Go();
} }
@@ -393,8 +405,8 @@ void
TSignatureView::AttachedToWindow() TSignatureView::AttachedToWindow()
{ {
BRect rect = Bounds(); BRect rect = Bounds();
float name_text_length = StringWidth(TR("Title:")); float name_text_length = StringWidth(B_TRANSLATE("Title:"));
float sig_text_length = StringWidth(TR("Signature:")); float sig_text_length = StringWidth(B_TRANSLATE("Signature:"));
float divide_length; float divide_length;
if (name_text_length > sig_text_length) if (name_text_length > sig_text_length)
@@ -405,7 +417,8 @@ TSignatureView::AttachedToWindow()
rect.InsetBy(8,0); rect.InsetBy(8,0);
rect.top+= 8; rect.top+= 8;
fName = new TNameControl(rect, TR("Title:"), new BMessage(NAME_FIELD)); fName = new TNameControl(rect, B_TRANSLATE("Title:"),
new BMessage(NAME_FIELD));
AddChild(fName); AddChild(fName);
fName->SetDivider(divide_length + 10); fName->SetDivider(divide_length + 10);
@@ -427,7 +440,7 @@ TSignatureView::AttachedToWindow()
rect = scroller->Frame(); rect = scroller->Frame();
BStringView *stringView = new BStringView(rect, "SigLabel", BStringView *stringView = new BStringView(rect, "SigLabel",
TR("Signature:")); B_TRANSLATE("Signature:"));
AddChild(stringView); AddChild(stringView);
float tWidth, tHeight; float tWidth, tHeight;