Author: siarzhuk Date: 2011-02-22 21:37:54 +0100 (Tue, 22 Feb 2011) New Revision: 40622 Changeset: http://dev.haiku-os.org/changeset/40622 Ticket: http://dev.haiku-os.org/ticket/7245 Modified: haiku/trunk/src/apps/devices/Device.cpp haiku/trunk/src/apps/devices/Device.h Log: A bit of extra localization support for Devices app. Partially fixes #7245. Modified: haiku/trunk/src/apps/devices/Device.cpp =================================================================== --- haiku/trunk/src/apps/devices/Device.cpp 2011-02-22 19:09:32 UTC (rev 40621) +++ haiku/trunk/src/apps/devices/Device.cpp 2011-02-22 20:37:54 UTC (rev 40622) @@ -40,7 +40,18 @@ B_TRANSLATE("ACPI controller") // 0x13 (added later) }; +// This list is only used to translate Device properties +static const char* kTranslateMarkString[] = { + B_TRANSLATE_MARK("unknown"), + B_TRANSLATE_MARK("Device"), + B_TRANSLATE_MARK("Computer"), + B_TRANSLATE_MARK("ACPI bus"), + B_TRANSLATE_MARK("PCI bus"), + B_TRANSLATE_MARK("ISA bus"), + B_TRANSLATE_MARK("Unknown device") +}; + Device::Device(Device* physicalParent, BusType busType, Category category, const BString& name, const BString& manufacturer, const BString& driverUsed, const BString& devPathsPublished) @@ -50,10 +61,10 @@ fCategory(category), fPhysicalParent(physicalParent) { - SetAttribute(B_TRANSLATE("Device name"), name); - SetAttribute(B_TRANSLATE("Manufacturer"), manufacturer); - SetAttribute(B_TRANSLATE("Driver used"), driverUsed); - SetAttribute(B_TRANSLATE("Device paths"), devPathsPublished); + SetAttribute(B_TRANSLATE("Device name"), B_TRANSLATE(name)); + SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE(manufacturer)); + SetAttribute(B_TRANSLATE("Driver used"), B_TRANSLATE(driverUsed)); + SetAttribute(B_TRANSLATE("Device paths"), B_TRANSLATE(devPathsPublished)); } @@ -128,6 +139,13 @@ BString +Device::GetBusTabName() +{ + return B_TRANSLATE("Bus Information"); +} + + +BString Device::GetAllStrings() { BString str; Modified: haiku/trunk/src/apps/devices/Device.h =================================================================== --- haiku/trunk/src/apps/devices/Device.h 2011-02-22 19:09:32 UTC (rev 40621) +++ haiku/trunk/src/apps/devices/Device.h 2011-02-22 20:37:54 UTC (rev 40622) @@ -88,8 +88,7 @@ virtual BString GetBusStrings(); virtual BString GetAllStrings(); - virtual BString GetBusTabName() - { return "Bus Information"; } + virtual BString GetBusTabName(); virtual Attribute GetAttribute(const BString& name) { return Attribute(name.String(),