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()
|
TBeMenu::DoneBuildingItemList()
|
||||||
{
|
{
|
||||||
if (fItemList->CountItems() <= 0) {
|
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);
|
item->SetEnabled(false);
|
||||||
AddItem(item);
|
AddItem(item);
|
||||||
} else
|
} else
|
||||||
@@ -157,8 +158,10 @@ TBeMenu::AddNextItem()
|
|||||||
|
|
||||||
TrackingHookData* data = fBarView->GetTrackingHookData();
|
TrackingHookData* data = fBarView->GetTrackingHookData();
|
||||||
if (fAddState == kAddingRecents) {
|
if (fAddState == kAddingRecents) {
|
||||||
static const char* recentTitle[] = {TR_MARK("Recent documents"),
|
static const char* recentTitle[] = {
|
||||||
TR_MARK("Recent folders"), TR_MARK("Recent applications")};
|
B_TRANSLATE_MARK("Recent documents"),
|
||||||
|
B_TRANSLATE_MARK("Recent folders"),
|
||||||
|
B_TRANSLATE_MARK("Recent applications")};
|
||||||
const int recentType[] = {kRecentDocuments, kRecentFolders,
|
const int recentType[] = {kRecentDocuments, kRecentFolders,
|
||||||
kRecentApplications};
|
kRecentApplications};
|
||||||
const int recentTypes = 3;
|
const int recentTypes = 3;
|
||||||
@@ -167,8 +170,8 @@ TBeMenu::AddNextItem()
|
|||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
|
|
||||||
for (int i = 0; i < recentTypes; i++) {
|
for (int i = 0; i < recentTypes; i++) {
|
||||||
recentItem[i] = new TRecentsMenu(TR(recentTitle[i]), fBarView,
|
recentItem[i] = new TRecentsMenu(B_TRANSLATE(recentTitle[i]),
|
||||||
recentType[i]);
|
fBarView, recentType[i]);
|
||||||
|
|
||||||
if (recentItem[i])
|
if (recentItem[i])
|
||||||
enabled |= recentItem[i]->RecentsEnabled();
|
enabled |= recentItem[i]->RecentsEnabled();
|
||||||
@@ -233,65 +236,71 @@ TBeMenu::AddStandardBeMenuItems()
|
|||||||
BMenuItem* item;
|
BMenuItem* item;
|
||||||
BRoster roster;
|
BRoster roster;
|
||||||
if (!roster.IsRunning(kTrackerSignature)) {
|
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);
|
AddItem(item);
|
||||||
AddSeparatorItem();
|
AddSeparatorItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* kAboutHaikuMenuItemStr = TR_MARK(
|
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
|
||||||
"About Haiku" B_UTF8_ELLIPSIS);
|
"About Haiku" B_UTF8_ELLIPSIS);
|
||||||
static const char* kAboutThisSystemMenuItemStr = TR_MARK(
|
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
|
||||||
"About this system" B_UTF8_ELLIPSIS);
|
"About this system" B_UTF8_ELLIPSIS);
|
||||||
|
|
||||||
item = new BMenuItem(
|
item = new BMenuItem(
|
||||||
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
||||||
TR(kAboutHaikuMenuItemStr)
|
B_TRANSLATE(kAboutHaikuMenuItemStr)
|
||||||
#else
|
#else
|
||||||
TR(kAboutThisSystemMenuItemStr)
|
B_TRANSLATE(kAboutThisSystemMenuItemStr)
|
||||||
#endif
|
#endif
|
||||||
, new BMessage(kShowSplash));
|
, new BMessage(kShowSplash));
|
||||||
item->SetEnabled(!dragging);
|
item->SetEnabled(!dragging);
|
||||||
AddItem(item);
|
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
|
#ifdef SHOW_RECENT_FIND_ITEMS
|
||||||
item = new BMenuItem(
|
item = new BMenuItem(
|
||||||
TrackerBuildRecentFindItemsMenu(kFindMenuItemStr),
|
TrackerBuildRecentFindItemsMenu(kFindMenuItemStr),
|
||||||
new BMessage(kFindButton));
|
new BMessage(kFindButton));
|
||||||
#else
|
#else
|
||||||
item = new BMenuItem(TR(kFindMenuItemStr), new BMessage(kFindButton));
|
item = new BMenuItem(B_TRANSLATE(kFindMenuItemStr),
|
||||||
|
new BMessage(kFindButton));
|
||||||
#endif
|
#endif
|
||||||
item->SetEnabled(!dragging);
|
item->SetEnabled(!dragging);
|
||||||
AddItem(item);
|
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->SetEnabled(!dragging);
|
||||||
item->SetMarked(BDragger::AreDraggersDrawn());
|
item->SetMarked(BDragger::AreDraggersDrawn());
|
||||||
AddItem(item);
|
AddItem(item);
|
||||||
|
|
||||||
static const char* kMountMenuStr = TR_MARK("Mount");
|
static const char* kMountMenuStr = B_TRANSLATE_MARK("Mount");
|
||||||
|
|
||||||
#ifdef MOUNT_MENU_IN_DESKBAR
|
#ifdef MOUNT_MENU_IN_DESKBAR
|
||||||
DeskbarMountMenu* mountMenu = new DeskbarMountMenu(TR(kMountMenuStr));
|
DeskbarMountMenu* mountMenu = new DeskbarMountMenu(
|
||||||
|
B_TRANSLATE(kMountMenuStr));
|
||||||
mountMenu->SetEnabled(!dragging);
|
mountMenu->SetEnabled(!dragging);
|
||||||
AddItem(mountMenu);
|
AddItem(mountMenu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
item = new BMenuItem(TR("Deskbar preferences" B_UTF8_ELLIPSIS),
|
item = new BMenuItem(B_TRANSLATE("Deskbar preferences" B_UTF8_ELLIPSIS),
|
||||||
new BMessage(kConfigShow));
|
new BMessage(kConfigShow));
|
||||||
item->SetTarget(be_app);
|
item->SetTarget(be_app);
|
||||||
AddItem(item);
|
AddItem(item);
|
||||||
|
|
||||||
AddSeparatorItem();
|
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);
|
item->SetEnabled(!dragging);
|
||||||
shutdownMenu->AddItem(item);
|
shutdownMenu->AddItem(item);
|
||||||
|
|
||||||
static const char* kSuspendMenuItemStr = TR_MARK("Suspend");
|
static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend");
|
||||||
|
|
||||||
#ifdef APM_SUPPORT
|
#ifdef APM_SUPPORT
|
||||||
if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) {
|
if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) {
|
||||||
@@ -301,7 +310,8 @@ TBeMenu::AddStandardBeMenuItems()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
item = new BMenuItem(TR("Power off"), new BMessage(kShutdownSystem));
|
item = new BMenuItem(B_TRANSLATE("Power off"),
|
||||||
|
new BMessage(kShutdownSystem));
|
||||||
item->SetEnabled(!dragging);
|
item->SetEnabled(!dragging);
|
||||||
shutdownMenu->AddItem(item);
|
shutdownMenu->AddItem(item);
|
||||||
shutdownMenu->SetFont(be_plain_font);
|
shutdownMenu->SetFont(be_plain_font);
|
||||||
|
|||||||
@@ -29,15 +29,16 @@
|
|||||||
|
|
||||||
PreferencesWindow::PreferencesWindow(BRect frame)
|
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)
|
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
|
||||||
{
|
{
|
||||||
// Controls
|
// Controls
|
||||||
fMenuRecentDocuments = new BCheckBox(TR("Recent documents:"),
|
fMenuRecentDocuments = new BCheckBox(B_TRANSLATE("Recent documents:"),
|
||||||
new BMessage(kUpdateRecentCounts));
|
new BMessage(kUpdateRecentCounts));
|
||||||
fMenuRecentApplications = new BCheckBox(TR("Recent applications:"),
|
fMenuRecentApplications = new BCheckBox(
|
||||||
|
B_TRANSLATE("Recent applications:"),
|
||||||
new BMessage(kUpdateRecentCounts));
|
new BMessage(kUpdateRecentCounts));
|
||||||
fMenuRecentFolders = new BCheckBox(TR("Recent folders:"),
|
fMenuRecentFolders = new BCheckBox(B_TRANSLATE("Recent folders:"),
|
||||||
new BMessage(kUpdateRecentCounts));
|
new BMessage(kUpdateRecentCounts));
|
||||||
|
|
||||||
fMenuRecentDocumentCount = new BTextControl(NULL, NULL,
|
fMenuRecentDocumentCount = new BTextControl(NULL, NULL,
|
||||||
@@ -47,25 +48,29 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
|||||||
fMenuRecentFolderCount = new BTextControl(NULL, NULL,
|
fMenuRecentFolderCount = new BTextControl(NULL, NULL,
|
||||||
new BMessage(kUpdateRecentCounts));
|
new BMessage(kUpdateRecentCounts));
|
||||||
|
|
||||||
fAppsSort = new BCheckBox(TR("Sort running applications"),
|
fAppsSort = new BCheckBox(B_TRANSLATE("Sort running applications"),
|
||||||
new BMessage(kSortRunningApps));
|
new BMessage(kSortRunningApps));
|
||||||
fAppsSortTrackerFirst = new BCheckBox(TR("Tracker always first"),
|
fAppsSortTrackerFirst = new BCheckBox(B_TRANSLATE("Tracker always first"),
|
||||||
new BMessage(kTrackerFirst));
|
new BMessage(kTrackerFirst));
|
||||||
fAppsShowExpanders = new BCheckBox(TR("Show application expander"),
|
fAppsShowExpanders = new BCheckBox(
|
||||||
|
B_TRANSLATE("Show application expander"),
|
||||||
new BMessage(kSuperExpando));
|
new BMessage(kSuperExpando));
|
||||||
fAppsExpandNew = new BCheckBox(TR("Expand new applications"),
|
fAppsExpandNew = new BCheckBox(B_TRANSLATE("Expand new applications"),
|
||||||
new BMessage(kExpandNewTeams));
|
new BMessage(kExpandNewTeams));
|
||||||
|
|
||||||
fClock24Hours = new BCheckBox(TR("24 hour clock"), new BMessage(kMilTime));
|
fClock24Hours = new BCheckBox(B_TRANSLATE("24 hour clock"),
|
||||||
fClockSeconds = new BCheckBox(TR("Show seconds"),
|
new BMessage(kMilTime));
|
||||||
|
fClockSeconds = new BCheckBox(B_TRANSLATE("Show seconds"),
|
||||||
new BMessage(kShowSeconds));
|
new BMessage(kShowSeconds));
|
||||||
fClockEuropeanDate = new BCheckBox(TR("European date"),
|
fClockEuropeanDate = new BCheckBox(B_TRANSLATE("European date"),
|
||||||
new BMessage(kEuroDate));
|
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));
|
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* docTextView = fMenuRecentDocumentCount->TextView();
|
||||||
BTextView* appTextView = fMenuRecentApplicationCount->TextView();
|
BTextView* appTextView = fMenuRecentApplicationCount->TextView();
|
||||||
@@ -154,10 +159,10 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
|||||||
fClockBox = new BBox("fClockBox");
|
fClockBox = new BBox("fClockBox");
|
||||||
fWindowBox = new BBox("fWindowBox");
|
fWindowBox = new BBox("fWindowBox");
|
||||||
|
|
||||||
fMenuBox->SetLabel(TR("Menu"));
|
fMenuBox->SetLabel(B_TRANSLATE("Menu"));
|
||||||
fAppsBox->SetLabel(TR("Applications"));
|
fAppsBox->SetLabel(B_TRANSLATE("Applications"));
|
||||||
fClockBox->SetLabel(TR("Clock"));
|
fClockBox->SetLabel(B_TRANSLATE("Clock"));
|
||||||
fWindowBox->SetLabel(TR("Window"));
|
fWindowBox->SetLabel(B_TRANSLATE("Window"));
|
||||||
|
|
||||||
BView* view;
|
BView* view;
|
||||||
view = BLayoutBuilder::Group<>()
|
view = BLayoutBuilder::Group<>()
|
||||||
@@ -174,7 +179,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
|
|||||||
.Add(fMenuRecentApplicationCount)
|
.Add(fMenuRecentApplicationCount)
|
||||||
.End()
|
.End()
|
||||||
.End()
|
.End()
|
||||||
.Add(new BButton(TR("Edit menu" B_UTF8_ELLIPSIS),
|
.Add(new BButton(B_TRANSLATE("Edit menu" B_UTF8_ELLIPSIS),
|
||||||
new BMessage(kEditMenuInTracker)))
|
new BMessage(kEditMenuInTracker)))
|
||||||
.SetInsets(10, 10, 10, 10)
|
.SetInsets(10, 10, 10, 10)
|
||||||
.End()
|
.End()
|
||||||
|
|||||||
@@ -418,7 +418,8 @@ TReplicantTray::ShowReplicantMenu(BPoint point)
|
|||||||
if (fBarView->ShowingClock())
|
if (fBarView->ShowingClock())
|
||||||
fClock->ShowClockOptions(ConvertToScreen(point));
|
fClock->ShowClockOptions(ConvertToScreen(point));
|
||||||
else {
|
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->AddItem(item);
|
||||||
menu->SetTargetForItems(this);
|
menu->SetTargetForItems(this);
|
||||||
BPoint where = ConvertToScreen(point);
|
BPoint where = ConvertToScreen(point);
|
||||||
|
|||||||
@@ -563,14 +563,14 @@ TTimeView::ShowClockOptions(BPoint point)
|
|||||||
menu->SetFont(be_plain_font);
|
menu->SetFont(be_plain_font);
|
||||||
BMenuItem* item;
|
BMenuItem* item;
|
||||||
|
|
||||||
item = new BMenuItem(TR("Change time" B_UTF8_ELLIPSIS),
|
item = new BMenuItem(B_TRANSLATE("Change time" B_UTF8_ELLIPSIS),
|
||||||
new BMessage(kChangeClock));
|
new BMessage(kChangeClock));
|
||||||
menu->AddItem(item);
|
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);
|
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));
|
new BMessage(kShowCalendar));
|
||||||
menu->AddItem(item);
|
menu->AddItem(item);
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ TWindowMenu::AttachedToWindow()
|
|||||||
int32 itemCount = CountItems() + parentMenuItems;
|
int32 itemCount = CountItems() + parentMenuItems;
|
||||||
if (itemCount < 1) {
|
if (itemCount < 1) {
|
||||||
TWindowMenuItem* noWindowsItem =
|
TWindowMenuItem* noWindowsItem =
|
||||||
new TWindowMenuItem(TR("No windows"), -1, false, false);
|
new TWindowMenuItem(B_TRANSLATE("No windows"), -1, false, false);
|
||||||
|
|
||||||
noWindowsItem->SetEnabled(false);
|
noWindowsItem->SetEnabled(false);
|
||||||
|
|
||||||
@@ -188,19 +188,22 @@ TWindowMenu::AttachedToWindow()
|
|||||||
// it. (but we only add this option if the application is not Tracker.)
|
// it. (but we only add this option if the application is not Tracker.)
|
||||||
if (fApplicationSignature.ICompare(kTrackerSignature) != 0) {
|
if (fApplicationSignature.ICompare(kTrackerSignature) != 0) {
|
||||||
AddSeparatorItem();
|
AddSeparatorItem();
|
||||||
AddItem(new TShowHideMenuItem(TR("Quit application"), fTeam,
|
AddItem(new TShowHideMenuItem(B_TRANSLATE("Quit application"),
|
||||||
B_QUIT_REQUESTED));
|
fTeam, B_QUIT_REQUESTED));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if we are in drag mode, then don't add the window controls
|
// if we are in drag mode, then don't add the window controls
|
||||||
// to the menu
|
// to the menu
|
||||||
if (!dragging) {
|
if (!dragging) {
|
||||||
TShowHideMenuItem* hide =
|
TShowHideMenuItem* hide =
|
||||||
new TShowHideMenuItem(TR("Hide all"), fTeam, B_MINIMIZE_WINDOW);
|
new TShowHideMenuItem(B_TRANSLATE("Hide all"), fTeam,
|
||||||
|
B_MINIMIZE_WINDOW);
|
||||||
TShowHideMenuItem* show =
|
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 =
|
TShowHideMenuItem* close =
|
||||||
new TShowHideMenuItem(TR("Close all"), fTeam, B_QUIT_REQUESTED);
|
new TShowHideMenuItem(B_TRANSLATE("Close all"), fTeam,
|
||||||
|
B_QUIT_REQUESTED);
|
||||||
|
|
||||||
if (miniCount == itemCount)
|
if (miniCount == itemCount)
|
||||||
hide->SetEnabled(false);
|
hide->SetEnabled(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user