Ticket #7111: devices-localization-update.patch

File devices-localization-update.patch, 5.8 KB (added by Karvjorm, 13 years ago)

A Devices localization update

  • src/apps/devices/Device.cpp

     
    108108Device::GetBasicStrings()
    109109{
    110110    BString str;
    111     str << B_TRANSLATE("Device Name\t\t\t\t: ") << GetName() << "\n";
    112     str << B_TRANSLATE("Manufacturer\t\t\t: ") << GetManufacturer() << "\n";
    113     str << B_TRANSLATE("Driver used\t\t\t\t: ") << GetDriverUsed() << "\n";
    114     str << B_TRANSLATE("Device paths\t: ") << GetDevPathsPublished();
     111    str << B_TRANSLATE("Device Name") << "\t\t\t\t: " << GetName() << "\n";
     112    str << B_TRANSLATE("Manufacturer") << "\t\t\t: " << GetManufacturer() << "\n";
     113    str << B_TRANSLATE("Driver used") << "\t\t\t\t: " << GetDriverUsed() << "\n";
     114    str << B_TRANSLATE("Device paths") << "\t: " << GetDevPathsPublished();
    115115    return str;
    116116}
    117117
    118118BString
    119119Device::GetBusStrings()
    120120{
    121     return "None";
     121    return B_TRANSLATE("None");
    122122}
    123123
    124124
  • src/apps/devices/ResourceUsageWindow.cpp

     
    189189
    190190// ResourceUsageWindow - Constructor
    191191ResourceUsageWindow::ResourceUsageWindow(BRect frame, BList &list)
    192     : BWindow (frame, "Resource Usage", B_TITLED_WINDOW_LOOK,
     192    : BWindow (frame, B_TRANSLATE("Resource Usage"), B_TITLED_WINDOW_LOOK,
    193193        B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE)
    194194{
    195195    InitWindow(list);
  • src/apps/devices/DevicesApplication.cpp

     
    5353void
    5454DevicesApplication::ShowAbout()
    5555{
    56     BAlert* alert = new BAlert(B_TRANSLATE("about"), B_TRANSLATE("Devices\n"
     56    BAlert* alert = new BAlert("about", B_TRANSLATE("Devices\n"
    5757        "\twritten by Pieter Panman\n"
    5858        "\n"
    5959        "\tBased on listdev by Jérôme Duval\n"
    6060        "\tand the previous Devices preference\n"
    6161        "\tby Jérôme Duval and Sikosis\n"
    62         "\tCopyright 2009, Haiku, Inc.\n"), "OK");
     62        "\tCopyright 2009, Haiku, Inc.\n"), B_TRANSLATE("OK"));
    6363    BTextView* view = alert->TextView();
    6464    BFont font;
    6565
     
    7676
    7777DevicesWindow::DevicesWindow()
    7878    :
    79     BWindow(BRect(50, 50, 750, 550), "Devices", B_TITLED_WINDOW,
    80         B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS
    81             | B_QUIT_ON_WINDOW_CLOSE)
     79    BWindow(BRect(50, 50, 750, 550), B_TRANSLATE("Devices"),
     80        B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
     81        | B_AUTO_UPDATE_SIZE_LIMITS
     82        | B_QUIT_ON_WINDOW_CLOSE)
    8283{
    8384    float minWidth;
    8485    float maxWidth;
  • src/apps/devices/Jamfile

     
    7676    : Devices.rdef
    7777;
    7878
     79DoCatalogs Devices :
     80    x-vnd.Haiku-Devices
     81    :
     82    DevicesApplication.cpp
     83    DevicesView.cpp
     84    DevicePCI.cpp
     85    PropertyList.cpp
     86    PropertyListPlain.cpp
     87;
     88
    7989Includes [ FGristFiles DevicesInfo.cpp ] : [ FGristFiles isapnpids.h usbdevs.h
    8090    usbdevs_data.h ] ;
    8191Includes [ FGristFiles ConfigurationWindow.cpp ] : [ FGristFiles pcihdr.h ] ;
  • src/apps/devices/DevicePCI.cpp

     
    1919}
    2020
    2121
    22 
    2322DevicePCI::DevicePCI(Device* parent)
    2423    :
    2524    Device(parent),
     
    7675    const char *venFull;
    7776    get_vendor_info(fVendorId, &venShort, &venFull);
    7877    if (!venShort && !venFull) {
    79         ManufacturerName << "Unknown";
     78        ManufacturerName << B_TRANSLATE("Unknown");
    8079    } else if (venShort && venFull) {
    8180        ManufacturerName << venFull << "(" << venShort << ")";
    8281    } else {
     
    9089    get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId,
    9190        &devShort, &devFull);
    9291    if (!devShort && !devFull) {
    93         DeviceName << "Unknown";
     92        DeviceName << B_TRANSLATE("Unknown");
    9493    } else if (devShort && devFull) {
    9594        DeviceName << devFull << "(" << devShort << ")";
    9695    } else {
     
    126125DevicePCI::GetBusStrings()
    127126{
    128127    BString str;
    129     str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"];
     128    str << B_TRANSLATE("Class Info:") << "\t\t\t\t: "
     129        << fAttributeMap["Class Info"];
    130130    return str;
    131131}
  • src/apps/devices/DeviceACPI.cpp

     
    4848    } else if (rootACPIPath == "\\_TZ_") {
    4949        outlineName = B_TRANSLATE("ACPI Thermal Zone");
    5050    } else if (rootACPIPath == "\\_PR_.") {
     51        /* This allows to localize apostrophes, too */
     52        BString str0(B_TRANSLATE("ACPI Processor Namespace '%2'"));
     53        str0.ReplaceFirst("%2", nodeACPIPath);
    5154        // each CPU node is considered a root node
    52         outlineName << B_TRANSLATE("ACPI Processor Namespace '")
    53             << nodeACPIPath << "'";
     55        outlineName << str0.String();
    5456    } else if (rootACPIPath == "\\_SI_") {
    5557        outlineName = B_TRANSLATE("ACPI System Indicator");
    5658    } else {
    57         outlineName << B_TRANSLATE("ACPI node '") << nodeACPIPath << "'";
     59        /* This allows to localize apostrophes, too */
     60        BString str1(B_TRANSLATE("ACPI node '%1'"));
     61        str1.ReplaceFirst("%1", nodeACPIPath);
     62        outlineName << str1.String();
    5863    }
    5964
    6065    SetAttribute(B_TRANSLATE("Device name"), outlineName.String());
    61     SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implimented"));
     66    SetAttribute(B_TRANSLATE("Manufacturer"), B_TRANSLATE("Not implemented"));
    6267
    6368    SetText(outlineName.String());
    6469}
     
    8085DeviceACPI::GetBusStrings()
    8186{
    8287    BString str;
    83     str << "Class Info:\t\t\t\t: " << fAttributeMap["Class Info"];
     88    str << B_TRANSLATE("Class Info:") << "\t\t\t\t: " << fAttributeMap["Class Info"];
    8489    return str;
    8590}