Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces
- From
mark <mlevedahl@gmail.com>
- Date
- Aug 7, 2026, 14:37 UTC
- Message-ID
- <f25e5fe8-cf6a-4d87-9c46-bf5b7490434d@gmail.com>
- In-Reply-To
- <1e1bcfaf5bbe66fac364d5b7d3a7ebdc5f37531c.1785998419.git.gitgitgadget@gmail.com>
On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:
Show 27 quoted lines
> 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 9e735d91bf..454f54dca8 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"] \Show 14 quoted lines
> @@ -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_colorsThis with the prior patch should help translation due to use of more common idioms and complete phrases rather than jargon. Good.