From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20785 invoked by alias); 18 Oct 2006 19:47:46 -0000 Received: (qmail 20775 invoked by uid 22791); 18 Oct 2006 19:47:45 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Oct 2006 19:47:39 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-233-8.inter.net.il [83.130.233.8]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EYK74919 (AUTH halo1); Wed, 18 Oct 2006 21:47:35 +0200 (IST) Date: Wed, 18 Oct 2006 19:47:00 -0000 Message-Id: From: Eli Zaretskii To: Andrew STUBBS CC: gdb-patches@sourceware.org In-reply-to: <4536444C.9020709@st.com> (message from Andrew STUBBS on Wed, 18 Oct 2006 16:12:12 +0100) Subject: Re: [PATCH] Don't give spurious warnings when using thread specific breakpoints Reply-to: Eli Zaretskii References: <452CF534.4060209@st.com> <20061011135545.GA26060@nevyn.them.org> <452D0385.6010103@st.com> <20061011204525.GA9622@nevyn.them.org> <45361793.1020202@st.com> <20061018141419.GA7771@nevyn.them.org> <4536444C.9020709@st.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00230.txt.bz2 > Date: Wed, 18 Oct 2006 16:12:12 +0100 > From: Andrew STUBBS > > 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.