Changeset 507 in MondoRescue for trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c
r274 r507 82 82 83 83 newtPushHelpLine 84 ( " Add one of the following unallocated RAID partitions to this RAID device.");85 asprintf(&tmp, "%-26s %s", "Device", "Size");84 (_(" Add one of the following unallocated RAID partitions to this RAID device.")); 85 asprintf(&tmp, "%-26s %s", _("Device"), _("Size")); 86 86 headerMsg = newtLabel(1, 1, tmp); 87 87 paranoid_free(tmp); … … 92 92 partitionsListbox); 93 93 i = 7; 94 bOK = newtCompactButton(i, 9, " OK ");95 bCancel = newtCompactButton(i += 9, 9, "Cancel");96 newtOpenWindow(22, 6, 36, 10, "Unallocated RAID partitions");94 bOK = newtCompactButton(i, 9, _(" OK ")); 95 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 96 newtOpenWindow(22, 6, 36, 10, _("Unallocated RAID partitions")); 97 97 myForm = newtForm(NULL, NULL, 0); 98 98 newtFormAddComponents(myForm, headerMsg, partitionsListbox, bOK, … … 182 182 asprintf(&format_str, "ext2"); 183 183 #endif 184 newtOpenWindow(20, 5, 48, 10, "Add entry");185 label0 = newtLabel(2, 1, "Device: ");186 label1 = newtLabel(2, 2, "Mountpoint:");187 label2 = newtLabel(2, 3, "Size (MB): ");188 label3 = newtLabel(2, 4, "Format: ");184 newtOpenWindow(20, 5, 48, 10, _("Add entry")); 185 label0 = newtLabel(2, 1, _("Device: ")); 186 label1 = newtLabel(2, 2, _("Mountpoint:")); 187 label2 = newtLabel(2, 3, _("Size (MB): ")); 188 label3 = newtLabel(2, 4, _("Format: ")); 189 189 deviceComp = 190 190 newtEntry(14, 1, device_str, 30, (void *) &device_here, 0); … … 195 195 newtEntry(14, 4, format_str, 15, (void *) &format_here, 0); 196 196 sizeComp = newtEntry(14, 3, size_str, 10, (void *) &size_here, 0); 197 bOK = newtButton(5, 6, " OK ");198 bCancel = newtButton(17, 6, "Cancel");197 bOK = newtButton(5, 6, _(" OK ")); 198 bCancel = newtButton(17, 6, _("Cancel")); 199 199 newtPushHelpLine 200 ( "To add an entry to the mountlist, please fill in these fields and then hit 'OK'");200 (_("To add an entry to the mountlist, please fill in these fields and then hit 'OK'")); 201 201 myForm = newtForm(NULL, NULL, 0); 202 202 newtFormAddComponents(myForm, deviceComp, mountpointComp, sizeComp, … … 224 224 if (b_res == bOK) { 225 225 if (device_str[strlen(device_str) - 1] == '/') { 226 popup_and_OK( "You left the device nearly blank!");226 popup_and_OK(_("You left the device nearly blank!")); 227 227 b_res = NULL; 228 228 } 229 229 if (size_of_specific_device_in_mountlist(mountlist, device_str) 230 230 >= 0) { 231 popup_and_OK( "Can't add this - you've got one already!");231 popup_and_OK(_("Can't add this - you've got one already!")); 232 232 b_res = NULL; 233 233 } … … 286 286 287 287 if (popup_and_get_string 288 ("Add variable", "Enter the name of the variable to add", sz_out,288 ("Add variable", _("Enter the name of the variable to add"), sz_out, 289 289 MAX_STR_LEN)) { 290 290 strip_spaces(sz_out); … … 295 295 if (i < items) { 296 296 popup_and_OK 297 ( "No need to add that variable. It is already listed here.");297 (_("No need to add that variable. It is already listed here.")); 298 298 } else { 299 299 strcpy(raidrec->additional_vars.el[items].label, sz_out); … … 500 500 501 501 asprintf(&prompt, 502 "Please enter the RAID level you want. (concat, striped, raid5)");502 _("Please enter the RAID level you want. (concat, striped, raid5)")); 503 503 if (raidrec->raidlevel == -1) { 504 504 asprintf(&tmp, "concat"); … … 556 556 strcpy(personalities, 557 557 last_line_of_file("/tmp/raid-personalities.txt")); 558 asprintf(&prompt, "Please enter the RAID level you want. %s",558 asprintf(&prompt, _("Please enter the RAID level you want. %s"), 559 559 personalities); 560 560 if (raidrec->raid_level == -1) { … … 566 566 out != -1 && out != 0 && out != 1 && out != 4 && out != 5 567 567 && out != 10;) { 568 res = popup_and_get_string( "Specify RAID level", prompt, tmp, 10);568 res = popup_and_get_string(_("Specify RAID level"), prompt, tmp, 10); 569 569 if (!res) { 570 570 return; … … 591 591 } else { 592 592 if (ask_me_yes_or_no 593 ( "You have chosen a RAID personality which is not registered with the kernel. Make another selection?"))593 (_("You have chosen a RAID personality which is not registered with the kernel. Make another selection?"))) 594 594 { 595 595 out = 999; … … 670 670 assert_string_is_neither_NULL_nor_zerolength(raid_device); 671 671 672 asprintf(&tmp, "Delete %s from RAID device %s - are you sure?",672 asprintf(&tmp, _("Delete %s from RAID device %s - are you sure?"), 673 673 disklist->el[currline].device, raid_device); 674 674 if (!ask_me_yes_or_no(tmp)) { … … 718 718 device); 719 719 if (pos >= 0) { 720 asprintf(&tmp, "Cannot delete %s: it is in use by RAID device %s",720 asprintf(&tmp, _("Cannot delete %s: it is in use by RAID device %s"), 721 721 mountlist->el[currline].device, 722 722 raidlist->el[pos].OSSWAP(raid_device, volname)); … … 725 725 return; 726 726 } 727 asprintf(&tmp, "Delete %s - are you sure?",727 asprintf(&tmp, _("Delete %s - are you sure?"), 728 728 mountlist->el[currline].device); 729 729 if (!ask_me_yes_or_no(tmp)) { … … 785 785 return; 786 786 } 787 asprintf(&tmp, "Do you want me to delete %s's partitions, too?", device);787 asprintf(&tmp, _("Do you want me to delete %s's partitions, too?", device)); 788 788 delete_partitions_too = ask_me_yes_or_no(tmp); 789 789 if (delete_partitions_too) { … … 854 854 855 855 av = &raidrec->additional_vars; 856 asprintf(&tmp, "Delete %s - are you sure?", av->el[lino].label);856 asprintf(&tmp, _("Delete %s - are you sure?", av->el[lino].label)); 857 857 if (ask_me_yes_or_no(tmp)) { 858 858 if (!strcmp(av->el[lino].label, "persistent-superblock") 859 859 || !strcmp(av->el[lino].label, "chunk-size")) { 860 860 paranoid_free(tmp); 861 asprintf(&tmp, "%s must not be deleted. It would be bad.",861 asprintf(&tmp, _("%s must not be deleted. It would be bad."), 862 862 av->el[lino].label); 863 863 popup_and_OK(tmp); … … 927 927 warned_already = TRUE; 928 928 asprintf(&tmp, 929 "Too many lines. Displaying first %d entries only. Close a directory to see more.",929 _("Too many lines. Displaying first %d entries only. Close a directory to see more."), 930 930 ARBITRARY_MAXIMUM); 931 931 popup_and_OK(tmp); … … 1072 1072 assert(filelist != NULL); 1073 1073 1074 log_to_screen( "Editing filelist");1074 log_to_screen(_("Editing filelist")); 1075 1075 newtPushHelpLine 1076 ( " Please edit the filelist to your satisfaction, then click OK or Cancel.");1076 (_(" Please edit the filelist to your satisfaction, then click OK or Cancel.")); 1077 1077 j = 4; 1078 bLess = newtCompactButton(j, 17, " Less ");1079 bMore = newtCompactButton(j += 12, 17, " More ");1080 bToggle = newtCompactButton(j += 12, 17, "Toggle");1081 bRegex = newtCompactButton(j += 12, 17, "RegEx");1082 bCancel = newtCompactButton(j += 12, 17, "Cancel");1083 bOK = newtCompactButton(j += 12, 17, " OK ");1078 bLess = newtCompactButton(j, 17, _(" Less ")); 1079 bMore = newtCompactButton(j += 12, 17, _(" More ")); 1080 bToggle = newtCompactButton(j += 12, 17, _("Toggle")); 1081 bRegex = newtCompactButton(j += 12, 17, _("RegEx")); 1082 bCancel = newtCompactButton(j += 12, 17, _("Cancel")); 1083 bOK = newtCompactButton(j += 12, 17, _(" OK ")); 1084 1084 filelistListbox = 1085 1085 newtListbox(2, 1, 15, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); … … 1087 1087 lines_in_flist_window = 1088 1088 redraw_filelist(filelist, keylist, filelistListbox); 1089 newtOpenWindow(1, 3, 77, 18, "Editing filelist");1089 newtOpenWindow(1, 3, 77, 18, _("Editing filelist")); 1090 1090 myForm = newtForm(NULL, NULL, 0); 1091 1091 newtFormAddComponents(myForm, filelistListbox, bLess, bMore, bToggle, … … 1096 1096 finished = 1097 1097 ask_me_yes_or_no 1098 ( "Are you happy with your file selection?");1098 (_("Are you happy with your file selection?")); 1099 1099 } else if (b_res == bCancel) { 1100 1100 finished = TRUE; 1101 1101 } else if (b_res == bRegex) { 1102 popup_and_OK( "I haven't implemented this yet...");1102 popup_and_OK(_("I haven't implemented this yet...")); 1103 1103 } else { 1104 1104 curr_choice = newtListboxGetCurrent(filelistListbox); … … 1236 1236 sprintf(size_str, "%lld", mountlist->el[currline].size / 1024); 1237 1237 newtOpenWindow(20, 5, 48, 10, "Edit entry"); 1238 label0 = newtLabel(2, 1, "Device:");1239 label1 = newtLabel(2, 2, "Mountpoint:");1240 label2 = newtLabel(2, 3, "Size (MB): ");1241 label3 = newtLabel(2, 4, "Format: ");1238 label0 = newtLabel(2, 1, _("Device:")); 1239 label1 = newtLabel(2, 2, _("Mountpoint:")); 1240 label2 = newtLabel(2, 3, _("Size (MB): ")); 1241 label3 = newtLabel(2, 4, _("Format: ")); 1242 1242 deviceComp = 1243 1243 newtEntry(14, 1, device_str, 30, (void *) &device_here, 0); … … 1252 1252 sizeComp = newtEntry(14, 3, size_str, 10, (void *) &size_here, 0); 1253 1253 } 1254 bOK = newtButton(2, 6, " OK ");1255 bCancel = newtButton(14, 6, "Cancel");1254 bOK = newtButton(2, 6, _(" OK ")); 1255 bCancel = newtButton(14, 6, _("Cancel")); 1256 1256 if (strstr(mountlist->el[currline].device, RAID_DEVICE_STUB)) { 1257 1257 b_raid = newtButton(26, 6, "RAID.."); 1258 1258 } 1259 1259 newtPushHelpLine 1260 ( " Edit this partition's mountpoint, size and format; then click 'OK'.");1260 (_(" Edit this partition's mountpoint, size and format; then click 'OK'.")); 1261 1261 myForm = newtForm(NULL, NULL, 0); 1262 1262 newtFormAddComponents(myForm, deviceComp, mountpointComp, sizeComp, … … 1274 1274 && strstr(device_used_to_be, RAID_DEVICE_STUB) 1275 1275 && strcmp(device_str, device_used_to_be)) { 1276 popup_and_OK( "You can't change /dev/mdX to /dev/mdY.");1276 popup_and_OK(_("You can't change /dev/mdX to /dev/mdY.")); 1277 1277 b_res = NULL; 1278 1278 continue; 1279 1279 } else if (b_res == bOK && !strcmp(mountpoint_str, "image") 1280 1280 && strcmp(mountpt_used_to_be, "image")) { 1281 popup_and_OK( "You can't change a regular device to an image.");1281 popup_and_OK(_("You can't change a regular device to an image.")); 1282 1282 b_res = NULL; 1283 1283 continue; … … 1302 1302 */ 1303 1303 popup_and_OK 1304 ( "You cannot edit the RAID settings until you have OK'd your change to the device node.");1304 (_("You cannot edit the RAID settings until you have OK'd your change to the device node.")); 1305 1305 } else { 1306 1306 j = find_raid_device_in_raidlist(raidlist, … … 1309 1309 if (j < 0) { 1310 1310 sprintf(tmp, 1311 "/etc/raidtab does not have an entry for %s; please delete it and add it again",1311 _("/etc/raidtab does not have an entry for %s; please delete it and add it again"), 1312 1312 mountlist->el[currline].device); 1313 1313 popup_and_OK(tmp); 1314 1314 } else { 1315 log_it( "edit_raidlist_entry - calling");1315 log_it(_("edit_raidlist_entry - calling")); 1316 1316 edit_raidlist_entry(mountlist, raidlist, 1317 1317 &raidlist->el[j], currline); … … 1363 1363 else if (strcmp(device_used_to_be, device_str)) { 1364 1364 popup_and_OK 1365 ( "You are renaming a RAID device as another RAID device. I don't like it but I'll allow it.");1365 (_("You are renaming a RAID device as another RAID device. I don't like it but I'll allow it.")); 1366 1366 } 1367 1367 #endif … … 1473 1473 int currline2 = 0; 1474 1474 1475 log_it( "Started edit_raidlist_entry");1475 log_it(_("Started edit_raidlist_entry")); 1476 1476 memcpy((void *) &bkp_raidrec, (void *) raidrec, 1477 1477 sizeof(struct vinum_volume)); 1478 sprintf(title_of_editraidForm_window, "Plexes on %s",1478 sprintf(title_of_editraidForm_window, _("Plexes on %s"), 1479 1479 raidrec->volname); 1480 newtPushHelpLine( " Please select a plex to edit");1480 newtPushHelpLine(_(" Please select a plex to edit")); 1481 1481 newtOpenWindow(13, 5, 54, 15, title_of_editraidForm_window); 1482 1482 for (;;) { … … 1484 1484 char headerstr[MAX_STR_LEN]; 1485 1485 snprintf(headerstr, MAX_STR_LEN, "%-14s %-8s %11s %8s", 1486 "Plex", "Level", "Stripe Size", "Subdisks");1487 1488 bOK = newtCompactButton(2, 13, " OK ");1489 bCancel = newtCompactButton(12, 13, "Cancel");1490 bAdd = newtCompactButton(22, 13, " Add ");1491 bEdit = newtCompactButton(32, 13, " Edit ");1492 bDelete = newtCompactButton(42, 13, "Delete");1486 _("Plex"), _("Level",) _("Stripe Size"), _("Subdisks")); 1487 1488 bOK = newtCompactButton(2, 13, _(" OK ")); 1489 bCancel = newtCompactButton(12, 13, _("Cancel")); 1490 bAdd = newtCompactButton(22, 13, _(" Add ")); 1491 bEdit = newtCompactButton(32, 13, _(" Edit ")); 1492 bDelete = newtCompactButton(42, 13, _("Delete")); 1493 1493 1494 1494 plexesListbox = … … 1550 1550 if (b_res == bDelete) { 1551 1551 char msg[MAX_STR_LEN]; 1552 sprintf(msg, "Are you sure you want to delete %s.p%i?",1552 sprintf(msg, _("Are you sure you want to delete %s.p%i?"), 1553 1553 raidrec->volname, currline2); 1554 1554 if (ask_me_yes_or_no(msg)) { 1555 log_it( "Deleting RAID plex");1555 log_it(_("Deleting RAID plex")); 1556 1556 memcpy((void *) &raidrec->plex[currline2], 1557 1557 (void *) &raidrec->plex[raidrec->plexes - 1], … … 1627 1627 for (;;) { 1628 1628 log_msg(2, "Main loop"); 1629 sprintf(title_of_editraidForm_window, "Edit %s",1629 sprintf(title_of_editraidForm_window, _("Edit %s"), 1630 1630 raidrec->raid_device); 1631 1631 strcpy(sz_raid_level, … … 1633 1633 strcpy(sz_data_disks, 1634 1634 number_of_disks_as_string(raidrec->data_disks.entries, 1635 "data"));1635 _("data"))); 1636 1636 strcpy(sz_spare_disks, 1637 1637 number_of_disks_as_string(raidrec->spare_disks.entries, 1638 "spare"));1638 _("spare"))); 1639 1639 strcpy(sz_parity_disks, 1640 1640 number_of_disks_as_string(raidrec->parity_disks.entries, 1641 "parity"));1641 _("parity"))); 1642 1642 strcpy(sz_failed_disks, 1643 1643 number_of_disks_as_string(raidrec->failed_disks.entries, 1644 "failed"));1644 _("failed"))); 1645 1645 bSelectData = newtButton(1, 1, sz_data_disks); 1646 1646 bSelectSpare = newtButton(20, 1, sz_spare_disks); … … 1648 1648 bSelectFailed = newtButton(20, 5, sz_failed_disks); 1649 1649 bChangeRaid = newtButton(1, 9, sz_raid_level); 1650 bOK = newtButton(16 + (raidrec->raid_level == -1), 9, " OK ");1651 bCancel = newtButton(28, 9, "Cancel");1650 bOK = newtButton(16 + (raidrec->raid_level == -1), 9, _(" OK ")); 1651 bCancel = newtButton(28, 9, _("Cancel")); 1652 1652 bAdditional = 1653 1653 newtCompactButton(1, 13, 1654 "Additional settings and information");1654 _("Additional settings and information")); 1655 1655 newtPushHelpLine 1656 ( " Edit the RAID device's settings to your heart's content, then hit OK/Cancel.");1656 (_(" Edit the RAID device's settings to your heart's content, then hit OK/Cancel.")); 1657 1657 editraidForm = newtForm(NULL, NULL, 0); 1658 1658 newtFormAddComponents(editraidForm, bSelectData, bSelectParity, … … 1663 1663 choose_raid_level(raidrec); 1664 1664 } else if (b_res == bSelectData) { 1665 select_raid_disks(mountlist, raidlist, raidrec, "data",1665 select_raid_disks(mountlist, raidlist, raidrec, _("data"), 1666 1666 &raidrec->data_disks); 1667 1667 } else if (b_res == bSelectSpare) { 1668 select_raid_disks(mountlist, raidlist, raidrec, "spare",1668 select_raid_disks(mountlist, raidlist, raidrec, _("spare"), 1669 1669 &raidrec->spare_disks); 1670 1670 } else if (b_res == bSelectParity) { 1671 select_raid_disks(mountlist, raidlist, raidrec, "parity",1671 select_raid_disks(mountlist, raidlist, raidrec, _("parity"), 1672 1672 &raidrec->parity_disks); 1673 1673 } else if (b_res == bSelectFailed) { 1674 select_raid_disks(mountlist, raidlist, raidrec, "failed",1674 select_raid_disks(mountlist, raidlist, raidrec, _("failed"), 1675 1675 &raidrec->failed_disks); 1676 1676 } else if (b_res == bAdditional) { … … 1753 1753 raidlist->el[currline].volname, currline2); 1754 1754 newtPushHelpLine 1755 ( " Please select a subdisk to edit, or edit this plex's parameters");1755 (_(" Please select a subdisk to edit, or edit this plex's parameters")); 1756 1756 newtOpenWindow(13, 3, 54, 18, title_of_editraidForm_window); 1757 1757 for (;;) { … … 1759 1759 char headerstr[MAX_STR_LEN]; 1760 1760 char tmp[64]; 1761 snprintf(headerstr, MAX_STR_LEN, "%-24s %s", "Subdisk", "Device");1761 snprintf(headerstr, MAX_STR_LEN, "%-24s %s", _("Subdisk"), _("Device")); 1762 1762 1763 1763 … … 1773 1773 break; 1774 1774 default: 1775 sprintf(tmp, "unknown (%i)", raidrec->raidlevel);1775 sprintf(tmp, _("unknown (%i)"), raidrec->raidlevel); 1776 1776 break; 1777 1777 } 1778 bLevel = newtCompactButton(2, 2, " RAID level ");1778 bLevel = newtCompactButton(2, 2, _(" RAID level ")); 1779 1779 sLevel = newtLabel(19, 2, tmp); 1780 1780 1781 1781 if (raidrec->raidlevel >= 0) { 1782 1782 sprintf(tmp, "%ik", raidrec->stripesize); 1783 bStripeSize = newtCompactButton(2, 4, " Stripe size ");1783 bStripeSize = newtCompactButton(2, 4, _(" Stripe size ")); 1784 1784 } else { 1785 1785 strcpy(tmp, "N/A"); 1786 bStripeSize = newtLabel(2, 4, "Stripe size:");1786 bStripeSize = newtLabel(2, 4, _("Stripe size:")); 1787 1787 } 1788 1788 sStripeSize = newtLabel(19, 4, tmp); 1789 1789 1790 bOK = newtCompactButton(2, 16, " OK ");1791 bCancel = newtCompactButton(12, 16, "Cancel");1792 bAdd = newtCompactButton(22, 16, " Add ");1793 bEdit = newtCompactButton(32, 16, " Edit ");1794 bDelete = newtCompactButton(42, 16, "Delete");1790 bOK = newtCompactButton(2, 16, _(" OK ")); 1791 bCancel = newtCompactButton(12, 16, _("Cancel")); 1792 bAdd = newtCompactButton(22, 16, _(" Add ")); 1793 bEdit = newtCompactButton(32, 16, _(" Edit ")); 1794 bDelete = newtCompactButton(42, 16, _("Delete")); 1795 1795 1796 1796 … … 1878 1878 sprintf(tmp, "%i", raidrec->stripesize); 1879 1879 if (popup_and_get_string 1880 ( "Stripe size",1881 "Please enter the stripe size in kilobytes.", tmp, 20)) {1880 (_("Stripe size"), 1881 _("Please enter the stripe size in kilobytes."), tmp, 20)) { 1882 1882 raidrec->stripesize = atoi(tmp); 1883 1883 } … … 1930 1930 1931 1931 strcpy(sz_out, raidrec->additional_vars.el[lino].value); 1932 sprintf(header, "Edit %s", raidrec->additional_vars.el[lino].label);1933 sprintf(comment, "Please set %s's value (currently '%s')",1932 sprintf(header, _("Edit %s"), raidrec->additional_vars.el[lino].label); 1933 sprintf(comment, _("Please set %s's value (currently '%s')"), 1934 1934 raidrec->additional_vars.el[lino].label, sz_out); 1935 1935 if (popup_and_get_string(header, comment, sz_out, MAX_STR_LEN)) { … … 1993 1993 strcpy(flaws_str_C, "xxxxxxxxx"); 1994 1994 if (mountlist->entries > ARBITRARY_MAXIMUM) { 1995 log_to_screen( "Arbitrary limits suck, man!");1995 log_to_screen(_("Arbitrary limits suck, man!")); 1996 1996 finish(1); 1997 1997 } 1998 1998 newtPushHelpLine 1999 ( " Please edit the mountlist to your satisfaction, then click OK or Cancel.");1999 (_(" Please edit the mountlist to your satisfaction, then click OK or Cancel.")); 2000 2000 i = 4; 2001 bAdd = newtCompactButton(i, 17, " Add ");2002 bEdit = newtCompactButton(i += 11, 17, " Edit ");2003 bDelete = newtCompactButton(i += 12, 17, "Delete");2004 bReload = newtCompactButton(i += 12, 17, "Reload");2005 bCancel = newtCompactButton(i += 12, 17, "Cancel");2006 bOK = newtCompactButton(i += 12, 17, " OK ");2007 sprintf(tmp, "%-24s %-24s %-8s %s", "Device", "Mountpoint", "Format",2008 "Size (MB)");2001 bAdd = newtCompactButton(i, 17, _(" Add ")); 2002 bEdit = newtCompactButton(i += 11, 17, _(" Edit ")); 2003 bDelete = newtCompactButton(i += 12, 17, _("Delete")); 2004 bReload = newtCompactButton(i += 12, 17, _("Reload")); 2005 bCancel = newtCompactButton(i += 12, 17, _("Cancel")); 2006 bOK = newtCompactButton(i += 12, 17, _(" OK ")); 2007 sprintf(tmp, "%-24s %-24s %-8s %s", _("Device"), _("Mountpoint"), _("Format"), 2008 _("Size (MB)")); 2009 2009 headerMsg = newtLabel(2, 1, tmp); 2010 2010 flawsLabelA = newtLabel(2, 13, flaws_str_A); … … 2014 2014 newtListbox(2, 2, 10, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); 2015 2015 redraw_mountlist(mountlist, keylist, partitionsListbox); 2016 newtOpenWindow(1, 3, 77, 18, "Editing mountlist");2016 newtOpenWindow(1, 3, 77, 18, _("Editing mountlist")); 2017 2017 myForm = newtForm(NULL, NULL, 0); 2018 2018 newtFormAddComponents(myForm, headerMsg, partitionsListbox, … … 2031 2031 finished = 2032 2032 ask_me_yes_or_no 2033 ( "Your mountlist might not work. Continue anyway?");2033 (_("Your mountlist might not work. Continue anyway?")); 2034 2034 } else { 2035 2035 finished = 2036 2036 ask_me_yes_or_no 2037 ( "Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)");2037 (_("Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)")); 2038 2038 } 2039 2039 } else if (b_res == bCancel) { 2040 2040 finished = TRUE; 2041 2041 } else if (b_res == bReload) { 2042 if (ask_me_yes_or_no( "Reload original mountlist?")) {2042 if (ask_me_yes_or_no(_("Reload original mountlist?"))) { 2043 2043 /* 2044 2044 This would be really dumb. RAIDTAB_FNAME is #define'd. --- Hugo, 2003/04/24 … … 2058 2058 i < mountlist->entries && keylist[i] != curr_choice; i++); 2059 2059 if (i == mountlist->entries && mountlist->entries > 0) { 2060 log_to_screen( "I don't know what that button does!");2060 log_to_screen(_("I don't know what that button does!")); 2061 2061 } else { 2062 2062 currline = i; … … 2076 2076 } else { 2077 2077 popup_and_OK 2078 ( "Please add an entry. Then press ENTER to edit it.");2078 (_("Please add an entry. Then press ENTER to edit it.")); 2079 2079 } 2080 2080 } … … 2086 2086 newtPopHelpLine(); 2087 2087 if (b_res == bOK) { 2088 log_it( "You pushed 'OK'. I shall now continue.");2088 log_it(_("You pushed 'OK'. I shall now continue.")); 2089 2089 return (0); 2090 2090 } else { … … 2165 2165 sprintf(title_of_window, "Additional variables"); 2166 2166 newtPushHelpLine 2167 ( " Edit the additional fields to your heart's content, then click OK or Cancel.");2168 headerMsg = newtLabel(1, 1, "Label Value");2167 (_(" Edit the additional fields to your heart's content, then click OK or Cancel.")); 2168 headerMsg = newtLabel(1, 1, _("Label Value")); 2169 2169 varsListbox = 2170 2170 newtListbox(1, 2, 6, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); 2171 2171 i = 1; 2172 bAdd = newtCompactButton(i, 9, " Add ");2173 bEdit = newtCompactButton(i += 8, 9, " Edit ");2174 bDelete = newtCompactButton(i += 9, 9, "Delete");2175 bOK = newtCompactButton(i += 9, 9, " OK ");2176 bCancel = newtCompactButton(i += 9, 9, "Cancel");2172 bAdd = newtCompactButton(i, 9, _(" Add ")); 2173 bEdit = newtCompactButton(i += 8, 9, _(" Edit ")); 2174 bDelete = newtCompactButton(i += 9, 9, _("Delete")); 2175 bOK = newtCompactButton(i += 9, 9, _(" OK ")); 2176 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 2177 2177 newtOpenWindow(17, 7, 46, 10, title_of_window); 2178 2178 myForm = newtForm(NULL, NULL, 0); … … 2327 2327 2328 2328 if (popup_and_get_string 2329 ( "ISO Mode - device", "On what device do the ISO files live?",2329 (_("ISO Mode - device"), _("On what device do the ISO files live?"), 2330 2330 isodir_device, MAX_STR_LEN / 4)) { 2331 2331 if (popup_and_get_string 2332 ( "ISO Mode - format",2333 "What is the disk format of the device? (Hit ENTER if you don't know.)",2332 (_("ISO Mode - format"), 2333 _("What is the disk format of the device? (Hit ENTER if you don't know.)"), 2334 2334 isodir_format, 16)) { 2335 2335 if (popup_and_get_string 2336 ( "ISO Mode - path",2337 "At what path on this device can the ISO files be found?",2336 (_("ISO Mode - path"), 2337 _("At what path on this device can the ISO files be found?"), 2338 2338 isodir_path, MAX_STR_LEN / 4)) { 2339 2339 strip_spaces(isodir_device); … … 2433 2433 2434 2434 newtPushHelpLine 2435 ( "This is where I nuke your hard drives. Mhahahahaha. No-one can stop Mojo Jojo!");2436 newtOpenWindow(24, 3, 32, 13, "Nuking");2437 b1 = newtButton(7, 1, "Slowly");2438 b2 = newtButton(7, 5, "Medium");2439 b3 = newtButton(7, 9, "Quickly");2435 (_("This is where I nuke your hard drives. Mhahahahaha. No-one can stop Mojo Jojo!")); 2436 newtOpenWindow(24, 3, 32, 13, _("Nuking")); 2437 b1 = newtButton(7, 1, _("Slowly")); 2438 b2 = newtButton(7, 5, _("Medium")); 2439 b3 = newtButton(7, 9, _("Quickly")); 2440 2440 myForm = newtForm(NULL, NULL, 0); 2441 2441 newtFormAddComponents(myForm, b1, b2, b3, NULL); … … 2802 2802 iamhere("Post-malloc"); 2803 2803 strcpy(help_text, 2804 " Edit this RAID device's list of partitions. Choose OK or Cancel when done.");2805 sprintf(header_text, "%-24s %s", "Device", "Index");2806 sprintf(title_of_window, "%s contains...", raidrec->raid_device);2804 _(" Edit this RAID device's list of partitions. Choose OK or Cancel when done.")); 2805 sprintf(header_text, "%-24s %s", _("Device"), _("Index")); 2806 sprintf(title_of_window, _("%s contains..."), raidrec->raid_device); 2807 2807 newtPushHelpLine(help_text); 2808 2808 for (b_res = (newtComponent) 12345; b_res != bOK && b_res != bCancel;) { … … 2812 2812 redraw_disklist(disklist, keylist, partitionsListbox); 2813 2813 i = 1; 2814 bAdd = newtCompactButton(i, 9, " Add ");2815 bDelete = newtCompactButton(i += 8, 9, "Delete");2816 bOK = newtCompactButton(i += 9, 9, " OK ");2817 bCancel = newtCompactButton(i += 9, 9, "Cancel");2814 bAdd = newtCompactButton(i, 9, _(" Add ")); 2815 bDelete = newtCompactButton(i += 8, 9, _("Delete")); 2816 bOK = newtCompactButton(i += 9, 9, _(" OK ")); 2817 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 2818 2818 newtOpenWindow(21, 7, 38, 10, title_of_window); 2819 2819 myForm = newtForm(NULL, NULL, 0); … … 2834 2834 i++); 2835 2835 if (i == disklist->entries && disklist->entries > 0) { 2836 log_to_screen( "I don't know what that button does!");2836 log_to_screen(_("I don't know what that button does!")); 2837 2837 } else { 2838 2838 currline = i; 2839 2839 if (b_res == bAdd) { 2840 log_it( "Making list of unallocated RAID slices");2840 log_it(_("Making list of unallocated RAID slices")); 2841 2841 make_list_of_unallocated_raid_partitions 2842 2842 (unallocated_raid_partitions, mountlist_dontedit, … … 2844 2844 if (unallocated_raid_partitions->entries <= 0) { 2845 2845 popup_and_OK 2846 ( "There are no unallocated partitions marked for RAID.");2846 (_("There are no unallocated partitions marked for RAID.")); 2847 2847 } else { 2848 2848 log_it 2849 ( "Done. The user may add one or more of the above to RAID device");2849 (_("Done. The user may add one or more of the above to RAID device")); 2850 2850 add_disklist_entry(disklist, raidrec->raid_device, 2851 2851 unallocated_raid_partitions); 2852 log_it( "I have finished adding a disklist entry.");2852 log_it(_("I have finished adding a disklist entry.")); 2853 2853 redraw_disklist(disklist, keylist, 2854 2854 partitionsListbox); … … 2859 2859 redraw_disklist(disklist, keylist, partitionsListbox); 2860 2860 } else { 2861 sprintf(tmp, "%s's index is %d. What should it be?",2861 sprintf(tmp, _("%s's index is %d. What should it be?"), 2862 2862 raidrec->raid_device, 2863 2863 disklist->el[currline].index); 2864 2864 sprintf(sz_res, "%d", disklist->el[currline].index); 2865 if (popup_and_get_string( "Set index", tmp, sz_res, 10)) {2865 if (popup_and_get_string(_("Set index"), tmp, sz_res, 10)) { 2866 2866 disklist->el[currline].index = atoi(sz_res); 2867 2867 } … … 2920 2920 for (output = 'z'; !strchr("AICE", output); output = tmp[0]) { 2921 2921 printf 2922 ( "Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> ");2922 (_("Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> ")); 2923 2923 fgets(tmp, MAX_STR_LEN - 1, stdin); 2924 2924 } … … 2927 2927 2928 2928 newtPushHelpLine 2929 ( " Do you want to 'nuke' your system, restore interactively, or just compare?");2930 newtOpenWindow(24, 3, 32, 17, "How should I restore?");2931 b1 = newtButton(7, 1, "Automatically");2932 b2 = newtButton(7, 5, "Interactively");2933 b3 = newtButton(7, 9, "Compare only!");2934 b4 = newtButton(7, 13, "Exit to shell");2929 (_(" Do you want to 'nuke' your system, restore interactively, or just compare?")); 2930 newtOpenWindow(24, 3, 32, 17, _("How should I restore?")); 2931 b1 = newtButton(7, 1, _("Automatically")); 2932 b2 = newtButton(7, 5, _("Interactively")); 2933 b3 = newtButton(7, 9, _("Compare only!")); 2934 b4 = newtButton(7, 13, _("Exit to shell")); 2935 2935 myForm = newtForm(NULL, NULL, 0); 2936 2936 newtFormAddComponents(myForm, b1, b2, b3, b4, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.