Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id ACA61B5DBC0 for ; Fri, 17 Jun 2011 06:11:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 88288-02 for ; Fri, 17 Jun 2011 09:11:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kepler.df7cb.de (kepler.df7cb.de [178.63.218.14]) by mail.postgresql.org (Postfix) with ESMTP id 6A885B5D801 for ; Fri, 17 Jun 2011 06:11:16 -0300 (ADT) Received: from benz.df7cb.de (benz.df7cb.de [IPv6:2001:6f8:10ee:e:134::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "benz.df7cb.de", Issuer "df7cb.de CA" (verified OK)) by kepler.df7cb.de (Postfix) with ESMTPS id 220931019B1 for ; Fri, 17 Jun 2011 11:11:15 +0200 (CEST) Received: by benz.df7cb.de (Postfix, from userid 2062) id 972F76F083; Fri, 17 Jun 2011 11:11:14 +0200 (CEST) Date: Fri, 17 Jun 2011 11:11:14 +0200 From: Christoph Berg To: pgsql-bugs@postgresql.org Subject: Re: BUG #6066: Bad string in German translation causes segfault (user-triggerable) Message-ID: <20110617091114.GC4130@msgid.df7cb.de> References: <201106170818.p5H8I3ko064877@wwwmaster.postgresql.org> <4DFB137E.4040404@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DFB137E.4040404@enterprisedb.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/141 X-Sequence-Number: 30520 Re: Heikki Linnakangas 2011-06-17 <4DFB137E.4040404@enterprisedb.com> > So, this is a case where the untranslated string doesn't have a %s > in it, but the translated one does. We should have a way to check > those automatically. In fact, I'm surprised if someone somewhere > hasn't already written such a script, as gettext is used very > widely. Anyone want to research/write a script? Actually, msgfmt can do that itself with -c. This can be set in Makefile.global: $ grep MSGFMT src/Makefile.global MSGFMT = msgfmt -c Unfortunately that doesn't help in this case, as the bad string isn't tagged as "#, c-format", but still gets used as such. This seems to be the case for many errhint() strings. Maybe xgettext should be taught to treat all errhint() et al arguments as c-strings. Christoph -- cb@df7cb.de | http://www.df7cb.de/