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