Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36664 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+30
-20
@@ -141,7 +141,8 @@ void
|
||||
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 @@ TBeMenu::AddNextItem()
|
||||
|
||||
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 @@ TBeMenu::AddNextItem()
|
||||
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 @@ TBeMenu::AddStandardBeMenuItems()
|
||||
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 @@ TBeMenu::AddStandardBeMenuItems()
|
||||
}
|
||||
#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);
|
||||
|
||||
@@ -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 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
||||
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();
|
||||
@@ -154,10 +159,10 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
||||
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 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
||||
.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()
|
||||
|
||||
@@ -418,7 +418,8 @@ TReplicantTray::ShowReplicantMenu(BPoint point)
|
||||
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);
|
||||
|
||||
@@ -563,14 +563,14 @@ TTimeView::ShowClockOptions(BPoint point)
|
||||
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);
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ TWindowMenu::AttachedToWindow()
|
||||
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 @@ TWindowMenu::AttachedToWindow()
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user