Changeset 507 in MondoRescue for trunk/mondo/mondo/common/newt-specific.c


Ignore:
Timestamp:
Apr 30, 2006, 2:04:16 AM (18 years ago)
Author:
bcornec
Message:

merge -r489:506 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/newt-specific.c

    r300 r507  
    2525#include "libmondo-tools-EXT.h"
    2626#include "libmondo-fork-EXT.h"
    27 #include "libmondo-gui-EXT.h"
    28 #include "lib-common-externs.h"
     27#include "newt-specific-EXT.h"
    2928
    3029/*@unused@*/
     
    124123                    tmp[i - 1] = '\0';
    125124                }
    126                 if (strstr("yesYES", tmp)) {
     125                if (strstr(_("yesYES"), tmp)) {
    127126                    paranoid_free(tmp);
    128127                    return (TRUE);
    129                 } else if (strstr("NOno", tmp)) {
     128                } else if (strstr(_("NOno"), tmp)) {
    130129                    paranoid_free(tmp);
    131130                    return (FALSE);
     
    133132                    system("sync");
    134133                    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"));
    136135                }
    137136            }
    138137        } else {
    139             return (popup_with_buttons(prompt, "Yes", "No"));
     138            return (popup_with_buttons(prompt, _("Yes"), _("No")));
    140139        }
    141140    }
     
    169168                tmp[i - 1] = '\0';
    170169            }
    171             if (strstr("okOKOkYESyes", tmp)) {
     170            if (strstr(_("okOKOkYESyes"), tmp)) {
    172171                paranoid_free(tmp);
    173172                return (TRUE);
     
    177176            }
    178177        } else {
    179             return (popup_with_buttons(prompt, " Okay ", "Cancel"));
     178            return (popup_with_buttons(prompt, _(" Okay "), _("Cancel")));
    180179        }
    181180    }
     
    313312            ("gzip -9c "MONDO_LOGFILE" > /tmp/MA.log.gz 2> /dev/null");
    314313        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"));
    317316        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);
    320319        if (does_file_exist("/tmp/MA.log.gz")) {
    321320            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"));
    325324        register_pid(0, "mondo");   // finish() does this too, FYI
    326325        if (!g_main_pid) {
     
    375374//  system("clear");
    376375//  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);
    379378        free_libmondo_global_strings();
    380379        exit(signal);
     
    662661            while (((ch = getchar()) != '\n') && (ch != EOF));
    663662        } else {
    664             (void) popup_with_buttons(prompt, " OK ", "");
     663            (void) popup_with_buttons(prompt, _(" OK "), "");
    665664        }
    666665    }
     
    718717#endif
    719718            );
    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"));
    722721        //  newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title);
    723722        newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title);
     
    806805        }
    807806        //  newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert");
    808         newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert");
     807        newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert"));
    809808        myForm = newtForm(NULL, NULL, 0);
    810809        newtFormAddComponents(myForm, text, b_1, b_2, NULL);
     
    870869            newtCls();
    871870            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."));
    873872            /*  newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */
    874873            newtDrawRootText(18, 0, WELCOME_STRING);
     
    947946            g_isoform_old_progress = percentage;
    948947            asprintf(&timeline_str,
    949                      "%2ld:%02ld taken            %2ld:%02ld remaining",
     948                     _("%2ld:%02ld taken            %2ld:%02ld remaining"),
    950949                     time_taken / 60, time_taken % 60, time_remaining / 60,
    951950                     time_remaining % 60);
     
    977976            } else {
    978977                asprintf(&pcline_str,
    979                          " %3d%% done              %3d%% to go",
     978                         _(" %3d%% done              %3d%% to go"),
    980979                         percentage, 100 - percentage);
    981980            }
     
    11201119
    11211120        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"));
    11261125
    11271126            j = trunc(percentage / 5);
     
    11391138
    11401139            if (percentage > 100) {
    1141                 log_msg(2, "percentage = %d", percentage);
     1140                log_msg(2, _("percentage = %d"), percentage);
    11421141            }
    11431142            asprintf(&taskprogress,
    1144                      "TASK:  [%s%s] %3d%% done; %2ld:%02ld to go", tmp1,
     1143                     _("TASK:  [%s%s] %3d%% done; %2ld:%02ld to go"), tmp1,
    11451144                     tmp2, percentage, time_remaining / 60,
    11461145                     time_remaining % 60);
    11471146
    1148             printf("---progress-form---4--- %s\r\n", taskprogress);
     1147            printf(_("---progress-form---4--- %s\r\n"), taskprogress);
    11491148            paranoid_free(taskprogress);
    11501149        } else {
     
    12111210        if (g_text_mode) {
    12121211            for (backup_type = none; backup_type == none;) {
    1213                 printf("Backup type (");
     1212                printf(_("Backup type ("));
    12141213                for (i = 0; possible_responses[i]; i++) {
    12151214                    printf("%c%s", (i == 0) ? '\0' : ' ',
     
    12311230        if (restoring) {
    12321231            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:"));
    12351234        } else {
    12361235            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:"));
    12391238        }
    12401239        newtPushHelpLine(title_sz);
     
    12451244        paranoid_free(minimsg_sz);
    12461245
    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   "));
    12551254        myForm = newtForm(NULL, NULL, 0);
    12561255        newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8,
     
    13051304        newtDrawRootText(18, 0, WELCOME_STRING);
    13061305        newtPushHelpLine
    1307             ("   Please specify the level of compression that you want.");
     1306            (_("   Please specify the level of compression that you want."));
    13081307        //  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        "));
    13151314        myForm = newtForm(NULL, NULL, 0);
    13161315        newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL);
     
    13961395        paranoid_fclose(fin);
    13971396        if (filelist->entries >= ARBITRARY_MAXIMUM) {
    1398             log_to_screen("Arbitrary limits suck, man!");
     1397            log_to_screen(_("Arbitrary limits suck, man!"));
    13991398            paranoid_free(tmp);
    14001399            return (1);
     
    15271526        }
    15281527        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."),
    15301529                 i);
    15311530        newtPushHelpLine(differ_sz);
    15321531        paranoid_free(differ_sz);
    15331532
    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"));
    15381537        headerMsg = newtLabel(2, 1, tmp);
    15391538        paranoid_free(tmp);
    15401539
    1541         newtOpenWindow(5, 4, 70, 16, "Non-matching files");
     1540        newtOpenWindow(5, 4, 70, 16, _("Non-matching files"));
    15421541        myForm = newtForm(NULL, NULL, 0);
    15431542        newtFormAddComponents(myForm, headerMsg, fileListbox, bClose,
     
    15531552                     i++);
    15541553                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!"));
    15561555                } else {
    15571556                    currline = i;
Note: See TracChangeset for help on using the changeset viewer.