Ticket #6080: diskprobeLocalizationUpdate.patch
File diskprobeLocalizationUpdate.patch, 8.8 KB (added by , 14 years ago) |
---|
-
src/apps/diskprobe/ProbeView.cpp
490 490 plainFont.SetSize(10.0); 491 491 492 492 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); 495 496 fStopButton->SetFont(&plainFont); 496 497 fStopButton->ResizeToPreferred(); 497 498 fStopButton->MoveTo(rect.right - 4 - fStopButton->Bounds().Width(), 4); … … 575 576 rect.left = rect.right + 4; 576 577 rect.right = rect.left + 75; 577 578 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 '/'.")); 579 583 fSizeView->SetFont(&plainFont); 580 584 AddChild(fSizeView); 581 585 UpdateFileSizeView(); … … 1100 1104 // If the user had to wait more than 8 seconds for the result, 1101 1105 // we are trying to please him with a requester... 1102 1106 (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); 1105 1110 } else 1106 1111 beep(); 1107 1112 } … … 1307 1312 if (menu->CountItems() == 0) { 1308 1313 // if there are no attributes, add an item to the menu 1309 1314 // that says so 1310 BMenuItem *item = new BMenuItem("none", NULL); 1315 BMenuItem *item = new BMenuItem(B_TRANSLATE_COMMENT("none", 1316 "No attributes"), NULL); 1311 1317 item->SetEnabled(false); 1312 1318 menu->AddItem(item); 1313 1319 } … … 1501 1507 1502 1508 // "View" menu 1503 1509 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\"")); 1505 1512 1506 1513 // Number Base (hex/decimal) 1507 1514 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\"")); 1509 1519 message = new BMessage(kMsgBaseType); 1510 1520 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')); 1512 1524 item->SetTarget(this); 1513 1525 if (fHeaderView->Base() == kDecimalBase) 1514 1526 item->SetMarked(true); 1515 1527 1516 1528 message = new BMessage(kMsgBaseType); 1517 1529 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')); 1519 1533 item->SetTarget(this); 1520 1534 if (fHeaderView->Base() == kHexBase) 1521 1535 item->SetMarked(true); … … 1525 1539 1526 1540 // Block Size 1527 1541 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\"")); 1529 1545 subMenu->SetRadioMode(true); 1530 1546 const uint32 blockSizes[] = {512, 1024, 2048}; 1531 1547 for (uint32 i = 0; i < sizeof(blockSizes) / sizeof(blockSizes[0]); i++) { … … 1570 1586 item->SetMarked(true); 1571 1587 } 1572 1588 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"), 1574 1591 message = new BMessage(kMsgFontSize))); 1575 1592 message->AddFloat("font_size", 0.0f); 1576 1593 if (fontSize == 0) … … 1756 1773 1757 1774 _RemoveTypeEditor(); 1758 1775 1759 fTypeView = new TypeView(Frame(), B_TRANSLATE("type shell"), index, fEditor,1776 fTypeView = new TypeView(Frame(), "type shell", index, fEditor, 1760 1777 B_FOLLOW_ALL); 1761 1778 1762 1779 if (Parent() != NULL) -
src/apps/diskprobe/FindWindow.cpp
509 509 message->AddInt8("mode", kAsciiMode); 510 510 if (mode == kAsciiMode) 511 511 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))); 514 515 message->AddInt8("mode", kHexMode); 515 516 if (mode == kHexMode) 516 517 item->SetMarked(true); -
src/apps/diskprobe/TypeEditors.cpp
195 195 196 196 197 197 StringEditor::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) 199 199 { 200 200 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 201 201 … … 746 746 747 747 748 748 BooleanEditor::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) 750 750 { 751 751 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 752 752 … … 843 843 844 844 845 845 ImageView::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, 847 848 B_WILL_DRAW, editor), 848 849 fBitmap(NULL), 849 850 fScaleSlider(NULL) … … 871 872 #endif 872 873 873 874 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); 875 877 fDescriptionView->SetAlignment(B_ALIGN_CENTER); 876 878 877 879 AddChild(fDescriptionView); … … 1075 1077 break; 1076 1078 } 1077 1079 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); 1079 1082 fDescriptionView->SetText(buffer); 1080 1083 } 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.")); 1082 1086 1083 1087 // Update the view size to match the image and its description 1084 1088 … … 1184 1188 fTextView->SetText(""); 1185 1189 1186 1190 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); 1188 1194 fTextView->Insert(text); 1189 1195 1190 1196 type_code type; … … 1353 1359 GetNthTypeEditor(int32 index, const char** _name) 1354 1360 { 1355 1361 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") 1361 1367 }; 1362 1368 1363 1369 if (index < 0 || index >= int32(sizeof(kEditors) / sizeof(kEditors[0]))) -
src/apps/diskprobe/DiskProbe.cpp
364 364 if (status != B_OK) { 365 365 char buffer[1024]; 366 366 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."), 369 371 ref.name, strerror(status)); 370 372 371 373 (new BAlert(B_TRANSLATE("DiskProbe request"),