[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display bug in Analyse, Clear Analysis, Move
From: |
Guido Flohr |
Subject: |
Re: Display bug in Analyse, Clear Analysis, Move |
Date: |
Tue, 13 Feb 2024 11:45:42 +0000 |
Hi,
it looks like the `_()` Gtk2 macro does some magic under the hood to
automatically extract a message context separated by a pipe symbol. I wasn’t
aware of that.
> Index: gtkgame.c
> ===================================================================
> RCS file: /sources/gnubg/gnubg/gtkgame.c,v
> retrieving revision 1.1012
> diff -u -r1.1012 gtkgame.c
> --- gtkgame.c 30 Dec 2023 20:36:15 -0000 1.1012
> +++ gtkgame.c 12 Feb 2024 16:26:51 -0000
> @@ -4025,7 +4025,7 @@
> CMD_ACTION_CALLBACK_FROMID(CMD_ANALYSE_MATCH) },
>
> { "ClearAnalysisMenuAction", NULL, N_("Clear analysis"), NULL, NULL,
> G_CALLBACK(NULL) },
> - { "ClearAnalysisMoveAction", GTK_STOCK_CLEAR, N_("noun|Move"), NULL,
> NULL,
> + { "ClearAnalysisMoveAction", GTK_STOCK_CLEAR, N_("Move"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_ANALYSE_CLEAR_MOVE) },
> { "ClearAnalysisGameAction", GTK_STOCK_CLEAR, N_("_Game"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_ANALYSE_CLEAR_GAME) },
> @@ -4036,7 +4036,7 @@
> { "CMarkCubeMenuAction", NULL, N_("Cube"), NULL, NULL, G_CALLBACK(NULL) },
> { "CMarkCubeClearAction", NULL, N_("Clear"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_CMARK_CUBE_CLEAR) },
> { "CMarkCubeShowAction", NULL, N_("Show"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_CMARK_CUBE_SHOW) },
> - { "CMarkMoveMenuAction", NULL, N_("noun|Move"), NULL, NULL,
> G_CALLBACK(NULL) },
> + { "CMarkMoveMenuAction", NULL, N_("Move"), NULL, NULL, G_CALLBACK(NULL)
> },
> { "CMarkMoveClearAction", NULL, N_("Clear"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_CMARK_MOVE_CLEAR) },
> { "CMarkMoveShowAction", NULL, N_("Show"), NULL, NULL,
> CMD_ACTION_CALLBACK_FROMID(CMD_CMARK_MOVE_SHOW) },
> { "CMarkGameMenuAction", NULL, N_("Game"), NULL, NULL, G_CALLBACK(NULL) },
This structure is passed to `gtk_action_group_add_actions()` and the
pipe-separated message context apparently doesn’t work here. So the patch is
valid.
But in all other cases, where ”noun|Move” was used that syntax seems to work
and I wouldn’t patch those locations. Although, I couldn’t find all of the
strings in the GUI so I might be wrong.
Cheers,
Guido
- Display bug in Analyse, Clear Analysis, Move, Ian Shaw, 2024/02/12
- Re: Display bug in Analyse, Clear Analysis, Move, TAKAHASHI Kaoru, 2024/02/12
- Message not available
- Re: Display bug in Analyse, Clear Analysis, Move,
Guido Flohr <=
- Re: Display bug in Analyse, Clear Analysis, Move, Philippe Michel, 2024/02/13
- Message not available
- Re: Display bug in Analyse, Clear Analysis, Move, Guido Flohr, 2024/02/13
- Message not available
- Re: Display bug in Analyse, Clear Analysis, Move, Guido Flohr, 2024/02/13
- Re: Display bug in Analyse, Clear Analysis, Move, TAKAHASHI Kaoru, 2024/02/20