* bad news about add_setshow_cmd
@ 2002-06-26 14:45 Tom Tromey
2002-06-26 19:25 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2002-06-26 14:45 UTC (permalink / raw)
To: Gdb List
Today while testing my jumbo add_setshow_cmd patch, I finally came
across this code in do_setshow_command:
/* Print doc minus "show" at start. */
print_doc_line (gdb_stdout, c->doc + 5);
This isn't i18n-friendly. Really fixing it requires yet another
global change to add_setshow_cmd :-(. Also it seems like it will
require adding a new field to the command structure to hold the
translated text.
Or, we could replace the customized text with something generic. This
is less friendly though.
Does anybody know of other lurking problems before I go ahead and make
this change? My current plan is to go ahead and add the new field and
new doc strings everywhere. Any other ideas or preferences?
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: bad news about add_setshow_cmd
2002-06-26 14:45 bad news about add_setshow_cmd Tom Tromey
@ 2002-06-26 19:25 ` Andrew Cagney
2002-06-27 8:56 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-06-26 19:25 UTC (permalink / raw)
To: tromey; +Cc: Gdb List
> Today while testing my jumbo add_setshow_cmd patch, I finally came
> across this code in do_setshow_command:
>
> /* Print doc minus "show" at start. */
> print_doc_line (gdb_stdout, c->doc + 5);
Ulgh.
> This isn't i18n-friendly. Really fixing it requires yet another
> global change to add_setshow_cmd :-(. Also it seems like it will
> require adding a new field to the command structure to hold the
> translated text.
>
> Or, we could replace the customized text with something generic. This
> is less friendly though.
>
> Does anybody know of other lurking problems before I go ahead and make
> this change? My current plan is to go ahead and add the new field and
> new doc strings everywhere. Any other ideas or preferences?
Sorry, you've lost me. Which new doc string? A third string for
showing the value?
--
BTW, grep -e '->doc', arrhg! add_dump_command() for instance?
[I think we're going to end up with GDB 6.0 due to internationalization
and not multi-arch - we're going to need an excuse for changing all the
output messages :-)]
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bad news about add_setshow_cmd
2002-06-26 19:25 ` Andrew Cagney
@ 2002-06-27 8:56 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2002-06-27 8:56 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Gdb List
>>>>> "Andrew" == Andrew Cagney <ac131313@ges.redhat.com> writes:
>> My current plan is to go ahead and add the new field and new doc
>> strings everywhere. Any other ideas or preferences?
Andrew> Sorry, you've lost me. Which new doc string? A third string
Andrew> for showing the value?
Yes. Something like:
N_("Argument list to give program being debugged when it is started is \"%s\")
This will let us preserve the same output we have now.
It will be a bit ugly in implementation (if we want to use the rule
"one %s in any string" we'll need to pre-format ints and the like).
Andrew> BTW, grep -e '->doc', arrhg! add_dump_command() for instance?
Oh, man. Nobody understood i18n in 1988. But it still sucks to do
multiple passes over all the code.
Thanks for finding this. If you (or anybody) knows of other problems
like this, feel free to drop me a line.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-27 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-26 14:45 bad news about add_setshow_cmd Tom Tromey
2002-06-26 19:25 ` Andrew Cagney
2002-06-27 8:56 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox