[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: comments/string changes and issues with dpkg's messages

On Wed, Aug 03, 2005 at 09:33:18AM +0300, Eddy Petrisor wrote:
> On 8/3/05, Denis Barbier <barbier@linuxfr.org> wrote:
> > On Tue, Jul 26, 2005 at 05:10:38PM +0300, Eddy Petrisor wrote:
> > [...]
> > > 3) in some cases the messages are so cryptical that rephrasing them would be a
> > > much better solution than adding automatic comments:
> > >
> > > message:
> > > "unable to open tmpfile for vsnprintf"
> > Most of these ohshite() messages are indeed very cryptic, and could IMO
> > be removed from PO file because they are debug messages which are not
> > intended for end users.
> But what happens if a user has problems and encounters such a message?
> Suppose (for this particular case) that /tmp is for some reason on a
> RO media.
> A localized message might indicate to the user that he should do
> something about this issue, but an English one could be helpless.
> What do you think? Am I missing something?

In this particular case, nothing happens since these messages appear
in lib/compat.c which is used for compatibility with obscure OSes ;)
Translators waste their time on these messages, especially since
they appear at the beginning of PO files, whereas they will almost
never be displayed to end users.

More seriously, I disagree with your reasoning, this message is mostly
intended to dpkg developers, since it mentions the function name in
which it appears.  The same message could be written as
  ohshite(_("%s: unable to open tmpfile"), "vsnprintf");
so that this message may be reused by other functions.
But a closer look at ohshite() definition shows that strerror(errno)
is already appended to the error message, hence there is already a
localized error message and
is IMO sufficient.
Of course, one can use localized messages in ohshite calls when adding
useful context information, but this seems to be hardly the case, most
messages only paraphrase strerror(errno).

A quick test on dpkg-1.13.10 by running
  perl -pi -e 's/ohshite\(_\((".*?")\)/ohshite($1/g' */*.? dselect/*
shows that removing _() in ohshite calls removes 273 messages (on a
total number of 999 messages), and I for one won't miss them ;)
If you are willing to make these changes, please follow Christian's
advice, it would be sad if your hard work could not be incorporated
because it is based on outdated files.


Reply to: