Author: mmadia Date: 2010-05-06 18:19:00 +0200 (Thu, 06 May 2010) New Revision: 36664 Changeset: http://dev.haiku-os.org/changeset/36664/haiku Ticket: http://dev.haiku-os.org/ticket/5408 Modified: haiku/trunk/src/apps/deskbar/BeMenu.cpp haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp haiku/trunk/src/apps/deskbar/StatusView.cpp haiku/trunk/src/apps/deskbar/TimeView.cpp haiku/trunk/src/apps/deskbar/WindowMenu.cpp Log: Updated to use B_TRANSLATE* macros. relates to #5408. Modified: haiku/trunk/src/apps/deskbar/BeMenu.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/BeMenu.cpp 2010-05-06 16:11:12 UTC (rev 36663) +++ haiku/trunk/src/apps/deskbar/BeMenu.cpp 2010-05-06 16:19:00 UTC (rev 36664) @@ -141,7 +141,8 @@ TBeMenu::DoneBuildingItemList() { if (fItemList->CountItems() <= 0) { - BMenuItem* item = new BMenuItem(TR("<Be folder is empty>"), 0); + BMenuItem* item = new BMenuItem(B_TRANSLATE("<Be folder is empty>"), + 0); item->SetEnabled(false); AddItem(item); } else @@ -157,8 +158,10 @@ TrackingHookData* data = fBarView->GetTrackingHookData(); if (fAddState == kAddingRecents) { - static const char* recentTitle[] = {TR_MARK("Recent documents"), - TR_MARK("Recent folders"), TR_MARK("Recent applications")}; + static const char* recentTitle[] = { + B_TRANSLATE_MARK("Recent documents"), + B_TRANSLATE_MARK("Recent folders"), + B_TRANSLATE_MARK("Recent applications")}; const int recentType[] = {kRecentDocuments, kRecentFolders, kRecentApplications}; const int recentTypes = 3; @@ -167,8 +170,8 @@ bool enabled = false; for (int i = 0; i < recentTypes; i++) { - recentItem[i] = new TRecentsMenu(TR(recentTitle[i]), fBarView, - recentType[i]); + recentItem[i] = new TRecentsMenu(B_TRANSLATE(recentTitle[i]), + fBarView, recentType[i]); if (recentItem[i]) enabled |= recentItem[i]->RecentsEnabled(); @@ -233,65 +236,71 @@ BMenuItem* item; BRoster roster; if (!roster.IsRunning(kTrackerSignature)) { - item = new BMenuItem(TR("Restart Tracker"), new BMessage(kRestartTracker)); + item = new BMenuItem(B_TRANSLATE("Restart Tracker"), + new BMessage(kRestartTracker)); AddItem(item); AddSeparatorItem(); } - static const char* kAboutHaikuMenuItemStr = TR_MARK( + static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK( "About Haiku" B_UTF8_ELLIPSIS); - static const char* kAboutThisSystemMenuItemStr = TR_MARK( + static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK( "About this system" B_UTF8_ELLIPSIS); item = new BMenuItem( #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL - TR(kAboutHaikuMenuItemStr) + B_TRANSLATE(kAboutHaikuMenuItemStr) #else - TR(kAboutThisSystemMenuItemStr) + B_TRANSLATE(kAboutThisSystemMenuItemStr) #endif , new BMessage(kShowSplash)); item->SetEnabled(!dragging); AddItem(item); - static const char* kFindMenuItemStr = TR_MARK("Find" B_UTF8_ELLIPSIS); + static const char* kFindMenuItemStr = + B_TRANSLATE_MARK("Find" B_UTF8_ELLIPSIS); #ifdef SHOW_RECENT_FIND_ITEMS item = new BMenuItem( TrackerBuildRecentFindItemsMenu(kFindMenuItemStr), new BMessage(kFindButton)); #else - item = new BMenuItem(TR(kFindMenuItemStr), new BMessage(kFindButton)); + item = new BMenuItem(B_TRANSLATE(kFindMenuItemStr), + new BMessage(kFindButton)); #endif item->SetEnabled(!dragging); AddItem(item); - item = new BMenuItem(TR("Show replicants"), new BMessage(kToggleDraggers)); + item = new BMenuItem(B_TRANSLATE("Show replicants"), + new BMessage(kToggleDraggers)); item->SetEnabled(!dragging); item->SetMarked(BDragger::AreDraggersDrawn()); AddItem(item); - static const char* kMountMenuStr = TR_MARK("Mount"); + static const char* kMountMenuStr = B_TRANSLATE_MARK("Mount"); #ifdef MOUNT_MENU_IN_DESKBAR - DeskbarMountMenu* mountMenu = new DeskbarMountMenu(TR(kMountMenuStr)); + DeskbarMountMenu* mountMenu = new DeskbarMountMenu( + B_TRANSLATE(kMountMenuStr)); mountMenu->SetEnabled(!dragging); AddItem(mountMenu); #endif - item = new BMenuItem(TR("Deskbar preferences" B_UTF8_ELLIPSIS), + item = new BMenuItem(B_TRANSLATE("Deskbar preferences" B_UTF8_ELLIPSIS), new BMessage(kConfigShow)); item->SetTarget(be_app); AddItem(item); AddSeparatorItem(); - BMenu* shutdownMenu = new BMenu(TR("Shutdown" B_UTF8_ELLIPSIS)); + BMenu* shutdownMenu = new BMenu(B_TRANSLATE("Shutdown" B_UTF8_ELLIPSIS)); - item = new BMenuItem(TR("Restart system"), new BMessage(kRebootSystem)); + item = new BMenuItem(B_TRANSLATE("Restart system"), + new BMessage(kRebootSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item); - static const char* kSuspendMenuItemStr = TR_MARK("Suspend"); + static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend"); #ifdef APM_SUPPORT if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) { @@ -301,7 +310,8 @@ } #endif - item = new BMenuItem(TR("Power off"), new BMessage(kShutdownSystem)); + item = new BMenuItem(B_TRANSLATE("Power off"), + new BMessage(kShutdownSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item); shutdownMenu->SetFont(be_plain_font); Modified: haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp 2010-05-06 16:11:12 UTC (rev 36663) +++ haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp 2010-05-06 16:19:00 UTC (rev 36664) @@ -29,15 +29,16 @@ PreferencesWindow::PreferencesWindow(BRect frame) : - BWindow(frame, TR("Deskbar preferences"), B_TITLED_WINDOW, + BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW, B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE) { // Controls - fMenuRecentDocuments = new BCheckBox(TR("Recent documents:"), + fMenuRecentDocuments = new BCheckBox(B_TRANSLATE("Recent documents:"), new BMessage(kUpdateRecentCounts)); - fMenuRecentApplications = new BCheckBox(TR("Recent applications:"), + fMenuRecentApplications = new BCheckBox( + B_TRANSLATE("Recent applications:"), new BMessage(kUpdateRecentCounts)); - fMenuRecentFolders = new BCheckBox(TR("Recent folders:"), + fMenuRecentFolders = new BCheckBox(B_TRANSLATE("Recent folders:"), new BMessage(kUpdateRecentCounts)); fMenuRecentDocumentCount = new BTextControl(NULL, NULL, @@ -47,25 +48,29 @@ fMenuRecentFolderCount = new BTextControl(NULL, NULL, new BMessage(kUpdateRecentCounts)); - fAppsSort = new BCheckBox(TR("Sort running applications"), + fAppsSort = new BCheckBox(B_TRANSLATE("Sort running applications"), new BMessage(kSortRunningApps)); - fAppsSortTrackerFirst = new BCheckBox(TR("Tracker always first"), + fAppsSortTrackerFirst = new BCheckBox(B_TRANSLATE("Tracker always first"), new BMessage(kTrackerFirst)); - fAppsShowExpanders = new BCheckBox(TR("Show application expander"), + fAppsShowExpanders = new BCheckBox( + B_TRANSLATE("Show application expander"), new BMessage(kSuperExpando)); - fAppsExpandNew = new BCheckBox(TR("Expand new applications"), + fAppsExpandNew = new BCheckBox(B_TRANSLATE("Expand new applications"), new BMessage(kExpandNewTeams)); - fClock24Hours = new BCheckBox(TR("24 hour clock"), new BMessage(kMilTime)); - fClockSeconds = new BCheckBox(TR("Show seconds"), + fClock24Hours = new BCheckBox(B_TRANSLATE("24 hour clock"), + new BMessage(kMilTime)); + fClockSeconds = new BCheckBox(B_TRANSLATE("Show seconds"), new BMessage(kShowSeconds)); - fClockEuropeanDate = new BCheckBox(TR("European date"), + fClockEuropeanDate = new BCheckBox(B_TRANSLATE("European date"), new BMessage(kEuroDate)); - fClockFullDate = new BCheckBox(TR("Full date"), new BMessage(kFullDate)); + fClockFullDate = new BCheckBox(B_TRANSLATE("Full date"), + new BMessage(kFullDate)); - fWindowAlwaysOnTop = new BCheckBox(TR("Always on top"), + fWindowAlwaysOnTop = new BCheckBox(B_TRANSLATE("Always on top"), new BMessage(kAlwaysTop)); - fWindowAutoRaise = new BCheckBox(TR("Auto-raise"), new BMessage(kAutoRaise)); + fWindowAutoRaise = new BCheckBox(B_TRANSLATE("Auto-raise"), + new BMessage(kAutoRaise)); BTextView* docTextView = fMenuRecentDocumentCount->TextView(); BTextView* appTextView = fMenuRecentApplicationCount->TextView(); @@ -98,10 +103,10 @@ fMenuRecentDocuments->SetValue(appSettings->recentDocsEnabled); fMenuRecentDocumentCount->SetEnabled(appSettings->recentDocsEnabled); - + fMenuRecentApplications->SetValue(appSettings->recentAppsEnabled); fMenuRecentApplicationCount->SetEnabled(appSettings->recentAppsEnabled); - + fMenuRecentFolders->SetValue(appSettings->recentFoldersEnabled); fMenuRecentFolderCount->SetEnabled(appSettings->recentFoldersEnabled); @@ -154,10 +159,10 @@ fClockBox = new BBox("fClockBox"); fWindowBox = new BBox("fWindowBox"); - fMenuBox->SetLabel(TR("Menu")); - fAppsBox->SetLabel(TR("Applications")); - fClockBox->SetLabel(TR("Clock")); - fWindowBox->SetLabel(TR("Window")); + fMenuBox->SetLabel(B_TRANSLATE("Menu")); + fAppsBox->SetLabel(B_TRANSLATE("Applications")); + fClockBox->SetLabel(B_TRANSLATE("Clock")); + fWindowBox->SetLabel(B_TRANSLATE("Window")); BView* view; view = BLayoutBuilder::Group<>() @@ -174,7 +179,7 @@ .Add(fMenuRecentApplicationCount) .End() .End() - .Add(new BButton(TR("Edit menu" B_UTF8_ELLIPSIS), + .Add(new BButton(B_TRANSLATE("Edit menu" B_UTF8_ELLIPSIS), new BMessage(kEditMenuInTracker))) .SetInsets(10, 10, 10, 10) .End() Modified: haiku/trunk/src/apps/deskbar/StatusView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/StatusView.cpp 2010-05-06 16:11:12 UTC (rev 36663) +++ haiku/trunk/src/apps/deskbar/StatusView.cpp 2010-05-06 16:19:00 UTC (rev 36664) @@ -133,8 +133,8 @@ fShelf(new TReplicantShelf(this)), fMultiRowMode(vertical), fMinimumTrayWidth(kMinimumTrayWidth), - fAlignmentSupport(false) -{ + fAlignmentSupport(false) +{ // init the minimum window width according to the logo. const BBitmap* logoBitmap = AppResSet()->FindBitmap(B_MESSAGE_TYPE, R_BeLogoIcon); @@ -290,14 +290,14 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight) { float width = 0, height = kMinimumTrayHeight; - + if (fMultiRowMode) { if (fShelf->CountReplicants() > 0) height = fRightBottomReplicant.bottom; // the height will be uniform for the number of rows // necessary to show all the reps + any gutters - // necessary for spacing + // necessary for spacing int32 rowCount = (int32)(height / kMaxReplicantHeight); height = kGutter + (rowCount * kMaxReplicantHeight) + ((rowCount - 1) * kIconGap) + kGutter; @@ -311,7 +311,7 @@ && fRightBottomReplicant.right + 6 >= fClock->Frame().left) { width = fRightBottomReplicant.right + 6 + fClock->Frame().Width(); - } else + } else width = fRightBottomReplicant.right + 3; } // this view has a fixed minimum width @@ -333,7 +333,7 @@ BRect bounds = Bounds(); float width, height; GetPreferredSize(&width, &height); - + if (width == bounds.Width() && height == bounds.Height()) { // no need to change anything return; @@ -353,13 +353,13 @@ rgb_color menuColor = ViewColor(); rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); - + BRect frame(Bounds()); SetHighColor(light); StrokeLine(frame.LeftBottom(), frame.RightBottom()); StrokeLine(frame.RightBottom(), frame.RightTop()); - + SetHighColor(vdark); StrokeLine(frame.RightTop(), frame.LeftTop()); StrokeLine(frame.LeftTop(), frame.LeftBottom()); @@ -418,11 +418,12 @@ if (fBarView->ShowingClock()) fClock->ShowClockOptions(ConvertToScreen(point)); else { - BMenuItem* item = new BMenuItem(TR("Show Time"), new BMessage('time')); + BMenuItem* item = new BMenuItem(B_TRANSLATE("Show Time"), + new BMessage('time')); menu->AddItem(item); menu->SetTargetForItems(this); BPoint where = ConvertToScreen(point); - menu->Go(where, true, true, BRect(where - BPoint(4, 4), + menu->Go(where, true, true, BRect(where - BPoint(4, 4), where + BPoint(4, 4)), true); } } @@ -432,7 +433,7 @@ TReplicantTray::MouseDown(BPoint where) { #ifdef DB_ADDONS - if (modifiers() & B_CONTROL_KEY) + if (modifiers() & B_CONTROL_KEY) DumpList(fItemList); #endif @@ -466,7 +467,7 @@ BView::MouseDown(where); } -#ifdef DB_ADDONS +#ifdef DB_ADDONS void TReplicantTray::InitAddOnSupport() @@ -526,7 +527,7 @@ if (item) { if (item->isAddOn) watch_node(&(item->nodeRef), B_STOP_WATCHING, this, Window()); - + delete item; } } @@ -646,7 +647,7 @@ // that we expect if (IsAddOn(ref)) { int32 id; - BEntry entry(&ref); + BEntry entry(&ref); LoadAddOn(&entry, &id); } } @@ -750,10 +751,10 @@ if (message->FindInt32("device", &device) != B_OK) break; - UnloadAddOn(NULL, &device, false, true); + UnloadAddOn(NULL, &device, false, true); break; } - } + } } @@ -800,7 +801,7 @@ if (image < B_OK) return image; - // get the view loading function symbol + // get the view loading function symbol // we first look for a symbol that takes an image_id // and entry_ref pointer, if not found, go with normal // instantiate function @@ -864,7 +865,7 @@ if (isAddOn) watch_node(&nodeRef, B_WATCH_NAME | B_WATCH_ATTR, this, Window()); - return B_OK; + return B_OK; } @@ -883,7 +884,7 @@ if ((which && nodeRef && item->nodeRef == *nodeRef) || (device && item->nodeRef.device == *device)) { - + if (device && be_roster->IsRunning(&item->entryRef)) continue; @@ -911,14 +912,14 @@ } fItemList->RemoveItem(item); - delete item; + delete item; } /** ENTRY_MOVED message, moving only occurs on a device * copying will occur (ENTRY_CREATED) between devices */ - + void TReplicantTray::MoveItem(entry_ref* ref, ino_t toDirectory) { @@ -984,12 +985,12 @@ { if (!name || strlen(name) <= 0) return B_ERROR; - + int32 index; BView* view = ViewAt(&index, id, name); if (view) return B_OK; - + return B_ERROR; } @@ -1003,14 +1004,14 @@ { if (index < 0) return B_ERROR; - + BView* view; fShelf->ReplicantAt(index, &view, (uint32*)id, NULL); if (view) { *name = view->Name(); return B_OK; } - + return B_ERROR; } @@ -1022,7 +1023,7 @@ { int32 index, id; BView* view = ViewAt(&index, &id, target, byIndex); - + return view && index >= 0; } @@ -1034,10 +1035,10 @@ { if (!name || strlen(name) == 0) return false; - + int32 index, id; BView* view = ViewAt(&index, &id, name); - + return view && index >= 0; } @@ -1115,7 +1116,7 @@ if (originalBounds != view->Bounds()) { // The replicant changed its size when added to the window, so we need - // to recompute all over again (it's already done once via + // to recompute all over again (it's already done once via // BShelf::AddReplicant() and TReplicantShelf::CanAcceptReplicantView()) RealignReplicants(); } @@ -1139,7 +1140,7 @@ { if (target < 0) return; - + int32 index, id; BView* view = ViewAt(&index, &id, target, byIndex); if (view && index >= 0) { @@ -1158,7 +1159,7 @@ { if (!name || strlen(name) <= 0) return; - + int32 id, index; BView* view = ViewAt(&index, &id, name); if (view && index >= 0) { @@ -1204,7 +1205,7 @@ TReplicantTray::ViewAt(int32* index, int32* id, int32 target, bool byIndex) { *index = -1; - + BView* view; if (byIndex) { if (fShelf->ReplicantAt(target, &view, (uint32*)id)) { @@ -1225,7 +1226,7 @@ } } } - + return NULL; } @@ -1239,7 +1240,7 @@ { *index = -1; *id = -1; - + BView* view; int32 count = fShelf->CountReplicants()-1; for (int32 repIndex = count ; repIndex >= 0 ; repIndex--) { @@ -1249,7 +1250,7 @@ return view; } } - + return NULL; } @@ -1449,9 +1450,9 @@ { fChild->ResizeToPreferred(); *width = fChild->Bounds().Width(); - *height = fChild->Bounds().Height(); - - if (fDragLocation != kNoDragRegion) + *height = fChild->Bounds().Height(); + + if (fDragLocation != kNoDragRegion) *width += 7; else *width += 6; @@ -1471,7 +1472,7 @@ } -void +void TDragRegion::Draw(BRect) { rgb_color menuColor = ViewColor(); @@ -1481,7 +1482,7 @@ rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT); rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); - + BRect frame(Bounds()); BeginLineArray(4); @@ -1516,7 +1517,7 @@ BPoint(frame.right - 1, frame.bottom), hilite); } else if (fBarView->AcrossBottom()) { AddLine(BPoint(frame.left, frame.top + 1), - BPoint(frame.right - 1, frame.top + 1), light); + BPoint(frame.right - 1, frame.top + 1), light); AddLine(frame.LeftBottom(), frame.RightBottom(), hilite); AddLine(frame.RightTop(), frame.RightBottom(), vvdark); AddLine(BPoint(frame.right - 1, frame.top + 1), @@ -1525,7 +1526,7 @@ } EndLineArray(); - + if (fDragLocation != kDontDrawDragRegion || fDragLocation != kNoDragRegion) DrawDragRegion(); } @@ -1533,7 +1534,7 @@ void TDragRegion::DrawDragRegion() -{ +{ BRect dragRegion(DragRegion()); rgb_color menuColor = ViewColor(); @@ -1551,11 +1552,11 @@ BPoint pt; pt.x = floorf((dragRegion.left + dragRegion.right) / 2 + 0.5) - 1; pt.y = dragRegion.top + 2; - + while (pt.y + 1 <= dragRegion.bottom) { AddLine(pt, pt, vdark); AddLine(pt + BPoint(1, 1), pt + BPoint(1, 1), light); - + pt.y += 3; } EndLineArray(); @@ -1588,7 +1589,7 @@ placeOnLeft = true; else if (fDragLocation == kDragRegionRight) placeOnLeft = false; - + if (placeOnLeft) { dragRegion.left += kLeftRightInset; dragRegion.right = dragRegion.left + kDragWidth; @@ -1596,12 +1597,12 @@ dragRegion.right -= kLeftRightInset; dragRegion.left = dragRegion.right - kDragWidth; } - + return dragRegion; } -void +void TDragRegion::MouseDown(BPoint thePoint) { ulong buttons; @@ -1633,7 +1634,7 @@ } -void +void TDragRegion::MouseUp(BPoint pt) { if (IsTracking()) { @@ -1644,8 +1645,8 @@ } -bool -TDragRegion::SwitchModeForRect(BPoint mouse, BRect rect, +bool +TDragRegion::SwitchModeForRect(BPoint mouse, BRect rect, bool newVertical, bool newLeft, bool newTop, int32 newState) { if (!rect.Contains(mouse)) @@ -1664,7 +1665,7 @@ } -void +void TDragRegion::MouseMoved(BPoint where, uint32 code, const BMessage* message) { if (IsTracking()) { @@ -1678,7 +1679,7 @@ float vDivider = frame.Height() / 2; #ifdef FULL_MODE float thirdScreen = frame.Height() / 3; -#endif +#endif BRect topLeft(frame.left, frame.top, frame.left + hDivider, miniDivider); BRect topMiddle(frame.left + hDivider, frame.top, frame.right @@ -1701,7 +1702,7 @@ frame.bottom - thirdScreen); vDivider = frame.bottom - thirdScreen; -#endif +#endif BRect bottomLeft(frame.left, vDivider, frame.left + hDivider, frame.bottom); BRect bottomMiddle(frame.left + hDivider, vDivider, frame.right @@ -1746,7 +1747,7 @@ int32 TDragRegion::DragRegionLocation() const { - return fDragLocation; + return fDragLocation; } @@ -1755,7 +1756,7 @@ { if (location == fDragLocation) return; - + fDragLocation = location; Invalidate(); } Modified: haiku/trunk/src/apps/deskbar/TimeView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/TimeView.cpp 2010-05-06 16:11:12 UTC (rev 36663) +++ haiku/trunk/src/apps/deskbar/TimeView.cpp 2010-05-06 16:19:00 UTC (rev 36664) @@ -563,14 +563,14 @@ menu->SetFont(be_plain_font); BMenuItem* item; - item = new BMenuItem(TR("Change time" B_UTF8_ELLIPSIS), + item = new BMenuItem(B_TRANSLATE("Change time" B_UTF8_ELLIPSIS), new BMessage(kChangeClock)); menu->AddItem(item); - item = new BMenuItem(TR("Hide time"), new BMessage('time')); + item = new BMenuItem(B_TRANSLATE("Hide time"), new BMessage('time')); menu->AddItem(item); - item = new BMenuItem(TR("Show calendar" B_UTF8_ELLIPSIS), + item = new BMenuItem(B_TRANSLATE("Show calendar" B_UTF8_ELLIPSIS), new BMessage(kShowCalendar)); menu->AddItem(item); Modified: haiku/trunk/src/apps/deskbar/WindowMenu.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/WindowMenu.cpp 2010-05-06 16:11:12 UTC (rev 36663) +++ haiku/trunk/src/apps/deskbar/WindowMenu.cpp 2010-05-06 16:19:00 UTC (rev 36664) @@ -178,7 +178,7 @@ int32 itemCount = CountItems() + parentMenuItems; if (itemCount < 1) { TWindowMenuItem* noWindowsItem = - new TWindowMenuItem(TR("No windows"), -1, false, false); + new TWindowMenuItem(B_TRANSLATE("No windows"), -1, false, false); noWindowsItem->SetEnabled(false); @@ -188,19 +188,22 @@ // it. (but we only add this option if the application is not Tracker.) if (fApplicationSignature.ICompare(kTrackerSignature) != 0) { AddSeparatorItem(); - AddItem(new TShowHideMenuItem(TR("Quit application"), fTeam, - B_QUIT_REQUESTED)); + AddItem(new TShowHideMenuItem(B_TRANSLATE("Quit application"), + fTeam, B_QUIT_REQUESTED)); } } else { // if we are in drag mode, then don't add the window controls // to the menu if (!dragging) { TShowHideMenuItem* hide = - new TShowHideMenuItem(TR("Hide all"), fTeam, B_MINIMIZE_WINDOW); + new TShowHideMenuItem(B_TRANSLATE("Hide all"), fTeam, + B_MINIMIZE_WINDOW); TShowHideMenuItem* show = - new TShowHideMenuItem(TR("Show all"), fTeam, B_BRING_TO_FRONT); + new TShowHideMenuItem(B_TRANSLATE("Show all"), fTeam, + B_BRING_TO_FRONT); TShowHideMenuItem* close = - new TShowHideMenuItem(TR("Close all"), fTeam, B_QUIT_REQUESTED); + new TShowHideMenuItem(B_TRANSLATE("Close all"), fTeam, + B_QUIT_REQUESTED); if (miniCount == itemCount) hide->SetEnabled(false);