public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Bruno Larsen <blarsen@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] [gdb/tui] Factor out border-mode help text
Date: Wed, 24 May 2023 11:56:54 +0200	[thread overview]
Message-ID: <698792bd-4206-f87f-af23-6b784d6e1404@redhat.com> (raw)
In-Reply-To: <f489183f-2cbc-f437-4d2c-98a42e74f09e@suse.de>

On 22/05/2023 11:09, Tom de Vries via Gdb-patches wrote:
> On 5/21/23 21:59, Tom de Vries via Gdb-patches wrote:
>> I noticed that the help texts for tui border-mode and tui 
>> active-border-mode
>> are similar.
>>
>> Factor out the common part into macro HELP_ATTRIBUTE_MODE.
>>
>
> This is a v2, which uses c++ std::string instead of a macro.
>
> OTOH, it changes the translation boundaries, and I'm not sure if the 
> new parts still classify as "entire sentence".
>
> Then again, I was not able to find any files containing translations 
> for gdb, so perhaps it doesn't matter.
>
 > +  const std::string help_tui_border_mode
 > +    = (std::string ("\
 > +This variable controls the attributes to use for the window borders:\n")
 > +       + help_attribute_mode);

I think there is no need to explicitly call the std::string constructor 
here (at least compiling with gcc you don't). You could have it as:

  +  const std::string help_tui_border_mode
  +    = ("This variable controls the attributes to use for the window 
borders:\n"
  +       + help_attribute_mode);

Which makes it a bit clearer in my opinion.

Other than that (or if my suggestion isn't really feasible on all 
compilers/systems), looks ok to me:

Reviewed-By: Bruno Larsen <blarsen@redhat.com>

-- 
Cheers,
Bruno

> Thanks,
> - Tom


  reply	other threads:[~2023-05-24  9:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-21 19:59 Tom de Vries
2023-05-22  9:09 ` Tom de Vries
2023-05-24  9:56   ` Bruno Larsen [this message]
2023-06-07 13:12   ` Tom de Vries
2023-06-09 13:39   ` Tom Tromey
2023-06-09 15:12     ` Tom de Vries

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=698792bd-4206-f87f-af23-6b784d6e1404@redhat.com \
    --to=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).