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 BString
Device::GetBasicStrings() Device::GetBasicStrings()
{ {
BString str; BString str(B_TRANSLATE("Device Name\t\t\t\t: %Name%\n"
str << B_TRANSLATE("Device Name\t\t\t\t: ") << GetName() << "\n"; "Manufacturer\t\t\t: %Manufacturer%\n"
str << B_TRANSLATE("Manufacturer\t\t\t: ") << GetManufacturer() << "\n"; "Driver used\t\t\t\t: %DriverUsed%\n"
str << B_TRANSLATE("Driver used\t\t\t\t: ") << GetDriverUsed() << "\n"; "Device paths\t: %DevicePaths%"));
str << B_TRANSLATE("Device paths\t: ") << GetDevPathsPublished();
str.ReplaceFirst("%Name%", GetName());
str.ReplaceFirst("%Manufacturer%", GetManufacturer());
str.ReplaceFirst("%DriverUsed%", GetDriverUsed());
str.ReplaceFirst("%DevicePaths%", GetDevPathsPublished());
return str; return str;
} }
BString BString
Device::GetBusStrings() Device::GetBusStrings()
{ {
return "None"; return B_TRANSLATE("None");
} }
+12 -6
View File
@@ -48,17 +48,22 @@ DeviceACPI::InitFromAttributes()
} else if (rootACPIPath == "\\_TZ_") { } else if (rootACPIPath == "\\_TZ_") {
outlineName = B_TRANSLATE("ACPI Thermal Zone"); outlineName = B_TRANSLATE("ACPI Thermal Zone");
} else if (rootACPIPath == "\\_PR_.") { } 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 // each CPU node is considered a root node
outlineName << B_TRANSLATE("ACPI Processor Namespace '") outlineName << string.String();
<< nodeACPIPath << "'";
} else if (rootACPIPath == "\\_SI_") { } else if (rootACPIPath == "\\_SI_") {
outlineName = B_TRANSLATE("ACPI System Indicator"); outlineName = B_TRANSLATE("ACPI System Indicator");
} else { } 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("Device name"), outlineName.String());
SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implimented")); SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implemented"));
SetText(outlineName.String()); SetText(outlineName.String());
} }
@@ -79,7 +84,8 @@ DeviceACPI::GetBusAttributes()
BString BString
DeviceACPI::GetBusStrings() DeviceACPI::GetBusStrings()
{ {
BString str; BString str("Class Info:\t\t\t\t: %classInfo%");
str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"]; str.ReplaceFirst("%classInfo%", fAttributeMap["Class Info"]);
return str; return str;
} }
+4 -5
View File
@@ -19,7 +19,6 @@ extern "C" {
} }
DevicePCI::DevicePCI(Device* parent) DevicePCI::DevicePCI(Device* parent)
: :
Device(parent), Device(parent),
@@ -76,7 +75,7 @@ DevicePCI::InitFromAttributes()
const char *venFull; const char *venFull;
get_vendor_info(fVendorId, &venShort, &venFull); get_vendor_info(fVendorId, &venShort, &venFull);
if (!venShort && !venFull) { if (!venShort && !venFull) {
ManufacturerName << "Unknown"; ManufacturerName << B_TRANSLATE("Unknown");
} else if (venShort && venFull) { } else if (venShort && venFull) {
ManufacturerName << venFull << "(" << venShort << ")"; ManufacturerName << venFull << "(" << venShort << ")";
} else { } else {
@@ -90,7 +89,7 @@ DevicePCI::InitFromAttributes()
get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId, get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId,
&devShort, &devFull); &devShort, &devFull);
if (!devShort && !devFull) { if (!devShort && !devFull) {
DeviceName << "Unknown"; DeviceName << B_TRANSLATE("Unknown");
} else if (devShort && devFull) { } else if (devShort && devFull) {
DeviceName << devFull << "(" << devShort << ")"; DeviceName << devFull << "(" << devShort << ")";
} else { } else {
@@ -125,7 +124,7 @@ DevicePCI::GetBusAttributes()
BString BString
DevicePCI::GetBusStrings() DevicePCI::GetBusStrings()
{ {
BString str; BString str("Class Info:\t\t\t\t: %classInfo%");
str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"]; str.ReplaceFirst("%classInfo%", fAttributeMap["Class Info"]);
return str; return str;
} }
+5 -4
View File
@@ -53,13 +53,13 @@ DevicesApplication::AboutRequested()
void void
DevicesApplication::ShowAbout() 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" "\twritten by Pieter Panman\n"
"\n" "\n"
"\tBased on listdev by Jérôme Duval\n" "\tBased on listdev by Jérôme Duval\n"
"\tand the previous Devices preference\n" "\tand the previous Devices preference\n"
"\tby Jérôme Duval and Sikosis\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(); BTextView* view = alert->TextView();
BFont font; BFont font;
@@ -76,8 +76,9 @@ DevicesApplication::ShowAbout()
DevicesWindow::DevicesWindow() DevicesWindow::DevicesWindow()
: :
BWindow(BRect(50, 50, 750, 550), "Devices", B_TITLED_WINDOW, BWindow(BRect(50, 50, 750, 550), B_TRANSLATE("Devices"),
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS
| B_QUIT_ON_WINDOW_CLOSE) | B_QUIT_ON_WINDOW_CLOSE)
{ {
float minWidth; float minWidth;
+10
View File
@@ -76,6 +76,16 @@ Application Devices :
: Devices.rdef : 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 Includes [ FGristFiles DevicesInfo.cpp ] : [ FGristFiles isapnpids.h usbdevs.h
usbdevs_data.h ] ; usbdevs_data.h ] ;
Includes [ FGristFiles ConfigurationWindow.cpp ] : [ FGristFiles pcihdr.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 - Constructor
ResourceUsageWindow::ResourceUsageWindow(BRect frame, BList &list) 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) B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE)
{ {
InitWindow(list); InitWindow(list);