From: "Johannes Sixt via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: mark <mlevedahl@gmail.com>, Johannes Sixt <j6t@kdbg.org>,
Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH v2 5/6] gitk: avoid constructing dialog titles from text pieces
Date: Wed, 12 Aug 2026 13:16:20 +0000 [thread overview]
Message-ID: <697159c20e9903dc720d8afdd6535007e61fa095.1786540582.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2194.v2.git.1786540582.gitgitgadget@gmail.com>
From: Johannes Sixt <j6t@kdbg.org>
When the user clicks a color preference, a color selection dialog is
presented whose title is provided in parts by the caller. The dialog
implementation must supply the rest of the title. This is unfriendly
for translations. Provide the full title by the caller. Rewrite the
texts to be more natural language.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
gitk-git/gitk | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index c0ab55845b..d4c229a3c0 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -11836,34 +11836,34 @@ proc prefspage_colors {notebook} {
set coloruielems [list \
bg bgcolor {} \
[mc "Background"] \
- [mc "background"] \
+ [mc "choose background color"] \
fg fgcolor {} \
[mc "Main text"] \
- [mc "foreground"] \
+ [mc "choose main text color"] \
diffold diffcolors 0 \
[mc "Old line text"] \
- [mc "diff old lines"] \
+ [mc "choose text color of old lines"] \
diffoldbg diffbgcolors 0 \
[mc "Old line background"] \
- [mc "diff old lines bg"] \
+ [mc "choose background color of old lines"] \
diffnew diffcolors 1 \
[mc "New line text"] \
- [mc "diff new lines"] \
+ [mc "choose text color of new lines"] \
diffnewbg diffbgcolors 1 \
[mc "New line background"] \
- [mc "diff new lines bg"] \
+ [mc "choose background color of new lines"] \
hunksep diffcolors 2 \
[mc "Hunk header text"] \
- [mc "diff hunk header"] \
+ [mc "choose text color of hunk headers"] \
markbg markbgcolor {} \
[mc "Marked line background"] \
- [mc "marked line background"] \
+ [mc "choose background color of marked lines"] \
selbg selectbgcolor {} \
[mc "Selected text background"] \
- [mc "background"] \
+ [mc "choose background color of selected text"] \
linkfg linkfgcolor {} \
[mc "Link text"] \
- [mc "link"] \
+ [mc "choose color of link text"] \
]
foreach {uielem colorvar idx label title} $coloruielems {
@@ -12014,11 +12014,11 @@ proc choose_themeloader {prefspage} {
}
}
-proc choosecolor {v vi prefspage x} {
+proc choosecolor {v vi prefspage title} {
global $v
set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \
- -title [mc "Gitk: choose color for %s" $x]]
+ -title "Gitk: $title"]
if {$c eq {}} return
lset $v $vi $c
set_gui_colors
--
gitgitgadget
next prev parent reply other threads:[~2026-08-12 13:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 6:40 [PATCH 0/5] gitk: make color preferences visually more pleasing and better usable Johannes Sixt via GitGitGadget
2026-08-06 6:40 ` [PATCH 1/5] gitk: set intitial colors of swatches using the available helper Johannes Sixt via GitGitGadget
2026-08-07 14:36 ` mark
2026-08-06 6:40 ` [PATCH 2/5] gitk: condense repetitive code around color buttons into foreach loops Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark
2026-08-06 6:40 ` [PATCH 3/5] gitk: show color preferences on the button instead of the label Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark
2026-08-08 9:33 ` Johannes Sixt
2026-08-06 6:40 ` [PATCH 4/5] gitk: use more natural language for labels of color preferences Johannes Sixt via GitGitGadget
2026-08-06 6:40 ` [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark
2026-08-08 10:00 ` Johannes Sixt
2026-08-08 14:55 ` Mark Levedahl
2026-08-09 7:27 ` Johannes Sixt
2026-08-08 16:32 ` Junio C Hamano
2026-08-09 7:04 ` Johannes Sixt
2026-08-12 13:16 ` [PATCH v2 0/6] gitk: make color preferences visually more pleasing and better usable Johannes Sixt via GitGitGadget
2026-08-12 13:16 ` [PATCH v2 1/6] gitk: set intitial colors of swatches using the available helper Johannes Sixt via GitGitGadget
2026-08-12 13:16 ` [PATCH v2 2/6] gitk: condense repetitive code around color buttons into foreach loops Johannes Sixt via GitGitGadget
2026-08-12 13:16 ` [PATCH v2 3/6] gitk: show color preferences on the button instead of the label Johannes Sixt via GitGitGadget
2026-08-12 13:16 ` [PATCH v2 4/6] gitk: use more natural language for labels of color preferences Johannes Sixt via GitGitGadget
2026-08-12 13:16 ` Johannes Sixt via GitGitGadget [this message]
2026-08-12 13:16 ` [PATCH v2 6/6] gitk: move UI for generic colors above diff colors Johannes Sixt via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=697159c20e9903dc720d8afdd6535007e61fa095.1786540582.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=mlevedahl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox