Localized, part of a GCI task (thanks protonux)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39767 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <TextView.h>
|
||||
|
||||
#include "ActivityWindow.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "ActivityMonitor"
|
||||
|
||||
const char* kSignature = "application/x-vnd.Haiku-ActivityMonitor";
|
||||
|
||||
@@ -61,9 +64,10 @@ ActivityMonitor::AboutRequested()
|
||||
/*static*/ void
|
||||
ActivityMonitor::ShowAbout()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", "ActivityMonitor\n"
|
||||
BAlert *alert = new BAlert(B_TRANSLATE("about"),
|
||||
B_TRANSLATE("ActivityMonitor\n"
|
||||
"\twritten by Axel Dörfler\n"
|
||||
"\tCopyright 2008, Haiku Inc.\n", "OK");
|
||||
"\tCopyright 2008, Haiku Inc.\n"), "OK");
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <Application.h>
|
||||
#include <Autolock.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Catalog.h>
|
||||
#include <Dragger.h>
|
||||
#include <fs_attr.h>
|
||||
#include <MenuItem.h>
|
||||
@@ -33,6 +34,8 @@
|
||||
#include "SystemInfo.h"
|
||||
#include "SystemInfoHandler.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "ActivityView"
|
||||
|
||||
template<typename ObjectType>
|
||||
class ListAddDeleter {
|
||||
@@ -991,7 +994,7 @@ ActivityView::MouseDown(BPoint where)
|
||||
BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false);
|
||||
menu->SetFont(be_plain_font);
|
||||
|
||||
BMenu* additionalMenu = new BMenu("Additional items");
|
||||
BMenu* additionalMenu = new BMenu(B_TRANSLATE("Additional items"));
|
||||
additionalMenu->SetFont(be_plain_font);
|
||||
|
||||
SystemInfo info;
|
||||
@@ -1018,7 +1021,8 @@ ActivityView::MouseDown(BPoint where)
|
||||
|
||||
menu->AddItem(new BMenuItem(additionalMenu));
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(fShowLegend ? "Hide legend" : "Show legend",
|
||||
menu->AddItem(new BMenuItem(fShowLegend ?
|
||||
B_TRANSLATE("Hide legend") : B_TRANSLATE("Show legend"),
|
||||
new BMessage(kMsgToggleLegend)));
|
||||
|
||||
menu->SetTargetForItems(this);
|
||||
@@ -1029,7 +1033,8 @@ ActivityView::MouseDown(BPoint where)
|
||||
menu->AddSeparatorItem();
|
||||
BMessage* message = new BMessage(kMsgRemoveView);
|
||||
message->AddPointer("view", this);
|
||||
menu->AddItem(item = new BMenuItem("Remove graph", message));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Remove graph"),
|
||||
message));
|
||||
item->SetTarget(window);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <File.h>
|
||||
#include <FindDirectory.h>
|
||||
#ifdef __HAIKU__
|
||||
@@ -25,6 +26,8 @@
|
||||
#include "DataSource.h"
|
||||
#include "SettingsWindow.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "ActivityWindow"
|
||||
|
||||
static const uint32 kMsgAddView = 'advw';
|
||||
static const uint32 kMsgShowSettings = 'shst';
|
||||
@@ -113,24 +116,27 @@ ActivityWindow::ActivityWindow()
|
||||
// add menu
|
||||
|
||||
// "File" menu
|
||||
BMenu* menu = new BMenu("File");
|
||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||
BMenuItem* item;
|
||||
|
||||
menu->AddItem(new BMenuItem("Add graph", new BMessage(kMsgAddView)));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Add graph"),
|
||||
new BMessage(kMsgAddView)));
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(item = new BMenuItem("About ActivityMonitor" B_UTF8_ELLIPSIS,
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
B_TRANSLATE("About ActivityMonitor" B_UTF8_ELLIPSIS),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->SetTargetForItems(this);
|
||||
item->SetTarget(be_app);
|
||||
menuBar->AddItem(menu);
|
||||
|
||||
// "Settings" menu
|
||||
menu = new BMenu("Settings");
|
||||
menu->AddItem(new BMenuItem("Settings" B_UTF8_ELLIPSIS,
|
||||
menu = new BMenu(B_TRANSLATE("Settings"));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS),
|
||||
new BMessage(kMsgShowSettings)));
|
||||
menu->SetTargetForItems(this);
|
||||
menuBar->AddItem(menu);
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <Catalog.h>
|
||||
#include <OS.h>
|
||||
#include <String.h>
|
||||
|
||||
#include "SystemInfo.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "DataSource"
|
||||
|
||||
|
||||
const DataSource* kSources[] = {
|
||||
new UsedMemoryDataSource(),
|
||||
@@ -329,14 +333,14 @@ UsedMemoryDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
UsedMemoryDataSource::Label() const
|
||||
{
|
||||
return "Used memory";
|
||||
return B_TRANSLATE("Used memory");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
UsedMemoryDataSource::ShortLabel() const
|
||||
{
|
||||
return "Memory";
|
||||
return B_TRANSLATE("Memory");
|
||||
}
|
||||
|
||||
|
||||
@@ -378,14 +382,14 @@ CachedMemoryDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
CachedMemoryDataSource::Label() const
|
||||
{
|
||||
return "Cached memory";
|
||||
return B_TRANSLATE("Cached memory");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
CachedMemoryDataSource::ShortLabel() const
|
||||
{
|
||||
return "Cache";
|
||||
return B_TRANSLATE("Cache");
|
||||
}
|
||||
|
||||
|
||||
@@ -430,14 +434,14 @@ SwapSpaceDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
SwapSpaceDataSource::Label() const
|
||||
{
|
||||
return "Swap space";
|
||||
return B_TRANSLATE("Swap space");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
SwapSpaceDataSource::ShortLabel() const
|
||||
{
|
||||
return "Swap";
|
||||
return B_TRANSLATE("Swap");
|
||||
}
|
||||
|
||||
|
||||
@@ -485,14 +489,14 @@ BlockCacheDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
BlockCacheDataSource::Label() const
|
||||
{
|
||||
return "Block cache memory";
|
||||
return B_TRANSLATE("Block cache memory");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
BlockCacheDataSource::ShortLabel() const
|
||||
{
|
||||
return "Block cache";
|
||||
return B_TRANSLATE("Block cache");
|
||||
}
|
||||
|
||||
|
||||
@@ -532,14 +536,14 @@ SemaphoresDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
SemaphoresDataSource::Label() const
|
||||
{
|
||||
return "Semaphores";
|
||||
return B_TRANSLATE("Semaphores");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
SemaphoresDataSource::ShortLabel() const
|
||||
{
|
||||
return "Sems";
|
||||
return B_TRANSLATE("Sems");
|
||||
}
|
||||
|
||||
|
||||
@@ -586,7 +590,7 @@ PortsDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
PortsDataSource::Label() const
|
||||
{
|
||||
return "Ports";
|
||||
return B_TRANSLATE("Ports");
|
||||
}
|
||||
|
||||
|
||||
@@ -633,7 +637,7 @@ ThreadsDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
ThreadsDataSource::Label() const
|
||||
{
|
||||
return "Threads";
|
||||
return B_TRANSLATE("Threads");
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +684,7 @@ TeamsDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
TeamsDataSource::Label() const
|
||||
{
|
||||
return "Teams";
|
||||
return B_TRANSLATE("Teams");
|
||||
}
|
||||
|
||||
|
||||
@@ -727,14 +731,14 @@ RunningAppsDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
RunningAppsDataSource::Label() const
|
||||
{
|
||||
return "Running applications";
|
||||
return B_TRANSLATE("Running applications");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
RunningAppsDataSource::ShortLabel() const
|
||||
{
|
||||
return "Apps";
|
||||
return B_TRANSLATE("Apps");
|
||||
}
|
||||
|
||||
|
||||
@@ -839,7 +843,7 @@ CPUUsageDataSource::ShortLabel() const
|
||||
const char*
|
||||
CPUUsageDataSource::Name() const
|
||||
{
|
||||
return "CPU usage";
|
||||
return B_TRANSLATE("CPU usage");
|
||||
}
|
||||
|
||||
|
||||
@@ -967,21 +971,21 @@ CPUCombinedUsageDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
CPUCombinedUsageDataSource::Label() const
|
||||
{
|
||||
return "CPU usage";
|
||||
return B_TRANSLATE("CPU usage");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
CPUCombinedUsageDataSource::ShortLabel() const
|
||||
{
|
||||
return "CPU";
|
||||
return B_TRANSLATE("CPU");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
CPUCombinedUsageDataSource::Name() const
|
||||
{
|
||||
return "CPU usage (combined)";
|
||||
return B_TRANSLATE("CPU usage (combined)");
|
||||
}
|
||||
|
||||
|
||||
@@ -1065,21 +1069,21 @@ PageFaultsDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
PageFaultsDataSource::Label() const
|
||||
{
|
||||
return "Page faults";
|
||||
return B_TRANSLATE("Page faults");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
PageFaultsDataSource::ShortLabel() const
|
||||
{
|
||||
return "P-faults";
|
||||
return B_TRANSLATE("P-faults");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
PageFaultsDataSource::Name() const
|
||||
{
|
||||
return "Page faults";
|
||||
return B_TRANSLATE("Page faults");
|
||||
}
|
||||
|
||||
|
||||
@@ -1166,21 +1170,21 @@ NetworkUsageDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
NetworkUsageDataSource::Label() const
|
||||
{
|
||||
return fIn ? "Receiving" : "Sending";
|
||||
return fIn ? B_TRANSLATE("Receiving") : B_TRANSLATE("Sending");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
NetworkUsageDataSource::ShortLabel() const
|
||||
{
|
||||
return fIn ? "RX" : "TX";
|
||||
return fIn ? B_TRANSLATE("RX") : B_TRANSLATE("TX");
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
NetworkUsageDataSource::Name() const
|
||||
{
|
||||
return fIn ? "Network receive" : "Network send";
|
||||
return fIn ? B_TRANSLATE("Network receive") : B_TRANSLATE("Network send");
|
||||
}
|
||||
|
||||
|
||||
@@ -1250,7 +1254,8 @@ ClipboardSizeDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
ClipboardSizeDataSource::Label() const
|
||||
{
|
||||
return fText ? "Text clipboard size" : "Raw clipboard size";
|
||||
return fText ?
|
||||
B_TRANSLATE("Text clipboard size") : B_TRANSLATE("Raw clipboard size");
|
||||
}
|
||||
|
||||
|
||||
@@ -1304,7 +1309,7 @@ MediaNodesDataSource::NextValue(SystemInfo& info)
|
||||
const char*
|
||||
MediaNodesDataSource::Label() const
|
||||
{
|
||||
return "Media nodes";
|
||||
return B_TRANSLATE("Media nodes");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,19 @@ Application ActivityMonitor :
|
||||
SystemInfo.cpp
|
||||
SystemInfoHandler.cpp
|
||||
|
||||
: be tracker media libbnetapi.so $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS)
|
||||
: ActivityMonitor.rdef
|
||||
:
|
||||
be tracker media libbnetapi.so $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS)
|
||||
$(HAIKU_LOCALE_LIBS)
|
||||
:
|
||||
ActivityMonitor.rdef
|
||||
;
|
||||
|
||||
DoCatalogs ActivityMonitor :
|
||||
x-vnd.Haiku-ActivityMonitor
|
||||
:
|
||||
ActivityMonitor.cpp
|
||||
ActivityView.cpp
|
||||
ActivityWindow.cpp
|
||||
DataSource.cpp
|
||||
SettingsWindow.cpp
|
||||
;
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Catalog.h>
|
||||
#include <GridLayoutBuilder.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Slider.h>
|
||||
#include <String.h>
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "SettingsWindow"
|
||||
|
||||
|
||||
static const uint32 kMsgUpdateTimeInterval = 'upti';
|
||||
|
||||
@@ -91,7 +95,7 @@ SettingsWindow::SettingsWindow(ActivityWindow* target)
|
||||
{
|
||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||
|
||||
fIntervalSlider = new IntervalSlider("Update time interval:",
|
||||
fIntervalSlider = new IntervalSlider(B_TRANSLATE("Update time interval:"),
|
||||
new BMessage(kMsgUpdateTimeInterval), kNumUpdateIntervals);
|
||||
fIntervalSlider->SetInterval(target->RefreshInterval());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user