--- pico/search.c.orig Tue Oct 5 05:49:41 1999 +++ pico/search.c Thu Oct 14 11:36:00 1999 @@ -131,9 +131,9 @@ while(1){ if (gmode & MDREPLACE) - status = srpat("Search", defpat, repl_mode); + status = srpat("搜尋", defpat, repl_mode); else - status = readpattern("Search", TRUE); + status = readpattern("搜尋", TRUE); switch(status){ case TRUE: /* user typed something */ @@ -146,14 +146,14 @@ saved_state = save_pico_state(); (*Pmaster->helper)(Pmaster->search_help, - "Help for Searching", 1); + "搜尋的輔助說明", 1); if(saved_state){ restore_pico_state(saved_state); free_pico_state(saved_state); } } else - pico_help(SearchHelpText, "Help for Searching", 1); + pico_help(SearchHelpText, "搜尋的輔助說明", 1); case (CTRL|'L'): /* redraw requested */ refresh(FALSE, 1); @@ -235,7 +235,7 @@ default: if(status == ABORT) - emlwrite("Search Cancelled", NULL); + emlwrite("取消搜尋", NULL); else mlerase(); @@ -283,16 +283,16 @@ /* and complain if not there */ if (status == FALSE){ - emlwrite("\"%s\" not found", defpat); + emlwrite("找不到 \"%s\"", defpat); } else if((gmode & MDREPLACE) && repl_mode == TRUE){ status = replace_pat(defpat, &wrapt2); /* replace pattern */ if (wrapt == TRUE || wrapt2 == TRUE) - emlwrite("Replacement %srapped", - (status == ABORT) ? "cancelled but w" : "W"); + emlwrite("取代%s由檔案起始從頭搜尋", + (status == ABORT) ? "已取消,但" : ""); } else if(wrapt == TRUE){ - emlwrite("Search Wrapped", NULL); + emlwrite("從頭搜尋", NULL); } else if(status == TRUE){ emlwrite("", NULL); @@ -321,7 +321,7 @@ /* additional 'replace all' menu option */ menu_pat[0].name = "^X"; menu_pat[0].key = (CTRL|'X'); - menu_pat[0].label = "Repl All"; + menu_pat[0].label = "取代所有"; KS_OSDATASET(&menu_pat[0], KS_NONE); menu_pat[1].name = NULL; @@ -333,10 +333,10 @@ pputs(origpat, 1); /* highlight word */ (*term.t_rev)(0); - sprintf(prompt, "Replace%s \"", repl_all ? " every" : ""); + sprintf(prompt, "取代%s \"", repl_all ? "每一個" : ""); expandp(&defpat[0], &prompt[strlen(prompt)], NPAT/2); - strcat(prompt, "\" with"); + strcat(prompt, "\" 為"); if(rpat[0] != 0){ strcat(prompt, " ["); expandp(rpat, &prompt[strlen(prompt)], NPAT/2); @@ -378,14 +378,14 @@ saved_state = save_pico_state(); (*Pmaster->helper)(Pmaster->search_help, - "Help for Searching", 1); + "搜尋的輔助說明", 1); if(saved_state){ restore_pico_state(saved_state); free_pico_state(saved_state); } } else - pico_help(SearchHelpText, "Help for Searching", 1); + pico_help(SearchHelpText, "搜尋的輔助說明", 1); case (CTRL|'L'): /* redraw requested */ refresh(FALSE, 1); @@ -395,18 +395,18 @@ case (CTRL|'X'): /* toggle replace all option */ if (repl_all){ repl_all = FALSE; - menu_pat[0].label = "Repl All"; + menu_pat[0].label = "取代所有"; } else{ repl_all = TRUE; - menu_pat[0].label = "Repl One"; + menu_pat[0].label = "取代一個"; } break; default: if(status == ABORT) - emlwrite("Replacement Cancelled", NULL); + emlwrite("取消取代", NULL); else mlerase(); chword(defpat, origpat); @@ -455,9 +455,9 @@ (*term.t_rev)(0); fflush(stdout); - strcpy(prompt, "Replace \""); + strcpy(prompt, "取代 \""); expandp(&orig[0], &prompt[strlen(prompt)], NPAT/2); - strcat(prompt, "\" with \""); + strcat(prompt, "\" 為 \""); expandp(&repl[0], &prompt[strlen(prompt)], NPAT/2); strcat(prompt, "\""); @@ -471,13 +471,13 @@ chword(realpat, realpat); /* replace word by itself */ update(); if(status == ABORT){ /* if cancelled return */ - emlwrite("Replace All cancelled after %d changes", (char *) n); + emlwrite("在取消「取代所有」之前,已做過 %d 個改變", (char *) n); return (ABORT); /* ... else keep looking */ } } } else{ - emlwrite("No more matches for \"%s\"", orig); + emlwrite("沒有符合 \"%s\" 的字串了", orig); return (FALSE); } } @@ -495,33 +495,33 @@ EXTRAKEYS menu_pat[7]; menu_pat[i = 0].name = "^Y"; - menu_pat[i].label = "FirstLine"; + menu_pat[i].label = "第一行"; menu_pat[i].key = (CTRL|'Y'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^V"; - menu_pat[i].label = "LastLine"; + menu_pat[i].label = "最後一行"; menu_pat[i].key = (CTRL|'V'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^R"; - menu_pat[i].label = repl_mode ? "No Replace" : "Replace"; + menu_pat[i].label = repl_mode ? "不取代" : "取代"; menu_pat[i].key = (CTRL|'R'); KS_OSDATASET(&menu_pat[i], KS_NONE); if(!repl_mode){ menu_pat[++i].name = "^T"; - menu_pat[i].label = "LineNumber"; + menu_pat[i].label = "行號"; menu_pat[i].key = (CTRL|'T'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^W"; - menu_pat[i].label = "Start of Para"; + menu_pat[i].label = "段落起始"; menu_pat[i].key = (CTRL|'W'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^O"; - menu_pat[i].label = "End of Para"; + menu_pat[i].label = "段落結尾"; menu_pat[i].key = (CTRL|'O'); KS_OSDATASET(&menu_pat[i], KS_NONE); } @@ -577,7 +577,7 @@ EXTRAKEYS menu_pat[2]; menu_pat[i = 0].name = "^T"; - menu_pat[i].label = "No Line Number"; + menu_pat[i].label = "無行號"; menu_pat[i].key = (CTRL|'T'); KS_OSDATASET(&menu_pat[i++], KS_NONE); @@ -622,28 +622,28 @@ EXTRAKEYS menu_pat[6]; menu_pat[i = 0].name = "^Y"; - menu_pat[i].label = "FirstLine"; + menu_pat[i].label = "第一行"; menu_pat[i].key = (CTRL|'Y'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^V"; - menu_pat[i].label = "LastLine"; + menu_pat[i].label = "最後一行"; menu_pat[i].key = (CTRL|'V'); KS_OSDATASET(&menu_pat[i], KS_NONE); if(text_mode){ menu_pat[++i].name = "^T"; - menu_pat[i].label = "LineNumber"; + menu_pat[i].label = "行號"; menu_pat[i].key = (CTRL|'T'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^W"; - menu_pat[i].label = "Start of Para"; + menu_pat[i].label = "段落起始"; menu_pat[i].key = (CTRL|'W'); KS_OSDATASET(&menu_pat[i], KS_NONE); menu_pat[++i].name = "^O"; - menu_pat[i].label = "End of Para"; + menu_pat[i].label = "段落結尾"; menu_pat[i].key = (CTRL|'O'); KS_OSDATASET(&menu_pat[i], KS_NONE); }