Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't give spurious warnings when using thread specific breakpoints
Date: Wed, 18 Oct 2006 19:47:00 -0000	[thread overview]
Message-ID: <uk62xquck.fsf@gnu.org> (raw)
In-Reply-To: <4536444C.9020709@st.com> (message from Andrew STUBBS on Wed, 18 	Oct 2006 16:12:12 +0100)

> Date: Wed, 18 Oct 2006 16:12:12 +0100
> From: Andrew STUBBS <andrew.stubbs@st.com>
> 
> Daniel Jacobowitz wrote:
> > There's no useful translation for " and".  If you can't group the
> > translatable bits into whole messages, you're pretty much stuck.
> > Maybe Eli will have a suggestion on how to properly mark up this.
> 
> Do not most languages have a translation for these examples? Certainly 
> many languages are happy with " and" (" et", " und" ...) and the other 
> bits, "(permanent)", "(disabled)", "(all threads)" and "(thread %d)", 
> are self contained and seem readily translatable to me.

That's because you are thinking English ;-)

Imagine a language where adjectives like "permanent" and "disabled"
need special forms depending on whether the related noun is masculine,
feminine, or plural.  (Most languages are like that.)  How would Joe
Random Translator into such a language know what to do with a string
in the message catalog gdb.pot that says just "(disabled)"?  The only
way to translate this is to read the source that uses this message,
understand what it does and then figure out how to say that in my
language.  However, most translators aren't programmers, and don't
know C.

> If a specific language can't do something useful with it they can just 
> leave it as " and" they've lost nothing.

Aha, and now imagine that you've been handed a program that generally
displays English messages, but sometimes says "and" in Chinese, say.
Would you be very happy?  Please note that this is not a preposterous
example: many people in many countries _really_ don't know English
very well, even though they are programmers.

> I take your general point though, it's better to translate whole 
> sentences. We could fix the 'and' problem like this:
> 
> "Note: Breakpoint %s is also set at pc"
> "Note: Breakpoints %s and %s are also set at pc"

Yes, that's how this should be done.

> Of course that would require collecting the strings into a buffer of 
> some kind with all the attendant jiggery pokery that that requires.

No, you don't need to do that.  Instead, you should rewrite the code
like this:

   ALL_BREAKPOINTS (b)
     if (b->loc->address == pc)	/* address match / overlay match */
	if (!b->pending && (!overlay_debugging || b->loc->section == section))
	  {
	    others--;
	    if (others == 1 &&
	       (b->enable_state == bp_disabled || 
	        b->enable_state == bp_shlib_disabled || 
	        b->enable_state == bp_call_disabled))
	       printf_filtered (_("Note: breakpoint %d (disabled) also set at pc "),
		     b->number);
	  }
     deprecated_print_address_numeric (pc, 1, gdb_stdout);
     printf_filtered (".\n");

and similarly for the other combinations of the inline conditionals.


  reply	other threads:[~2006-10-18 19:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 13:44 Andrew STUBBS
2006-10-11 13:55 ` Daniel Jacobowitz
2006-10-11 14:46   ` Andrew STUBBS
2006-10-11 20:45     ` Daniel Jacobowitz
2006-10-11 22:12       ` Mark Kettenis
2006-10-11 22:14       ` Joel Brobecker
2006-10-18 12:01       ` Andrew STUBBS
2006-10-18 14:14         ` Daniel Jacobowitz
2006-10-18 15:12           ` Andrew STUBBS
2006-10-18 19:47             ` Eli Zaretskii [this message]
2006-10-18 20:21               ` Andreas Schwab
2006-10-19  4:17                 ` Eli Zaretskii
2006-10-19  9:47               ` Andrew STUBBS
2006-10-20  6:10                 ` Eli Zaretskii
2006-10-20 14:29                   ` Daniel Jacobowitz
2006-10-20 17:42                     ` Eli Zaretskii
2006-10-20 17:47                       ` Daniel Jacobowitz
2006-10-20 18:03                         ` Eli Zaretskii
2006-10-20 18:07                           ` Daniel Jacobowitz
2006-10-20 18:11                             ` Eli Zaretskii
2006-10-19 13:28             ` Daniel Jacobowitz
2006-10-19 15:59               ` Andrew STUBBS
2006-10-18 19:22           ` Eli Zaretskii
2006-10-11 22:06   ` Mark Kettenis
2006-10-12 10:45     ` Andrew STUBBS

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=uk62xquck.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb-patches@sourceware.org \
    /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