From: H.G. Muller Date: Fri, 26 Nov 2010 09:48:54 +0000 (+0100) Subject: Bugfix XBoard menu translation X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6cd4f34939954bac0c17c4aae88c4f7287f600d8;p=xboard.git Bugfix XBoard menu translation The gettext macro N_() was applied to the menu definition tables, but this would break any translation, as these items are both used as menu texts as well as reference for enabling and checkmarking. The routines that create the menus already apply _() dynamically to these items when they are used as menu texts. --- diff --git a/xboard.c b/xboard.c index c9defc5..ca4e212 100644 --- a/xboard.c +++ b/xboard.c @@ -590,176 +590,176 @@ static Pixmap xpmMask[BlackKing + 1]; SizeDefaults sizeDefaults[] = SIZE_DEFAULTS; MenuItem fileMenu[] = { - {N_("New Game"), ResetProc}, - {N_("New Shuffle Game ..."), ShuffleMenuProc}, - {N_("New Variant ..."), NewVariantProc}, // [HGM] variant: not functional yet + {"New Game", ResetProc}, + {"New Shuffle Game ...", ShuffleMenuProc}, + {"New Variant ...", NewVariantProc}, // [HGM] variant: not functional yet {"----", NothingProc}, - {N_("Load Game"), LoadGameProc}, - {N_("Load Position"), LoadPositionProc}, -// {N_("Load Next Game"), LoadNextGameProc}, -// {N_("Load Previous Game"), LoadPrevGameProc}, -// {N_("Reload Same Game"), ReloadGameProc}, + {"Load Game", LoadGameProc}, + {"Load Position", LoadPositionProc}, +// {"Load Next Game", LoadNextGameProc}, +// {"Load Previous Game", LoadPrevGameProc}, +// {"Reload Same Game", ReloadGameProc}, {"----", NothingProc}, -// {N_("Load Next Position"), LoadNextPositionProc}, -// {N_("Load Previous Position"), LoadPrevPositionProc}, -// {N_("Reload Same Position"), ReloadPositionProc}, - {N_("Save Game"), SaveGameProc}, - {N_("Save Position"), SavePositionProc}, +// {"Load Next Position", LoadNextPositionProc}, +// {"Load Previous Position", LoadPrevPositionProc}, +// {"Reload Same Position", ReloadPositionProc}, + {"Save Game", SaveGameProc}, + {"Save Position", SavePositionProc}, {"----", NothingProc}, - {N_("Mail Move"), MailMoveProc}, - {N_("Reload CMail Message"), ReloadCmailMsgProc}, + {"Mail Move", MailMoveProc}, + {"Reload CMail Message", ReloadCmailMsgProc}, {"----", NothingProc}, - {N_("Exit"), QuitProc}, + {"Exit", QuitProc}, {NULL, NULL} }; MenuItem editMenu[] = { - {N_("Copy Game"), CopyGameProc}, - {N_("Copy Position"), CopyPositionProc}, + {"Copy Game", CopyGameProc}, + {"Copy Position", CopyPositionProc}, {"----", NothingProc}, - {N_("Paste Game"), PasteGameProc}, - {N_("Paste Position"), PastePositionProc}, + {"Paste Game", PasteGameProc}, + {"Paste Position", PastePositionProc}, {"----", NothingProc}, - {N_("Edit Game"), EditGameProc}, - {N_("Edit Position"), EditPositionProc}, + {"Edit Game", EditGameProc}, + {"Edit Position", EditPositionProc}, {"----", NothingProc}, - {N_("Edit Tags"), EditTagsProc}, - {N_("Edit Comment"), EditCommentProc}, + {"Edit Tags", EditTagsProc}, + {"Edit Comment", EditCommentProc}, {"----", NothingProc}, - {N_("Revert"), RevertProc}, - {N_("Annotate"), AnnotateProc}, - {N_("Truncate Game"), TruncateGameProc}, + {"Revert", RevertProc}, + {"Annotate", AnnotateProc}, + {"Truncate Game", TruncateGameProc}, {"----", NothingProc}, - {N_("Backward"), BackwardProc}, - {N_("Forward"), ForwardProc}, - {N_("Back to Start"), ToStartProc}, - {N_("Forward to End"), ToEndProc}, + {"Backward", BackwardProc}, + {"Forward", ForwardProc}, + {"Back to Start", ToStartProc}, + {"Forward to End", ToEndProc}, {NULL, NULL} }; MenuItem viewMenu[] = { - {N_("Flip View"), FlipViewProc}, + {"Flip View", FlipViewProc}, {"----", NothingProc}, - {N_("Show Engine Output"), EngineOutputProc}, - {N_("Show Evaluation Graph"), EvalGraphProc}, - {N_("Show Game List"), ShowGameListProc}, - {N_("Show Move History"), HistoryShowProc}, // [HGM] hist: activate 4.2.7 code + {"Show Engine Output", EngineOutputProc}, + {"Show Evaluation Graph", EvalGraphProc}, + {"Show Game List", ShowGameListProc}, + {"Show Move History", HistoryShowProc}, // [HGM] hist: activate 4.2.7 code {"----", NothingProc}, - {N_("Show Tags"), EditTagsProc}, - {N_("Show Comments"), EditCommentProc}, - {N_("ICS Input Box"), IcsInputBoxProc}, + {"Show Tags", EditTagsProc}, + {"Show Comments", EditCommentProc}, + {"ICS Input Box", IcsInputBoxProc}, {NULL, NULL} }; MenuItem modeMenu[] = { - {N_("Machine White"), MachineWhiteProc}, - {N_("Machine Black"), MachineBlackProc}, - {N_("Two Machines"), TwoMachinesProc}, - {N_("Analysis Mode"), AnalyzeModeProc}, - {N_("Analyze File"), AnalyzeFileProc }, - {N_("Edit Game"), EditGameProc}, - {N_("Edit Position"), EditPositionProc}, - {N_("Training"), TrainingProc}, - {N_("ICS Client"), IcsClientProc}, + {"Machine White", MachineWhiteProc}, + {"Machine Black", MachineBlackProc}, + {"Two Machines", TwoMachinesProc}, + {"Analysis Mode", AnalyzeModeProc}, + {"Analyze File", AnalyzeFileProc }, + {"Edit Game", EditGameProc}, + {"Edit Position", EditPositionProc}, + {"Training", TrainingProc}, + {"ICS Client", IcsClientProc}, {"----", NothingProc}, - {N_("Pause"), PauseProc}, + {"Pause", PauseProc}, {NULL, NULL} }; MenuItem actionMenu[] = { - {N_("Accept"), AcceptProc}, - {N_("Decline"), DeclineProc}, - {N_("Rematch"), RematchProc}, + {"Accept", AcceptProc}, + {"Decline", DeclineProc}, + {"Rematch", RematchProc}, {"----", NothingProc}, - {N_("Call Flag"), CallFlagProc}, - {N_("Draw"), DrawProc}, - {N_("Adjourn"), AdjournProc}, - {N_("Abort"), AbortProc}, - {N_("Resign"), ResignProc}, + {"Call Flag", CallFlagProc}, + {"Draw", DrawProc}, + {"Adjourn", AdjournProc}, + {"Abort", AbortProc}, + {"Resign", ResignProc}, {"----", NothingProc}, - {N_("Stop Observing"), StopObservingProc}, - {N_("Stop Examining"), StopExaminingProc}, - {N_("Upload to Examine"), UploadProc}, + {"Stop Observing", StopObservingProc}, + {"Stop Examining", StopExaminingProc}, + {"Upload to Examine", UploadProc}, {"----", NothingProc}, - {N_("Adjudicate to White"), AdjuWhiteProc}, - {N_("Adjudicate to Black"), AdjuBlackProc}, - {N_("Adjudicate Draw"), AdjuDrawProc}, + {"Adjudicate to White", AdjuWhiteProc}, + {"Adjudicate to Black", AdjuBlackProc}, + {"Adjudicate Draw", AdjuDrawProc}, {NULL, NULL} }; MenuItem engineMenu[] = { - {N_("Engine #1 Settings"), FirstSettingsProc}, - {N_("Engine #2 Settings"), SecondSettingsProc}, + {"Engine #1 Settings", FirstSettingsProc}, + {"Engine #2 Settings", SecondSettingsProc}, {"----", NothingProc}, - {N_("Move Now"), MoveNowProc}, - {N_("Retract Move"), RetractMoveProc}, + {"Move Now", MoveNowProc}, + {"Retract Move", RetractMoveProc}, {NULL, NULL} }; MenuItem optionsMenu[] = { - {N_("Time Control ..."), TimeControlProc}, - {N_("Common Engine ..."), UciMenuProc}, - {N_("Adjudications ..."), EngineMenuProc}, - {N_("Game List ..."), GameListOptionsPopUp}, + {"Time Control ...", TimeControlProc}, + {"Common Engine ...", UciMenuProc}, + {"Adjudications ...", EngineMenuProc}, + {"Game List ...", GameListOptionsPopUp}, {"----", NothingProc}, - {N_("Always Queen"), AlwaysQueenProc}, - {N_("Animate Dragging"), AnimateDraggingProc}, - {N_("Animate Moving"), AnimateMovingProc}, - {N_("Auto Comment"), AutocommProc}, - {N_("Auto Flag"), AutoflagProc}, - {N_("Auto Flip View"), AutoflipProc}, - {N_("Auto Observe"), AutobsProc}, - {N_("Auto Raise Board"), AutoraiseProc}, - {N_("Auto Save"), AutosaveProc}, - {N_("Blindfold"), BlindfoldProc}, - {N_("Flash Moves"), FlashMovesProc}, - {N_("Get Move List"), GetMoveListProc}, + {"Always Queen", AlwaysQueenProc}, + {"Animate Dragging", AnimateDraggingProc}, + {"Animate Moving", AnimateMovingProc}, + {"Auto Comment", AutocommProc}, + {"Auto Flag", AutoflagProc}, + {"Auto Flip View", AutoflipProc}, + {"Auto Observe", AutobsProc}, + {"Auto Raise Board", AutoraiseProc}, + {"Auto Save", AutosaveProc}, + {"Blindfold", BlindfoldProc}, + {"Flash Moves", FlashMovesProc}, + {"Get Move List", GetMoveListProc}, #if HIGHDRAG - {N_("Highlight Dragging"), HighlightDraggingProc}, + {"Highlight Dragging", HighlightDraggingProc}, #endif - {N_("Highlight Last Move"), HighlightLastMoveProc}, - {N_("Move Sound"), MoveSoundProc}, - {N_("ICS Alarm"), IcsAlarmProc}, - {N_("Old Save Style"), OldSaveStyleProc}, - {N_("Periodic Updates"), PeriodicUpdatesProc}, - {N_("Ponder Next Move"), PonderNextMoveProc}, - {N_("Popup Exit Message"), PopupExitMessageProc}, - {N_("Popup Move Errors"), PopupMoveErrorsProc}, - {N_("Premove"), PremoveProc}, - {N_("Quiet Play"), QuietPlayProc}, - {N_("Show Coords"), ShowCoordsProc}, - {N_("Hide Thinking"), HideThinkingProc}, - {N_("Test Legality"), TestLegalityProc}, + {"Highlight Last Move", HighlightLastMoveProc}, + {"Move Sound", MoveSoundProc}, + {"ICS Alarm", IcsAlarmProc}, + {"Old Save Style", OldSaveStyleProc}, + {"Periodic Updates", PeriodicUpdatesProc}, + {"Ponder Next Move", PonderNextMoveProc}, + {"Popup Exit Message", PopupExitMessageProc}, + {"Popup Move Errors", PopupMoveErrorsProc}, + {"Premove", PremoveProc}, + {"Quiet Play", QuietPlayProc}, + {"Show Coords", ShowCoordsProc}, + {"Hide Thinking", HideThinkingProc}, + {"Test Legality", TestLegalityProc}, {"----", NothingProc}, - {N_("Save Settings Now"), SaveSettingsProc}, - {N_("Save Settings on Exit"), SaveOnExitProc}, + {"Save Settings Now", SaveSettingsProc}, + {"Save Settings on Exit", SaveOnExitProc}, {NULL, NULL} }; MenuItem helpMenu[] = { - {N_("Info XBoard"), InfoProc}, - {N_("Man XBoard"), ManProc}, + {"Info XBoard", InfoProc}, + {"Man XBoard", ManProc}, {"----", NothingProc}, - {N_("Hint"), HintProc}, - {N_("Book"), BookProc}, + {"Hint", HintProc}, + {"Book", BookProc}, {"----", NothingProc}, - {N_("About XBoard"), AboutProc}, + {"About XBoard", AboutProc}, {NULL, NULL} }; Menu menuBar[] = { - {N_("File"), fileMenu}, - {N_("Edit"), editMenu}, - {N_("View"), viewMenu}, - {N_("Mode"), modeMenu}, - {N_("Action"), actionMenu}, - {N_("Engine"), engineMenu}, - {N_("Options"), optionsMenu}, - {N_("Help"), helpMenu}, + {"File", fileMenu}, + {"Edit", editMenu}, + {"View", viewMenu}, + {"Mode", modeMenu}, + {"Action", actionMenu}, + {"Engine", engineMenu}, + {"Options", optionsMenu}, + {"Help", helpMenu}, {NULL, NULL} }; -#define PAUSE_BUTTON N_("P") +#define PAUSE_BUTTON "P" MenuItem buttonBar[] = { {"<<", ToStartProc}, {"<", BackwardProc},