From: Arun Persaud Date: Sat, 3 Dec 2011 06:13:36 +0000 (-0800) Subject: marked more strings for translation X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=848e9dfc57a2db0255eb1adbd2c01c61fe26c4ed;p=xboard.git marked more strings for translation --- diff --git a/args.h b/args.h index 92f05af..61336fa 100644 --- a/args.h +++ b/args.h @@ -771,7 +771,7 @@ ExitArgError(char *msg, char *badArg, Boolean quit) if( (len > MSG_SIZ) && appData.debugMode ) fprintf(debugFP, "ExitArgError: buffer truncated. Input: msg=%s badArg=%s\n", msg, badArg); - if(!quit) { printf("%s in settings file\n", buf); return; } // DisplayError does not work yet at this stage... + if(!quit) { printf(_("%s in settings file\n"), buf); return; } // DisplayError does not work yet at this stage... DisplayFatalError(buf, 0, 2); exit(2); } @@ -781,7 +781,7 @@ ValidateInt(char *s) { char *p = s; if(*p == '-' || *p == '+') p++; - while(*p) if(!isdigit(*p++)) ExitArgError("Bad integer value", s, TRUE); + while(*p) if(!isdigit(*p++)) ExitArgError(_("Bad integer value"), s, TRUE); return atoi(s); } @@ -872,7 +872,7 @@ ParseArgs(GetFunc get, void *cl) for (ad = argDescriptors; ad->argName != NULL; ad++) if (strcmp(ad->argName, argName + 1) == 0) break; if (ad->argName == NULL) { - ExitArgError("Unrecognized argument", argName, get != &FileGet); // [HGM] make unknown argument non-fatal + ExitArgError(_("Unrecognized argument"), argName, get != &FileGet); // [HGM] make unknown argument non-fatal while (ch != '\n' && ch != NULLCHAR) ch = get(cl); // but skip rest of line it is on continue; // so that when it is in a settings file, it is the only setting that will be purged from it } @@ -961,7 +961,7 @@ ParseArgs(GetFunc get, void *cl) ch = get(cl); switch (ch) { case NULLCHAR: - ExitArgError("Incomplete \\ escape in value for", argName, TRUE); + ExitArgError(_("Incomplete \\ escape in value for"), argName, TRUE); break; case 'n': *q++ = '\n'; @@ -1045,7 +1045,7 @@ ParseArgs(GetFunc get, void *cl) } else { if (ad->argLoc != NULL) { } else { - ExitArgError("Failed to open indirection file", argValue, TRUE); + ExitArgError(_("Failed to open indirection file"), argValue, TRUE); } } } @@ -1062,7 +1062,7 @@ ParseArgs(GetFunc get, void *cl) *(Boolean *) ad->argLoc = FALSE; break; default: - ExitArgError("Unrecognized boolean argument value", argValue, TRUE); + ExitArgError(_("Unrecognized boolean argument value"), argValue, TRUE); break; } break; @@ -1090,7 +1090,7 @@ ParseArgs(GetFunc get, void *cl) break; case ArgNone: - ExitArgError("Unrecognized argument", argValue, TRUE); + ExitArgError(_("Unrecognized argument"), argValue, TRUE); break; case ArgTwo: case ArgTrue: diff --git a/backend.c b/backend.c index 8d6a273..ba7f512 100644 --- a/backend.c +++ b/backend.c @@ -3636,7 +3636,7 @@ read_from_ics(isr, closure, data, count, error) flipView = appData.flipView; DrawPosition(TRUE, boards[currentMove]); DisplayBothClocks(); - snprintf(str, MSG_SIZ, "%s vs. %s", + snprintf(str, MSG_SIZ, _("%s vs. %s"), gameInfo.white, gameInfo.black); DisplayTitle(str); gameMode = IcsIdle; @@ -4051,10 +4051,10 @@ read_from_ics(isr, closure, data, count, error) char wh[16], bh[16]; PackHolding(wh, white_holding); PackHolding(bh, black_holding); - snprintf(str, MSG_SIZ,"[%s-%s] %s-%s", wh, bh, + snprintf(str, MSG_SIZ, "[%s-%s] %s-%s", wh, bh, gameInfo.white, gameInfo.black); } else { - snprintf(str, MSG_SIZ, "%s [%s] vs. %s [%s]", + snprintf(str, MSG_SIZ, _("%s [%s] vs. %s [%s]"), gameInfo.white, white_holding, gameInfo.black, black_holding); } @@ -4778,11 +4778,11 @@ ParseBoard12(string) basetime, increment, (int) gameInfo.variant); } else { if(gameInfo.variant == VariantNormal) - snprintf(str, MSG_SIZ, "%s (%d) vs. %s (%d) {%d %d}", + snprintf(str, MSG_SIZ, _("%s (%d) vs. %s (%d) {%d %d}"), gameInfo.white, white_stren, gameInfo.black, black_stren, basetime, increment); else - snprintf(str, MSG_SIZ, "%s (%d) vs. %s (%d) {%d %d %s}", + snprintf(str, MSG_SIZ, _("%s (%d) vs. %s (%d) {%d %d %s}"), gameInfo.white, white_stren, gameInfo.black, black_stren, basetime, increment, VariantName(gameInfo.variant)); } @@ -5031,8 +5031,8 @@ UploadGameEvent() int i, last = forwardMostMove; // make sure ICS reply cannot pre-empt us by clearing fmm static char *castlingStrings[4] = { "none", "kside", "qside", "both" }; if(gameMode == IcsObserving || gameMode == IcsPlayingBlack || gameMode == IcsPlayingWhite) { - DisplayError("You cannot do this while you are playing or observing", 0); - return; + DisplayError(_("You cannot do this while you are playing or observing"), 0); + return; } if(gameMode != IcsExamining) { // is this ever not the case? char buf[MSG_SIZ], *p, *fen, command[MSG_SIZ], bsetup = 0; @@ -6664,7 +6664,7 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar) gameMode = MachinePlaysBlack; StartClocks(); SetGameInfo(); - snprintf(buf, MSG_SIZ, "%s vs. %s", gameInfo.white, gameInfo.black); + snprintf(buf, MSG_SIZ, _("%s vs. %s"), gameInfo.white, gameInfo.black); DisplayTitle(buf); if (first.sendName) { snprintf(buf, MSG_SIZ,"name %s\n", gameInfo.white); @@ -8664,7 +8664,7 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. if(f = fopen(buf, "w")) { // export PV to applicable PV file fprintf(f, "%5.2f/%-2d %s", curscore/100., plylev, pv); fclose(f); - } else DisplayError("failed writing PV", 0); + } else DisplayError(_("failed writing PV"), 0); } tempStats.depth = plylev; @@ -11579,7 +11579,7 @@ LoadGame(f, gameNumber, title, useList) yynewfile(f); if (lg && lg->gameInfo.white && lg->gameInfo.black) { - snprintf(buf, sizeof(buf), "%s vs. %s", lg->gameInfo.white, + snprintf(buf, sizeof(buf), _("%s vs. %s"), lg->gameInfo.white, lg->gameInfo.black); DisplayTitle(buf); } else if (*title != NULLCHAR) { @@ -12207,7 +12207,7 @@ SaveGameToFile(filename, append) DisplayMessage(_("Waiting for access to save file"), ""); flock(fileno(f), LOCK_EX); // [HGM] lock: lock file while we are writing DisplayMessage(_("Saving game"), ""); - if(lseek(fileno(f), 0, SEEK_END) == -1) DisplayError("Bad Seek", errno); // better safe than sorry... + if(lseek(fileno(f), 0, SEEK_END) == -1) DisplayError(_("Bad Seek"), errno); // better safe than sorry... result = SaveGame(f, 0, NULL); DisplayMessage(buf, ""); return result; @@ -13194,7 +13194,7 @@ MachineWhiteEvent() pausing = FALSE; ModeHighlight(); SetGameInfo(); - snprintf(buf, MSG_SIZ, "%s vs. %s", gameInfo.white, gameInfo.black); + snprintf(buf, MSG_SIZ, _("%s vs. %s"), gameInfo.white, gameInfo.black); DisplayTitle(buf); if (first.sendName) { snprintf(buf, MSG_SIZ, "name %s\n", gameInfo.black); @@ -13271,7 +13271,7 @@ MachineBlackEvent() pausing = FALSE; ModeHighlight(); SetGameInfo(); - snprintf(buf, MSG_SIZ, "%s vs. %s", gameInfo.white, gameInfo.black); + snprintf(buf, MSG_SIZ, _("%s vs. %s"), gameInfo.white, gameInfo.black); DisplayTitle(buf); if (first.sendName) { snprintf(buf, MSG_SIZ, "name %s\n", gameInfo.white); @@ -13316,24 +13316,24 @@ DisplayTwoMachinesTitle() char buf[MSG_SIZ]; if (appData.matchGames > 0) { if(appData.tourneyFile[0]) { - snprintf(buf, MSG_SIZ, "%s vs. %s (%d/%d%s)", + snprintf(buf, MSG_SIZ, _("%s vs. %s (%d/%d%s)"), gameInfo.white, gameInfo.black, nextGame+1, appData.matchGames+1, appData.tourneyType>0 ? "gt" : appData.tourneyType<0 ? "sw" : "rr"); } else if (first.twoMachinesColor[0] == 'w') { - snprintf(buf, MSG_SIZ, "%s vs. %s (%d-%d-%d)", + snprintf(buf, MSG_SIZ, _("%s vs. %s (%d-%d-%d)"), gameInfo.white, gameInfo.black, first.matchWins, second.matchWins, matchGame - 1 - (first.matchWins + second.matchWins)); } else { - snprintf(buf, MSG_SIZ, "%s vs. %s (%d-%d-%d)", + snprintf(buf, MSG_SIZ, _("%s vs. %s (%d-%d-%d)"), gameInfo.white, gameInfo.black, second.matchWins, first.matchWins, matchGame - 1 - (first.matchWins + second.matchWins)); } } else { - snprintf(buf, MSG_SIZ, "%s vs. %s", gameInfo.white, gameInfo.black); + snprintf(buf, MSG_SIZ, _("%s vs. %s"), gameInfo.white, gameInfo.black); } DisplayTitle(buf); } diff --git a/book.c b/book.c index a5aa6ab..893dee8 100644 --- a/book.c +++ b/book.c @@ -37,6 +37,15 @@ #include "common.h" #include "backend.h" #include "moves.h" +#include "gettext.h" + +#ifdef ENABLE_NLS +# define _(s) gettext (s) +# define N_(s) gettext_noop (s) +#else +# define _(s) (s) +# define N_(s) s +#endif #ifdef _MSC_VER typedef unsigned __int64 uint64; @@ -44,7 +53,6 @@ typedef unsigned long long int uint64; #endif - #ifdef _MSC_VER # define U64(u) (u##ui64) #else @@ -501,7 +509,7 @@ int GetBookMoves(int moveNr, char *book, entry_t entries[]) f = fopen(book,"rb"); } if(!f){ - DisplayError("Polyglot book not valid", 0); + DisplayError(_("Polyglot book not valid"), 0); appData.usePolyglotBook = FALSE; return -1; } @@ -561,7 +569,7 @@ char *ProbeBook(int moveNr, char *book) total_weight += entries[i].weight; if(total_weight > j) break; } - if(i >= count) DisplayFatalError("Book Fault", 0, 1); // safety catch, cannot happen + if(i >= count) DisplayFatalError(_("Book Fault"), 0, 1); // safety catch, cannot happen move_to_string(move_s, entries[i].move); if(appData.debugMode) fprintf(debugFP, "book move field = %d\n", entries[i].move); @@ -675,10 +683,10 @@ void SaveToBook(char *text) FILE *f; if(!count && !currentCount) return; f=fopen(appData.polyglotBook, "rb+"); - if(!f){ DisplayError("Polyglot book not valid", 0); return; } + if(!f){ DisplayError(_("Polyglot book not valid"), 0); return; } offset=find_key(f, entries[0].key, &entry); if(entries[0].key != entry.key && currentCount) { - DisplayError("Hash keys are different", 0); + DisplayError(_("Hash keys are different"), 0); fclose(f); return; } diff --git a/engineoutput.c b/engineoutput.c index 0a45777..59bff2f 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -45,6 +45,15 @@ #include "backend.h" #include "moves.h" #include "engineoutput.h" +#include "gettext.h" + +#ifdef ENABLE_NLS +# define _(s) gettext (s) +# define N_(s) gettext_noop (s) +#else +# define _(s) (s) +# define N_(s) s +#endif typedef struct { char * name; @@ -82,9 +91,11 @@ void MakeEngineOutputTitle() { static char buf[MSG_SIZ]; static char oldTitle[MSG_SIZ]; - char *title = "Engine Output"; + char title[MSG_SIZ]; int count, rule = 2*appData.ruleMoves; + snprintf(title, MSG_SIZ, _("Engine Output") ); + if(!EngineOutputIsUp()) return; // figure out value of 50-move counter count = currentMove; @@ -93,7 +104,8 @@ void MakeEngineOutputTitle() count = currentMove - count; snprintf(buf, MSG_SIZ, "%s (%d reversible plies)", title, count); if(!rule) rule = 100; - if(count >= rule - 40 && (!appData.icsActive || gameMode == IcsObserving)) title = buf; + if(count >= rule - 40 && (!appData.icsActive || gameMode == IcsObserving)) + safeStrCpy(title, buf, MSG_SIZ); if(!strcmp(oldTitle, title)) return; safeStrCpy(oldTitle, title, MSG_SIZ); SetEngineOutputTitle(title); diff --git a/filebrowser/selfile.c b/filebrowser/selfile.c index 71dcd8c..e6edfe4 100644 --- a/filebrowser/selfile.c +++ b/filebrowser/selfile.c @@ -62,6 +62,7 @@ extern int errno; #include "xstat.h" #include "selfile.h" +#include "../gettext.h" #ifndef MAXPATHLEN #define MAXPATHLEN 1024 @@ -71,6 +72,15 @@ extern int errno; extern char *getwd(); #endif /* !defined(SVR4) && !defined(SYSV) && !defined(USG) */ +#ifdef ENABLE_NLS +# define _(s) gettext (s) +# define N_(s) gettext_noop (s) +#else +# define _(s) (s) +# define N_(s) s +#endif + + int SFstatus = SEL_FILE_NULL; char @@ -288,7 +298,7 @@ SFcreateWidgets(toplevel, prompt, ok, cancel) i = 0; XtSetArg(arglist[i], XtNtransientFor, toplevel); i++; - selFile = XtAppCreateShell("Browse", "SelFile", + selFile = XtAppCreateShell(_("Browse"), "SelFile", transientShellWidgetClass, SFdisplay, arglist, i); /* Add WM_DELETE_WINDOW protocol */ @@ -391,7 +401,7 @@ SFcreateWidgets(toplevel, prompt, ok, cancel) XtAddEventHandler(selFileField, ButtonPressMask, False, SFsetFocus, (XtPointer) selFileForm); i = 0; - XtSetArg(arglist[i], XtNlabel, "Filter on extensions:"); i++; + XtSetArg(arglist[i], XtNlabel, _("Filter on extensions:")); i++; XtSetArg(arglist[i], XtNvertDistance, 5); i++; XtSetArg(arglist[i], XtNfromVert, selFileField); i++; XtSetArg(arglist[i], XtNresizable, True); i++; @@ -772,15 +782,15 @@ XsraSelFile(toplevel, prompt, ok, cancel, failed, FILE *fp; if (!prompt) { - prompt = "Pathname:"; + prompt = _("Pathname:"); } if (!ok) { - ok = "OK"; + ok = _("OK"); } if (!cancel) { - cancel = "Cancel"; + cancel = _("Cancel"); } if(SFpathFlag != (mode && mode[0] == 'p') || strcmp(SFfilterBuffer, filter)) { @@ -824,7 +834,7 @@ XsraSelFile(toplevel, prompt, ok, cancel, failed, if (!getwd(SFstartDir)) { #endif /* defined(SVR4) || defined(SYSV) || defined(USG) */ - XtAppError(SFapp, "XsraSelFile: can't get current directory"); + XtAppError(SFapp, _("XsraSelFile: can't get current directory")); } (void) strcat(SFstartDir, "/"); (void) strncpy(SFcurrentDir, SFstartDir, MAXPATHLEN); diff --git a/xboard.c b/xboard.c index 26adc76..4d10b37 100644 --- a/xboard.c +++ b/xboard.c @@ -800,7 +800,7 @@ Menu menuBar[] = { MenuItem buttonBar[] = { {"<<", "<<", ToStartProc}, {"<", "<", BackwardProc}, - {PAUSE_BUTTON, PAUSE_BUTTON, PauseProc}, + {N_(PAUSE_BUTTON), PAUSE_BUTTON, PauseProc}, {">", ">", ForwardProc}, {">>", ">>", ToEndProc}, {NULL, NULL, NULL} @@ -5032,7 +5032,7 @@ void FileNamePopUp(label, def, filter, proc, openMode) fileOpenMode = openMode; /* to use globals here */ { // [HGM] use file-selector dialog stolen from Ghostview int index; // this is not supported yet - if(openFP = XsraSelFile(shellWidget, label, NULL, NULL, "could not open: ", + if(openFP = XsraSelFile(shellWidget, label, NULL, NULL, _("could not open: "), (def[0] ? def : NULL), filter, openMode, NULL, &openName)) // [HGM] delay to give expose event opportunity to redraw board after browser-dialog popdown before lengthy load starts ScheduleDelayedEvent(&DelayedLoad, 50); @@ -6828,17 +6828,18 @@ void AboutProc(w, event, prms, nprms) { char buf[MSG_SIZ]; #if ZIPPY - char *zippy = " (with Zippy code)"; + char *zippy = _(" (with Zippy code)"); #else char *zippy = ""; #endif - snprintf(buf, sizeof(buf), "%s%s\n\n%s\n%s\n%s\n\n%s%s\n%s", - programVersion, zippy, - "Copyright 1991 Digital Equipment Corporation", - "Enhancements Copyright 1992-2009 Free Software Foundation", - "Enhancements Copyright 2005 Alessandro Scotti", - PACKAGE, " is free software and carries NO WARRANTY;", - "see the file COPYING for more information."); + snprintf(buf, sizeof(buf), +_("%s%s\n\n" +"Copyright 1991 Digital Equipment Corporation\n" +"Enhancements Copyright 1992-2009 Free Software Foundation\n" +"Enhancements Copyright 2005 Alessandro Scotti\n\n" +"%s is free software and carries NO WARRANTY;" +"see the file COPYING for more information."), + programVersion, zippy, PACKAGE); ErrorPopUp(_("About XBoard"), buf, FALSE); } diff --git a/xgamelist.c b/xgamelist.c index 15165f1..9784bf7 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -676,7 +676,7 @@ int SaveGameListAsText(FILE *f) int nItem; if( !glc || ((ListGame *) gameList.tailPred)->number <= 0 ) { - DisplayError("Game list not loaded or empty", 0); + DisplayError(_("Game list not loaded or empty"), 0); return False; } @@ -812,7 +812,7 @@ GameListOptionsCreate() XtSetArg(args[j], XtNresizable, True); j++; XtSetArg(args[j], XtNallowShellResize, True); j++; shell = gameListOptShell = - XtCreatePopupShell("Game-list options", transientShellWidgetClass, + XtCreatePopupShell(_("Game-list options"), transientShellWidgetClass, shellWidget, args, j); layout = XtCreateManagedWidget(layoutName, formWidgetClass, shell, diff --git a/xoptions.c b/xoptions.c index eabebbe..36cf573 100644 --- a/xoptions.c +++ b/xoptions.c @@ -352,7 +352,7 @@ Option matchOptions[] = { { 0, 0, 0, NULL, (void*) &tfName, ".trn", NULL, FileName, N_("Tournament file:") }, { 0, 0, 0, NULL, (void*) &appData.roundSync, "", NULL, CheckBox, N_("Sync after round (for concurrent playing of a single") }, { 0, 0, 0, NULL, (void*) &appData.cycleSync, "", NULL, CheckBox, N_("Sync after cycle tourney with multiple XBoards)") }, -{ 0xD, 150, 0, NULL, (void*) &engineName, "", NULL, TextBox, "Tourney participants:" }, +{ 0xD, 150, 0, NULL, (void*) &engineName, "", NULL, TextBox, N_("Tourney participants:") }, { 0, 1, 0, NULL, (void*) &engineChoice, (char*) (engineMnemonic+1), (engineMnemonic+1), ComboBox, N_("Select Engine:") }, { 0, 0, 10, NULL, (void*) &appData.tourneyType, "", NULL, Spin, N_("Tourney type (0 = round-robin, 1 = gauntlet):") }, { 0, 1, 1000000000, NULL, (void*) &appData.tourneyCycles, "", NULL, Spin, N_("Number of tourney cycles (or Swiss rounds):") }, @@ -751,40 +751,40 @@ int BoardOptionsOK(int n) Option boardOptions[] = { { 0, 0, 70, NULL, (void*) &appData.whitePieceColor, "", NULL, TextBox, N_("White Piece Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#FFFFCC", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 70, NULL, (void*) &appData.blackPieceColor, "", NULL, TextBox, N_("Black Piece Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#202020", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 70, NULL, (void*) &appData.lightSquareColor, "", NULL, TextBox, N_("Light Square Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#C8C365", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 70, NULL, (void*) &appData.darkSquareColor, "", NULL, TextBox, N_("Dark Square Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#77A26D", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 70, NULL, (void*) &appData.highlightSquareColor, "", NULL, TextBox, N_("Highlight Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#FFFF00", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 70, NULL, (void*) &appData.premoveHighlightColor, "", NULL, TextBox, N_("Premove Highlight Color:") }, { 1000, 1, 0, NULL, (void*) &DefColor, NULL, (char**) "#FF0000", Button, " " }, -{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "R" }, -{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "G" }, -{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "B" }, -{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, "D" }, +{ 1, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("R") }, +{ 2, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("G") }, +{ 3, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("B") }, +{ 4, 1, 0, NULL, (void*) &AdjustColor, NULL, NULL, Button, N_("D") }, { 0, 0, 0, NULL, (void*) &appData.upsideDown, "", NULL, CheckBox, N_("Flip Pieces Shogi Style (Colored buttons restore default)") }, //{ 0, 0, 0, NULL, (void*) &appData.allWhite, "", NULL, CheckBox, N_("Use Outline Pieces for Black") }, { 0, 0, 0, NULL, (void*) &appData.monoMode, "", NULL, CheckBox, N_("Mono Mode") }, @@ -1292,7 +1292,7 @@ void EngineMenuProc(w, event, prms, nprms) String *prms; Cardinal *nprms; { - GenericPopUp(adjudicationOptions, "Adjudicate non-ICS Games", 0); + GenericPopUp(adjudicationOptions, _("Adjudicate non-ICS Games"), 0); } void UciMenuProc(w, event, prms, nprms) @@ -1438,8 +1438,8 @@ void SaveChanges(int n) Option commentOptions[] = { { 0xD, 200, 250, NULL, (void*) &commentText, "", NULL, TextBox, "" }, -{ 0, 0, 50, NULL, (void*) &ClearComment, NULL, NULL, Button, "clear" }, -{ 0, 1, 100, NULL, (void*) &SaveChanges, NULL, NULL, Button, "save changes" }, +{ 0, 0, 50, NULL, (void*) &ClearComment, NULL, NULL, Button, N_("clear") }, +{ 0, 1, 100, NULL, (void*) &SaveChanges, NULL, NULL, Button, N_("save changes") }, { 0, 1, 0, NULL, (void*) &NewComCallback, "", NULL, EndMark , "" } }; @@ -1491,7 +1491,7 @@ void changeTags(int n) Option tagsOptions[] = { { 0, 0, 0, NULL, NULL, NULL, NULL, Label, "" }, { 0xD, 200, 200, NULL, (void*) &tagsText, "", NULL, TextBox, "" }, -{ 0, 0, 100, NULL, (void*) &changeTags, NULL, NULL, Button, "save changes" }, +{ 0, 0, 100, NULL, (void*) &changeTags, NULL, NULL, Button, N_("save changes") }, { 0, 1, 0, NULL, (void*) &NewTagsCallback, "", NULL, EndMark , "" } }; @@ -1676,11 +1676,11 @@ int ShuffleOK(int n) } Option shuffleOptions[] = { -{ 0, 0, 50, NULL, (void*) &shuffleOpenings, NULL, NULL, CheckBox, "shuffle" }, -{ 0,-1,2000000000, NULL, (void*) &appData.defaultFrcPosition, "", NULL, Spin, N_("Start-position number:") }, -{ 0, 0, 0, NULL, (void*) &SetRandom, NULL, NULL, Button, "randomize" }, -{ 0, 1, 0, NULL, (void*) &SetRandom, NULL, NULL, Button, "pick fixed" }, -{ 0, 1, 0, NULL, (void*) &ShuffleOK, "", NULL, EndMark , "" } + { 0, 0, 50, NULL, (void*) &shuffleOpenings, NULL, NULL, CheckBox, N_("shuffle") }, + { 0,-1,2000000000, NULL, (void*) &appData.defaultFrcPosition, "", NULL, Spin, N_("Start-position number:") }, + { 0, 0, 0, NULL, (void*) &SetRandom, NULL, NULL, Button, N_("randomize") }, + { 0, 1, 0, NULL, (void*) &SetRandom, NULL, NULL, Button, N_("pick fixed") }, + { 0, 1, 0, NULL, (void*) &ShuffleOK, "", NULL, EndMark , "" } }; void SetRandom(int n)