Changeset 497 in MondoRescue for branches/stable/mondo/mondo/common/newt-specific.c
- Timestamp:
- Apr 28, 2006, 12:34:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/newt-specific.c
r296 r497 227 227 tmp[i - 1] = '\0'; 228 228 } 229 if (strstr( "yesYES", tmp)) {229 if (strstr(_("yesYES"), tmp)) { 230 230 paranoid_free(tmp); 231 231 return (TRUE); 232 } else if (strstr( "NOno", tmp)) {232 } else if (strstr(_("NOno"), tmp)) { 233 233 paranoid_free(tmp); 234 234 return (FALSE); … … 236 236 system("sync"); 237 237 printf 238 ( "Please enter either YES or NO (or yes or no, or y or n, or...)\n");238 (_("Please enter either YES or NO (or yes or no, or y or n, or...)\n")); 239 239 } 240 240 } 241 241 } else { 242 242 paranoid_free(tmp); 243 return (popup_with_buttons(prompt, "Yes", "No"));243 return (popup_with_buttons(prompt, _("Yes"), _("No"))); 244 244 } 245 245 } … … 273 273 tmp[i - 1] = '\0'; 274 274 } 275 if (strstr( "okOKOkYESyes", tmp)) {275 if (strstr(_("okOKOkYESyes"), tmp)) { 276 276 paranoid_free(tmp); 277 277 return (TRUE); … … 282 282 } else { 283 283 paranoid_free(tmp); 284 return (popup_with_buttons(prompt, " Okay ", "Cancel"));284 return (popup_with_buttons(prompt, _(" Okay "), _("Cancel"))); 285 285 } 286 286 } … … 426 426 ("gzip -9c /var/log/mondo-archive.log > /tmp/MA.log.gz 2> /dev/null"); 427 427 printf 428 ( "If you require technical support, please contact the mailing list.\n");429 printf( "See http://www.mondorescue.org for details.\n");428 (_("If you require technical support, please contact the mailing list.\n")); 429 printf(_("See http://www.mondorescue.org for details.\n")); 430 430 printf 431 ( "The list's members can help you, if you attach that file to your e-mail.\n");432 printf( "Log file: %s\n", MONDO_LOGFILE);431 (_("The list's members can help you, if you attach that file to your e-mail.\n")); 432 printf(_("Log file: %s\n"), MONDO_LOGFILE); 433 433 if (does_file_exist("/tmp/MA.log.gz")) { 434 434 printf 435 ( "FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n");436 } 437 printf( "Mondo has aborted.\n");435 (_("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n")); 436 } 437 printf(_("Mondo has aborted.\n")); 438 438 register_pid(0, "mondo"); // finish() does this too, FYI 439 439 if (!g_main_pid) { … … 490 490 // system("clear"); 491 491 // iamhere("Finished calling newtFinished"); 492 printf( "Execution run ended; result=%d\n", signal);493 printf( "Type 'less %s' to see the output log\n", MONDO_LOGFILE);492 printf(_("Execution run ended; result=%d\n"), signal); 493 printf(_("Type 'less %s' to see the output log\n"), MONDO_LOGFILE); 494 494 free_libmondo_global_strings(); 495 495 exit(signal); … … 783 783 while (((ch = getchar()) != '\n') && (ch != EOF)); 784 784 } else { 785 (void) popup_with_buttons(prompt, " OK ", "");785 (void) popup_with_buttons(prompt, _(" OK "), ""); 786 786 } 787 787 } … … 843 843 #endif 844 844 ); 845 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK ");846 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel");845 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, _(" OK ")); 846 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, _("Cancel")); 847 847 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title); 848 848 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); … … 931 931 } 932 932 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert"); 933 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert");933 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert")); 934 934 myForm = newtForm(NULL, NULL, 0); 935 935 newtFormAddComponents(myForm, text, b_1, b_2, NULL); … … 997 997 newtCls(); 998 998 newtPushHelpLine 999 ( "Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.");999 (_("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.")); 1000 1000 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 1001 1001 newtDrawRootText(18, 0, WELCOME_STRING); … … 1075 1075 g_isoform_old_progress = percentage; 1076 1076 sprintf(timeline_str, 1077 "%2ld:%02ld taken %2ld:%02ld remaining",1077 _("%2ld:%02ld taken %2ld:%02ld remaining"), 1078 1078 time_taken / 60, time_taken % 60, time_remaining / 60, 1079 1079 time_remaining % 60); 1080 1080 if (percentage < 3) { 1081 sprintf(pcline_str, " Working");1081 sprintf(pcline_str, _(" Working")); 1082 1082 for (j = 0; j < g_mysterious_dot_counter; j++) { 1083 1083 strcat(pcline_str, "."); … … 1089 1089 special_dot_char(g_mysterious_dot_counter)); 1090 1090 } else { 1091 sprintf(pcline_str, " %3d%% done %3d%% to go",1091 sprintf(pcline_str, _(" %3d%% done %3d%% to go"), 1092 1092 percentage, 100 - percentage); 1093 1093 } … … 1235 1235 1236 1236 if (g_text_mode) { 1237 printf( "---progress-form---1--- %s\r\n", blurb1);1238 printf( "---progress-form---2--- %s\r\n", blurb2);1239 printf( "---progress-form---3--- %s\r\n", blurb3);1240 printf( "---progress-form---E---\n");1237 printf(_("---progress-form---1--- %s%s"), blurb1, "\r\n"); 1238 printf(_("---progress-form---2--- %s%s"), blurb2, "\r\n"); 1239 printf(_("---progress-form---3--- %s%s"), blurb3, "\r\n"); 1240 printf(_("---progress-form---E---\n")); 1241 1241 sprintf(taskprogress, "TASK: ["); 1242 1242 for (i = 0; i < percentage; i += 5) { … … 1247 1247 } 1248 1248 if (percentage > 100) { 1249 log_msg(2, "percentage = %d", percentage);1249 log_msg(2, _("percentage = %d"), percentage); 1250 1250 } 1251 1251 sprintf(taskprogress + strlen(taskprogress), 1252 1252 "] %3d%c", percentage, '%'); 1253 1253 sprintf(taskprogress + strlen(taskprogress), 1254 " done; %2ld:%02ld to go",1254 _(" done; %2ld:%02ld to go"), 1255 1255 time_remaining / 60, time_remaining % 60); 1256 printf( "---progress-form---4--- %s\r\n", taskprogress);1256 printf(_("---progress-form---4--- %s"), taskprogress, "\r\n"); 1257 1257 } else { 1258 1258 center_string(blurb1, 54); … … 1330 1330 if (g_text_mode) { 1331 1331 for (backup_type = none; backup_type == none;) { 1332 printf( "Backup type (");1332 printf(_("Backup type (")); 1333 1333 for (i = 0; possible_responses[i]; i++) { 1334 1334 printf("%c%s", (i == 0) ? '\0' : ' ', … … 1352 1352 if (restoring) { 1353 1353 strcpy(title_sz, 1354 "Please choose the backup media from which you want to read data.");1355 strcpy(minimsg_sz, "Read from:");1354 _("Please choose the backup media from which you want to read data.")); 1355 strcpy(minimsg_sz, _("Read from:")); 1356 1356 } else { 1357 1357 strcpy(title_sz, 1358 "Please choose the backup media to which you want to archive data.");1359 strcpy(minimsg_sz, "Backup to:");1358 _("Please choose the backup media to which you want to archive data.")); 1359 strcpy(minimsg_sz, _("Backup to:")); 1360 1360 } 1361 1361 newtPushHelpLine(title_sz); 1362 1362 // newtOpenWindow (23, 3, 34, 17, minimsg_sz); 1363 1363 newtCenteredWindow(34, 17, minimsg_sz); 1364 b1 = newtButton(1, 1, "CD-R disks ");1365 b2 = newtButton(17, 1, "CD-RW disks");1366 b3 = newtButton(1, 9, "Tape drive ");1367 b4 = newtButton(17, 5, "CD streamer");1368 b5 = newtButton(1, 5, " DVD disks ");1369 b6 = newtButton(17, 9, " NFS mount ");1370 b7 = newtButton(1, 13, " Hard disk ");1371 b8 = newtButton(17, 13, " Exit ");1364 b1 = newtButton(1, 1, _("CD-R disks ")); 1365 b2 = newtButton(17, 1, _("CD-RW disks")); 1366 b3 = newtButton(1, 9, _("Tape drive ")); 1367 b4 = newtButton(17, 5, _("CD streamer")); 1368 b5 = newtButton(1, 5, _(" DVD disks ")); 1369 b6 = newtButton(17, 9, _(" NFS mount ")); 1370 b7 = newtButton(1, 13, _(" Hard disk ")); 1371 b8 = newtButton(17, 13, _(" Exit ")); 1372 1372 myForm = newtForm(NULL, NULL, 0); 1373 1373 newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8, … … 1427 1427 newtDrawRootText(18, 0, WELCOME_STRING); 1428 1428 newtPushHelpLine 1429 ( " Please specify the level of compression that you want.");1429 (_(" Please specify the level of compression that you want.")); 1430 1430 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1431 newtCenteredWindow(34, 13, "How much compression?");1432 b1 = newtButton(4, 1, "Maximum");1433 b2 = newtButton(18, 1, "Average");1434 b3 = newtButton(4, 5, "Minumum");1435 b4 = newtButton(18, 5, " None ");1436 b5 = newtButton(4, 9, " Exit ");1431 newtCenteredWindow(34, 13, _("How much compression?")); 1432 b1 = newtButton(4, 1, _("Maximum")); 1433 b2 = newtButton(18, 1, _("Average")); 1434 b3 = newtButton(4, 5, _("Minimum")); 1435 b4 = newtButton(18, 5, _(" None ")); 1436 b5 = newtButton(4, 9, _(" Exit ")); 1437 1437 myForm = newtForm(NULL, NULL, 0); 1438 1438 newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL); … … 1515 1515 paranoid_fclose(fin); 1516 1516 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1517 log_to_screen( "Arbitrary limits suck, man!");1517 log_to_screen(_("Arbitrary limits suck, man!")); 1518 1518 paranoid_free(tmp); 1519 1519 return (1); … … 1657 1657 } 1658 1658 sprintf(differ_sz, 1659 " %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.",1659 _(" %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."), 1660 1660 i); 1661 1661 newtPushHelpLine(differ_sz); 1662 bClose = newtCompactButton(10, 15, " Close ");1663 bSelect = newtCompactButton(30, 15, " Select ");1664 sprintf(tmp, "%-10s %-20s", "Priority", "Filename");1662 bClose = newtCompactButton(10, 15, _(" Close ")); 1663 bSelect = newtCompactButton(30, 15, _(" Select ")); 1664 sprintf(tmp, "%-10s %-20s", _("Priority"), _("Filename")); 1665 1665 headerMsg = newtLabel(2, 1, tmp); 1666 newtOpenWindow(5, 4, 70, 16, "Non-matching files");1666 newtOpenWindow(5, 4, 70, 16, _("Non-matching files")); 1667 1667 myForm = newtForm(NULL, NULL, 0); 1668 1668 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, … … 1678 1678 i++); 1679 1679 if (i == filelist->entries && filelist->entries > 0) { 1680 log_to_screen( "I don't know what that button does!");1680 log_to_screen(_("I don't know what that button does!")); 1681 1681 } else { 1682 1682 currline = i;
Note:
See TracChangeset
for help on using the changeset viewer.