Changeset 507 in MondoRescue for trunk/mondo/mondo/common/newt-specific.c
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/newt-specific.c
r300 r507 25 25 #include "libmondo-tools-EXT.h" 26 26 #include "libmondo-fork-EXT.h" 27 #include "libmondo-gui-EXT.h" 28 #include "lib-common-externs.h" 27 #include "newt-specific-EXT.h" 29 28 30 29 /*@unused@*/ … … 124 123 tmp[i - 1] = '\0'; 125 124 } 126 if (strstr( "yesYES", tmp)) {125 if (strstr(_("yesYES"), tmp)) { 127 126 paranoid_free(tmp); 128 127 return (TRUE); 129 } else if (strstr( "NOno", tmp)) {128 } else if (strstr(_("NOno"), tmp)) { 130 129 paranoid_free(tmp); 131 130 return (FALSE); … … 133 132 system("sync"); 134 133 printf 135 ( "Please enter either YES or NO (or yes or no, or y or n, or...)\n");134 (_("Please enter either YES or NO (or yes or no, or y or n, or...)\n")); 136 135 } 137 136 } 138 137 } else { 139 return (popup_with_buttons(prompt, "Yes", "No"));138 return (popup_with_buttons(prompt, _("Yes"), _("No"))); 140 139 } 141 140 } … … 169 168 tmp[i - 1] = '\0'; 170 169 } 171 if (strstr( "okOKOkYESyes", tmp)) {170 if (strstr(_("okOKOkYESyes"), tmp)) { 172 171 paranoid_free(tmp); 173 172 return (TRUE); … … 177 176 } 178 177 } else { 179 return (popup_with_buttons(prompt, " Okay ", "Cancel"));178 return (popup_with_buttons(prompt, _(" Okay "), _("Cancel"))); 180 179 } 181 180 } … … 313 312 ("gzip -9c "MONDO_LOGFILE" > /tmp/MA.log.gz 2> /dev/null"); 314 313 printf 315 ( "If you require technical support, please contact the mailing list.\n");316 printf( "See http://www.mondorescue.org for details.\n");314 (_("If you require technical support, please contact the mailing list.\n")); 315 printf(_("See http://www.mondorescue.org for details.\n")); 317 316 printf 318 ( "The list's members can help you, if you attach that file to your e-mail.\n");319 printf( "Log file: %s\n", MONDO_LOGFILE);317 (_("The list's members can help you, if you attach that file to your e-mail.\n")); 318 printf(_("Log file: %s\n"), MONDO_LOGFILE); 320 319 if (does_file_exist("/tmp/MA.log.gz")) { 321 320 printf 322 ( "FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n");323 } 324 printf( "Mondo has aborted.\n");321 (_("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n")); 322 } 323 printf(_("Mondo has aborted.\n")); 325 324 register_pid(0, "mondo"); // finish() does this too, FYI 326 325 if (!g_main_pid) { … … 375 374 // system("clear"); 376 375 // iamhere("Finished calling newtFinished"); 377 printf( "Execution run ended; result=%d\n", signal);378 printf( "Type 'less %s' to see the output log\n", MONDO_LOGFILE);376 printf(_("Execution run ended; result=%d\n"), signal); 377 printf(_("Type 'less %s' to see the output log\n"), MONDO_LOGFILE); 379 378 free_libmondo_global_strings(); 380 379 exit(signal); … … 662 661 while (((ch = getchar()) != '\n') && (ch != EOF)); 663 662 } else { 664 (void) popup_with_buttons(prompt, " OK ", "");663 (void) popup_with_buttons(prompt, _(" OK "), ""); 665 664 } 666 665 } … … 718 717 #endif 719 718 ); 720 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK ");721 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel");719 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, _(" OK ")); 720 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, _("Cancel")); 722 721 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title); 723 722 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); … … 806 805 } 807 806 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert"); 808 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert");807 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert")); 809 808 myForm = newtForm(NULL, NULL, 0); 810 809 newtFormAddComponents(myForm, text, b_1, b_2, NULL); … … 870 869 newtCls(); 871 870 newtPushHelpLine 872 ( "Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.");871 (_("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.")); 873 872 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 874 873 newtDrawRootText(18, 0, WELCOME_STRING); … … 947 946 g_isoform_old_progress = percentage; 948 947 asprintf(&timeline_str, 949 "%2ld:%02ld taken %2ld:%02ld remaining",948 _("%2ld:%02ld taken %2ld:%02ld remaining"), 950 949 time_taken / 60, time_taken % 60, time_remaining / 60, 951 950 time_remaining % 60); … … 977 976 } else { 978 977 asprintf(&pcline_str, 979 " %3d%% done %3d%% to go",978 _(" %3d%% done %3d%% to go"), 980 979 percentage, 100 - percentage); 981 980 } … … 1120 1119 1121 1120 if (g_text_mode) { 1122 printf( "---progress-form---1--- %s\r\n", blurb1);1123 printf( "---progress-form---2--- %s\r\n", blurb2);1124 printf( "---progress-form---3--- %s\r\n", blurb3);1125 printf( "---progress-form---E---\n");1121 printf(_("---progress-form---1--- %s%s"), blurb1, "\r\n"); 1122 printf(_("---progress-form---2--- %s%s"), blurb2, "\r\n"); 1123 printf(_("---progress-form---3--- %s%s"), blurb3, "\r\n"); 1124 printf(_("---progress-form---E---\n")); 1126 1125 1127 1126 j = trunc(percentage / 5); … … 1139 1138 1140 1139 if (percentage > 100) { 1141 log_msg(2, "percentage = %d", percentage);1140 log_msg(2, _("percentage = %d"), percentage); 1142 1141 } 1143 1142 asprintf(&taskprogress, 1144 "TASK: [%s%s] %3d%% done; %2ld:%02ld to go", tmp1,1143 _("TASK: [%s%s] %3d%% done; %2ld:%02ld to go"), tmp1, 1145 1144 tmp2, percentage, time_remaining / 60, 1146 1145 time_remaining % 60); 1147 1146 1148 printf( "---progress-form---4--- %s\r\n", taskprogress);1147 printf(_("---progress-form---4--- %s\r\n"), taskprogress); 1149 1148 paranoid_free(taskprogress); 1150 1149 } else { … … 1211 1210 if (g_text_mode) { 1212 1211 for (backup_type = none; backup_type == none;) { 1213 printf( "Backup type (");1212 printf(_("Backup type (")); 1214 1213 for (i = 0; possible_responses[i]; i++) { 1215 1214 printf("%c%s", (i == 0) ? '\0' : ' ', … … 1231 1230 if (restoring) { 1232 1231 asprintf(&title_sz, 1233 "Please choose the backup media from which you want to read data.");1234 asprintf(&minimsg_sz, "Read from:");1232 _("Please choose the backup media from which you want to read data.")); 1233 asprintf(&minimsg_sz, _("Read from:")); 1235 1234 } else { 1236 1235 asprintf(&title_sz, 1237 "Please choose the backup media to which you want to archive data.");1238 asprintf(&minimsg_sz, "Backup to:");1236 _("Please choose the backup media to which you want to archive data.")); 1237 asprintf(&minimsg_sz, _("Backup to:")); 1239 1238 } 1240 1239 newtPushHelpLine(title_sz); … … 1245 1244 paranoid_free(minimsg_sz); 1246 1245 1247 b1 = newtButton(1, 1, "CD-R disks ");1248 b2 = newtButton(17, 1, "CD-RW disks");1249 b3 = newtButton(1, 9, "Tape drive ");1250 b4 = newtButton(17, 5, "CD streamer");1251 b5 = newtButton(1, 5, " DVD disks ");1252 b6 = newtButton(17, 9, " NFS mount ");1253 b7 = newtButton(1, 13, " Hard disk ");1254 b8 = newtButton(17, 13, " Exit ");1246 b1 = newtButton(1, 1, _("CD-R disks ")); 1247 b2 = newtButton(17, 1, _("CD-RW disks")); 1248 b3 = newtButton(1, 9, _("Tape drive ")); 1249 b4 = newtButton(17, 5, _("CD streamer")); 1250 b5 = newtButton(1, 5, _(" DVD disks ")); 1251 b6 = newtButton(17, 9, _(" NFS mount ")); 1252 b7 = newtButton(1, 13, _(" Hard disk ")); 1253 b8 = newtButton(17, 13, _(" Exit ")); 1255 1254 myForm = newtForm(NULL, NULL, 0); 1256 1255 newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8, … … 1305 1304 newtDrawRootText(18, 0, WELCOME_STRING); 1306 1305 newtPushHelpLine 1307 ( " Please specify the level of compression that you want.");1306 (_(" Please specify the level of compression that you want.")); 1308 1307 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1309 newtCenteredWindow(34, 13, "How much compression?");1310 b1 = newtButton(4, 1, "Maximum");1311 b2 = newtButton(18, 1, "Average");1312 b3 = newtButton(4, 5, "Minumum");1313 b4 = newtButton(18, 5, " None ");1314 b5 = newtButton(4, 9, " Exit ");1308 newtCenteredWindow(34, 13, _("How much compression?")); 1309 b1 = newtButton(4, 1, _("Maximum")); 1310 b2 = newtButton(18, 1, _("Average")); 1311 b3 = newtButton(4, 5, _("Minimum")); 1312 b4 = newtButton(18, 5, _(" None ")); 1313 b5 = newtButton(4, 9, _(" Exit ")); 1315 1314 myForm = newtForm(NULL, NULL, 0); 1316 1315 newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL); … … 1396 1395 paranoid_fclose(fin); 1397 1396 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1398 log_to_screen( "Arbitrary limits suck, man!");1397 log_to_screen(_("Arbitrary limits suck, man!")); 1399 1398 paranoid_free(tmp); 1400 1399 return (1); … … 1527 1526 } 1528 1527 asprintf(&differ_sz, 1529 " %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.",1528 _(" %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."), 1530 1529 i); 1531 1530 newtPushHelpLine(differ_sz); 1532 1531 paranoid_free(differ_sz); 1533 1532 1534 bClose = newtCompactButton(10, 15, " Close ");1535 bSelect = newtCompactButton(30, 15, " Select ");1536 asprintf(&tmp, "%-10s %-20s", "Priority",1537 "Filename");1533 bClose = newtCompactButton(10, 15, _(" Close ")); 1534 bSelect = newtCompactButton(30, 15, _(" Select ")); 1535 asprintf(&tmp, "%-10s %-20s", _("Priority"), 1536 _("Filename")); 1538 1537 headerMsg = newtLabel(2, 1, tmp); 1539 1538 paranoid_free(tmp); 1540 1539 1541 newtOpenWindow(5, 4, 70, 16, "Non-matching files");1540 newtOpenWindow(5, 4, 70, 16, _("Non-matching files")); 1542 1541 myForm = newtForm(NULL, NULL, 0); 1543 1542 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, … … 1553 1552 i++); 1554 1553 if (i == filelist->entries && filelist->entries > 0) { 1555 log_to_screen( "I don't know what that button does!");1554 log_to_screen(_("I don't know what that button does!")); 1556 1555 } else { 1557 1556 currline = i;
Note:
See TracChangeset
for help on using the changeset viewer.