Ticket #6080: diskprobeLocalizationUpdate.patch

File diskprobeLocalizationUpdate.patch, 8.8 KB (added by Karvjorm, 14 years ago)

An updated localization patch for DiskProbe

  • src/apps/diskprobe/ProbeView.cpp

     
    490490    plainFont.SetSize(10.0);
    491491
    492492    BRect rect = Bounds();
    493     fStopButton = new BButton(BRect(0, 0, 20, 20), B_EMPTY_STRING, "Stop",
    494         new BMessage(kMsgStopFind), B_FOLLOW_TOP | B_FOLLOW_RIGHT);
     493    fStopButton = new BButton(BRect(0, 0, 20, 20), B_EMPTY_STRING,
     494        B_TRANSLATE("Stop"), new BMessage(kMsgStopFind),
     495        B_FOLLOW_TOP | B_FOLLOW_RIGHT);
    495496    fStopButton->SetFont(&plainFont);
    496497    fStopButton->ResizeToPreferred();
    497498    fStopButton->MoveTo(rect.right - 4 - fStopButton->Bounds().Width(), 4);
     
    575576    rect.left = rect.right + 4;
    576577    rect.right = rect.left + 75;
    577578    rect.OffsetBy(0, 2);
    578     fSizeView = new BStringView(rect, B_EMPTY_STRING, B_TRANSLATE("of 0x0"));
     579    fSizeView = new BStringView(rect, B_EMPTY_STRING, B_TRANSLATE_COMMENT("of "
     580        "0x0", "This is a part of \"Block 0xXXXX of 0x0026\" message. In "
     581        "languages without 'of' structure it can be replaced simply "
     582        "with '/'."));
    579583    fSizeView->SetFont(&plainFont);
    580584    AddChild(fSizeView);
    581585    UpdateFileSizeView();
     
    11001104            // If the user had to wait more than 8 seconds for the result,
    11011105            // we are trying to please him with a requester...
    11021106            (new BAlert(B_TRANSLATE("DiskProbe request"),
    1103                 B_TRANSLATE("Could not find search string."), B_TRANSLATE("OK"), NULL, NULL,
    1104                 B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL);
     1107                B_TRANSLATE("Could not find search string."),
     1108                B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
     1109                B_WARNING_ALERT))->Go(NULL);
    11051110        } else
    11061111            beep();
    11071112    }
     
    13071312    if (menu->CountItems() == 0) {
    13081313        // if there are no attributes, add an item to the menu
    13091314        // that says so
    1310         BMenuItem *item = new BMenuItem("none", NULL);
     1315        BMenuItem *item = new BMenuItem(B_TRANSLATE_COMMENT("none",
     1316            "No attributes"), NULL);
    13111317        item->SetEnabled(false);
    13121318        menu->AddItem(item);
    13131319    }
     
    15011507
    15021508    // "View" menu
    15031509
    1504     menu = new BMenu(B_TRANSLATE("View"));
     1510    menu = new BMenu(B_TRANSLATE_COMMENT("View",
     1511        "This is the last menubar item \"File Edit Block View\""));
    15051512
    15061513    // Number Base (hex/decimal)
    15071514
    1508     subMenu = new BMenu(B_TRANSLATE("Base"));
     1515    subMenu = new BMenu(B_TRANSLATE_COMMENT("Base", "A menu item, the number "
     1516        "that is basis for a system of calculation. The base 10 system is a "
     1517        "decimal system. This is in the same menu window than \"Font size\" "
     1518        "and \"BlockSize\""));
    15091519    message = new BMessage(kMsgBaseType);
    15101520    message->AddInt32("base_type", kDecimalBase);
    1511     subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Decimal"), message, 'D'));
     1521    subMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Decimal",
     1522        "A menu item, as sort as possible, noun is recommended if it is "
     1523        "shorter than adjective."), message, 'D'));
    15121524    item->SetTarget(this);
    15131525    if (fHeaderView->Base() == kDecimalBase)
    15141526        item->SetMarked(true);
    15151527
    15161528    message = new BMessage(kMsgBaseType);
    15171529    message->AddInt32("base_type", kHexBase);
    1518     subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Hex"), message, 'H'));
     1530    subMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Hex",
     1531        "A menu item, as sort as possible, noun is recommended if it is "
     1532        "shorter than adjective."), message, 'H'));
    15191533    item->SetTarget(this);
    15201534    if (fHeaderView->Base() == kHexBase)
    15211535        item->SetMarked(true);
     
    15251539
    15261540    // Block Size
    15271541
    1528     subMenu = new BMenu(B_TRANSLATE("BlockSize"));
     1542    subMenu = new BMenu(B_TRANSLATE_COMMENT("BlockSize", "A menu item, a "
     1543        "shortened form from \"block size\". This is in the same menu window"
     1544        "than \"Base\" and \"Font size\""));
    15291545    subMenu->SetRadioMode(true);
    15301546    const uint32 blockSizes[] = {512, 1024, 2048};
    15311547    for (uint32 i = 0; i < sizeof(blockSizes) / sizeof(blockSizes[0]); i++) {
     
    15701586            item->SetMarked(true);
    15711587    }
    15721588    subMenu->AddSeparatorItem();
    1573     subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Fit"),
     1589    subMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Fit",
     1590        "Size of fonts, fits to available room"),
    15741591        message = new BMessage(kMsgFontSize)));
    15751592    message->AddFloat("font_size", 0.0f);
    15761593    if (fontSize == 0)
     
    17561773
    17571774        _RemoveTypeEditor();
    17581775
    1759         fTypeView = new TypeView(Frame(), B_TRANSLATE("type shell"), index, fEditor,
     1776        fTypeView = new TypeView(Frame(), "type shell", index, fEditor,
    17601777            B_FOLLOW_ALL);
    17611778
    17621779        if (Parent() != NULL)
  • src/apps/diskprobe/FindWindow.cpp

     
    509509    message->AddInt8("mode", kAsciiMode);
    510510    if (mode == kAsciiMode)
    511511        item->SetMarked(true);
    512     fMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Hexadecimal"),
    513         message = new BMessage(kMsgFindMode)));
     512    fMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Hexadecimal",
     513        "A menu item, as sort as possible, noun is recommended if it is "
     514        "shorter than adjective."), message = new BMessage(kMsgFindMode)));
    514515    message->AddInt8("mode", kHexMode);
    515516    if (mode == kHexMode)
    516517        item->SetMarked(true);
  • src/apps/diskprobe/TypeEditors.cpp

     
    195195
    196196
    197197StringEditor::StringEditor(BRect rect, DataEditor& editor)
    198     : TypeEditorView(rect, "String editor", B_FOLLOW_ALL, 0, editor)
     198    : TypeEditorView(rect, B_TRANSLATE("String editor"), B_FOLLOW_ALL, 0, editor)
    199199{
    200200    SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    201201
     
    746746
    747747
    748748BooleanEditor::BooleanEditor(BRect rect, DataEditor &editor)
    749     : TypeEditorView(rect, "Boolean editor", B_FOLLOW_NONE, 0, editor)
     749    : TypeEditorView(rect, B_TRANSLATE("Boolean editor"), B_FOLLOW_NONE, 0, editor)
    750750{
    751751    SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    752752
     
    843843
    844844
    845845ImageView::ImageView(BRect rect, DataEditor &editor)
    846     : TypeEditorView(rect, B_TRANSLATE("Image view"), B_FOLLOW_NONE,
     846    : TypeEditorView(rect, B_TRANSLATE_COMMENT("Image view", "Image means "
     847        "here a picture file, not a disk image."), B_FOLLOW_NONE,
    847848    B_WILL_DRAW, editor),
    848849    fBitmap(NULL),
    849850    fScaleSlider(NULL)
     
    871872#endif
    872873
    873874    fDescriptionView = new BStringView(Bounds(), "",
    874         B_TRANSLATE("Could not read image"), B_FOLLOW_NONE);
     875        B_TRANSLATE_COMMENT("Could not read image", "Image means "
     876        "here a picture file, not a disk image."), B_FOLLOW_NONE);
    875877    fDescriptionView->SetAlignment(B_ALIGN_CENTER);
    876878
    877879    AddChild(fDescriptionView);
     
    10751077                break;
    10761078        }
    10771079        snprintf(buffer, sizeof(buffer), "%s, %g x %g, %s", type,
    1078             fBitmap->Bounds().Width() + 1, fBitmap->Bounds().Height() + 1, colorSpace);
     1080            fBitmap->Bounds().Width() + 1, fBitmap->Bounds().Height() + 1,
     1081            colorSpace);
    10791082        fDescriptionView->SetText(buffer);
    10801083    } else
    1081         fDescriptionView->SetText(B_TRANSLATE("Could not read image"));
     1084        fDescriptionView->SetText(B_TRANSLATE_COMMENT("Could not read image",
     1085            "Image means here a picture file, not a disk image."));
    10821086
    10831087    // Update the view size to match the image and its description
    10841088
     
    11841188    fTextView->SetText("");
    11851189
    11861190    char text[512];
    1187     snprintf(text, sizeof(text), B_TRANSLATE("what: '%.4s'\n\n"), (char*)&message.what);
     1191    snprintf(text, sizeof(text), B_TRANSLATE_COMMENT("what: '%.4s'\n\n",
     1192        "'What' is a message specifier that defines the type of the message."),
     1193        (char*)&message.what);
    11881194    fTextView->Insert(text);
    11891195
    11901196    type_code type;
     
    13531359GetNthTypeEditor(int32 index, const char** _name)
    13541360{
    13551361    static const char* kEditors[] = {
    1356         B_TRANSLATE("Text"),
    1357         B_TRANSLATE("Number"),
    1358         B_TRANSLATE("Boolean"),
    1359         B_TRANSLATE("Message"),
    1360         B_TRANSLATE("Image")
     1362        B_TRANSLATE_COMMENT("Text", "This is the type of editor"),
     1363        B_TRANSLATE_COMMENT("Number", "This is the type of editor"),
     1364        B_TRANSLATE_COMMENT("Boolean", "This is the type of editor"),
     1365        B_TRANSLATE_COMMENT("Message", "This is the type of view"),
     1366        B_TRANSLATE_COMMENT("Image", "This is the type of view")
    13611367    };
    13621368
    13631369    if (index < 0 || index >= int32(sizeof(kEditors) / sizeof(kEditors[0])))
  • src/apps/diskprobe/DiskProbe.cpp

     
    364364        if (status != B_OK) {
    365365            char buffer[1024];
    366366            snprintf(buffer, sizeof(buffer),
    367                 B_TRANSLATE("Could not open \"%s\":\n"
    368                 "%s"),
     367                B_TRANSLATE_COMMENT("Could not open \"%s\":\n"
     368                "%s", "Opening of entry reference buffer for a DiskProbe "
     369                "request Alert message. The name of entry reference and "
     370                "error message is shown."),
    369371                ref.name, strerror(status));
    370372
    371373            (new BAlert(B_TRANSLATE("DiskProbe request"),