diff --git a/TeXmacs/progs/table/table-menu.scm b/TeXmacs/progs/table/table-menu.scm index fea8df86c0..bd8dfae170 100644 --- a/TeXmacs/progs/table/table-menu.scm +++ b/TeXmacs/progs/table/table-menu.scm @@ -668,3 +668,18 @@ ((balloon (icon "tm_cell_join.xpm") "Join selected cells") (cell-set-span-selection))))) +(tm-menu (focus-toggle-icons t) + (:require (table-markup-context? t)) + (push-focus t + (assuming (numbered-context? t) + ((check (balloon (icon "tm_numbered.xpm") "Toggle cell alignment") "v" + (pull-focus t + (numbered-numbered? t))) + (pull-focus t (numbered-toggle t)))))) + (tm-define (alternate-first-icon t) + (:require (table-markup-context? t)) + "tm_cell_left.xpm") + +(tm-define (alternate-second-icon t) + (:require (table-markup-context? t)) + "tm_cell_center.xpm") \ No newline at end of file diff --git a/devel/222_51.md b/devel/222_51.md index 774fcbf5d0..6834ae12d8 100644 --- a/devel/222_51.md +++ b/devel/222_51.md @@ -1,19 +1,17 @@ -# 222_51 Translate 'Text for Note' into chinese +# [222_51] Fix misleading tooltip in tabular context -### What -Translates the option `Text for note` found at `Insert -> Link -> Text for note` +## What +The tooltip "Toggle numbering" was misleading in tabular context. -### Why -The option is in plain english and needs to be translated into chinese. +## Why +The button actually toggles cell alignment (tabular vs tabular*), not numbering. -### How -In `TeXmacs/plugins/lang/dic/en_US/zh_CN.scm` added the translation: - -```diff -+ ("Text for note" "用于笔记的文本") -``` +## How +Added a table-specific override in table-menu.scm using (:require (table-markup-context? t)) ## How to test -1. Open Mogan and click on `插入` or `Insert` -2. Go to `链接` or `Link` -3. In the options, `Text for note` has been translated into `用于笔记的文本` \ No newline at end of file +1. Open Mogan +2. Insert a table: Insert + Table + Plain tabular +3. Click inside the table +4. Check the focus toolbar – the tooltip should now say "Toggle cell alignment" instead of "Toggle numbering" +