It is yet another localization patch from Jorma Karvonen. :-D Fixes #7111. Thanks.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40507 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Siarzhuk Zharski
2011-02-15 11:58:00 +00:00
parent 1c0ab34c37
commit 405318137d
6 changed files with 44 additions and 23 deletions
+11 -6
View File
@@ -107,18 +107,23 @@ Device::GetAllAttributes()
BString
Device::GetBasicStrings()
{
BString str;
str << B_TRANSLATE("Device Name\t\t\t\t: ") << GetName() << "\n";
str << B_TRANSLATE("Manufacturer\t\t\t: ") << GetManufacturer() << "\n";
str << B_TRANSLATE("Driver used\t\t\t\t: ") << GetDriverUsed() << "\n";
str << B_TRANSLATE("Device paths\t: ") << GetDevPathsPublished();
BString str(B_TRANSLATE("Device Name\t\t\t\t: %Name%\n"
"Manufacturer\t\t\t: %Manufacturer%\n"
"Driver used\t\t\t\t: %DriverUsed%\n"
"Device paths\t: %DevicePaths%"));
str.ReplaceFirst("%Name%", GetName());
str.ReplaceFirst("%Manufacturer%", GetManufacturer());
str.ReplaceFirst("%DriverUsed%", GetDriverUsed());
str.ReplaceFirst("%DevicePaths%", GetDevPathsPublished());
return str;
}
BString
Device::GetBusStrings()
{
return "None";
return B_TRANSLATE("None");
}
+12 -6
View File
@@ -48,17 +48,22 @@ DeviceACPI::InitFromAttributes()
} else if (rootACPIPath == "\\_TZ_") {
outlineName = B_TRANSLATE("ACPI Thermal Zone");
} else if (rootACPIPath == "\\_PR_.") {
// This allows to localize apostrophes, too
BString string(B_TRANSLATE("ACPI Processor Namespace '%2'"));
string.ReplaceFirst("%2", nodeACPIPath);
// each CPU node is considered a root node
outlineName << B_TRANSLATE("ACPI Processor Namespace '")
<< nodeACPIPath << "'";
outlineName << string.String();
} else if (rootACPIPath == "\\_SI_") {
outlineName = B_TRANSLATE("ACPI System Indicator");
} else {
outlineName << B_TRANSLATE("ACPI node '") << nodeACPIPath << "'";
// This allows to localize apostrophes, too
BString string(B_TRANSLATE("ACPI node '%1'"));
string.ReplaceFirst("%1", nodeACPIPath);
outlineName << string.String();
}
SetAttribute(B_TRANSLATE("Device name"), outlineName.String());
SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implimented"));
SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implemented"));
SetText(outlineName.String());
}
@@ -79,7 +84,8 @@ DeviceACPI::GetBusAttributes()
BString
DeviceACPI::GetBusStrings()
{
BString str;
str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"];
BString str("Class Info:\t\t\t\t: %classInfo%");
str.ReplaceFirst("%classInfo%", fAttributeMap["Class Info"]);
return str;
}
+4 -5
View File
@@ -19,7 +19,6 @@ extern "C" {
}
DevicePCI::DevicePCI(Device* parent)
:
Device(parent),
@@ -76,7 +75,7 @@ DevicePCI::InitFromAttributes()
const char *venFull;
get_vendor_info(fVendorId, &venShort, &venFull);
if (!venShort && !venFull) {
ManufacturerName << "Unknown";
ManufacturerName << B_TRANSLATE("Unknown");
} else if (venShort && venFull) {
ManufacturerName << venFull << "(" << venShort << ")";
} else {
@@ -90,7 +89,7 @@ DevicePCI::InitFromAttributes()
get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId,
&devShort, &devFull);
if (!devShort && !devFull) {
DeviceName << "Unknown";
DeviceName << B_TRANSLATE("Unknown");
} else if (devShort && devFull) {
DeviceName << devFull << "(" << devShort << ")";
} else {
@@ -125,7 +124,7 @@ DevicePCI::GetBusAttributes()
BString
DevicePCI::GetBusStrings()
{
BString str;
str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"];
BString str("Class Info:\t\t\t\t: %classInfo%");
str.ReplaceFirst("%classInfo%", fAttributeMap["Class Info"]);
return str;
}
+6 -5
View File
@@ -53,13 +53,13 @@ DevicesApplication::AboutRequested()
void
DevicesApplication::ShowAbout()
{
BAlert* alert = new BAlert(B_TRANSLATE("about"), B_TRANSLATE("Devices\n"
BAlert* alert = new BAlert("about", B_TRANSLATE("Devices\n"
"\twritten by Pieter Panman\n"
"\n"
"\tBased on listdev by Jérôme Duval\n"
"\tand the previous Devices preference\n"
"\tby Jérôme Duval and Sikosis\n"
"\tCopyright 2009, Haiku, Inc.\n"), "OK");
"\tCopyright 2009, Haiku, Inc.\n"), B_TRANSLATE("OK"));
BTextView* view = alert->TextView();
BFont font;
@@ -76,9 +76,10 @@ DevicesApplication::ShowAbout()
DevicesWindow::DevicesWindow()
:
BWindow(BRect(50, 50, 750, 550), "Devices", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS
| B_QUIT_ON_WINDOW_CLOSE)
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE("Devices"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS
| B_QUIT_ON_WINDOW_CLOSE)
{
float minWidth;
float maxWidth;
+10
View File
@@ -76,6 +76,16 @@ Application Devices :
: Devices.rdef
;
DoCatalogs Devices :
x-vnd.Haiku-Devices
:
DevicesApplication.cpp
DevicesView.cpp
DevicePCI.cpp
PropertyList.cpp
PropertyListPlain.cpp
;
Includes [ FGristFiles DevicesInfo.cpp ] : [ FGristFiles isapnpids.h usbdevs.h
usbdevs_data.h ] ;
Includes [ FGristFiles ConfigurationWindow.cpp ] : [ FGristFiles pcihdr.h ] ;
+1 -1
View File
@@ -189,7 +189,7 @@ RangeItem::Compare(const void *firstArg, const void *secondArg)
// ResourceUsageWindow - Constructor
ResourceUsageWindow::ResourceUsageWindow(BRect frame, BList &list)
: BWindow (frame, "Resource Usage", B_TITLED_WINDOW_LOOK,
: BWindow (frame, B_TRANSLATE("Resource Usage"), B_TITLED_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE)
{
InitWindow(list);