[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#320174: gettext: msgfmt --statistics should output the filename
From: |
Bruno Haible |
Subject: |
Re: Bug#320174: gettext: msgfmt --statistics should output the filename (fwd) |
Date: |
Thu, 28 Jul 2005 13:45:49 +0200 |
User-agent: |
KMail/1.5 |
Vincent Lefevre wrote:
> "msgfmt --statistics fr.po" outputs a line like:
>
> 922 translated messages, 53 fuzzy translations, 47 untranslated messages.
>
> But there is no information about the filename. It should display
> something like:
>
> fr.po: 922 translated, 53 fuzzy, 47 untranslated.
> ^^^^^
This would make the output in Emacs PO mode (where the file name is
usually a long pathname) harder to understand.
Also, msgfmt is often used manually by a translator, and the translator
is mostly interested in the 3 numbers; everything else dilutes her
attention.
I agree that it would be welcome to have this in po/Makefile.in.in,
however we have a problem here since we cannot use "echo -n" portably.
> This is useful when doing "make -j2 update-po" from Mutt, for instance
> (all the .po files are updated and statistics are output). Due to the
> -j option, the output of make and msgfmt are not synchronized, e.g.:
>
> make[1]: Entering directory `/home/vlefevre/software/mutt/mutt/po'
> file=./`echo de | sed 's,.*/,,'`.gmo \
> && rm -f $file && /usr/bin/msgfmt --statistics -o $file de.po
> file=./`echo ru | sed 's,.*/,,'`.gmo \
> && rm -f $file && /usr/bin/msgfmt --statistics -o $file ru.po
> 913 translated messages, 59 fuzzy translations, 50 untranslated messages.
> file=./`echo it | sed 's,.*/,,'`.gmo \
> && rm -f $file && /usr/bin/msgfmt --statistics -o $file it.po
> 913 translated messages, 57 fuzzy translations, 52 untranslated messages.
> [...]
> file=./`echo ca | sed 's,.*/,,'`.gmo \
> && rm -f $file && /usr/bin/msgfmt --statistics -o $file ca.po
> 859 translated messages, 88 fuzzy translations, 75 untranslated messages.
> file=./`echo bg | sed 's,.*/,,'`.gmo \
> && rm -f $file && /usr/bin/msgfmt --statistics -o $file bg.po
> 908 translated messages, 62 fuzzy translations, 52 untranslated messages.
> 880 translated messages, 82 fuzzy translations, 60 untranslated messages.
> make[1]: Leaving directory `/home/vlefevre/software/mutt/mutt/po'
>
> So, without the filename, it may be difficult to know for which
> language the statistics apply.
This is inherent in the use of make's "-j" option. When you use
"make -j" you could as well pipe stdout and stderr to /dev/null, because
the only reproducible effects of "make -j" are 1. the side effects on
disk, 2. the exit status of the command. You can simply not expect to
understand "make -j" output.
Bruno