Your message dated Sat, 13 Mar 2010 12:05:39 +0100 (CET)
with message-id <[email protected]>
has caused the report #573704,
regarding gettext: msgunfmt colorizes if stdout is terminal, but does not
recognize --color
to be marked as having been forwarded to the upstream software
author(s) [email protected]
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
573704: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573704
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Hello.
Received this from the debian bts:
---------- Forwarded message ----------
From: Kalle Olavi Niemitalo <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Sat, 13 Mar 2010 12:14:40 +0200
Subject: Bug#573704: gettext: msgunfmt colorizes if stdout is terminal,
but does not recognize --color
Package: gettext
Version: 0.17-9
Severity: wishlist
If I run this in gnome-terminal:
% msgunfmt /usr/share/locale/fi/LC_MESSAGES/gnome-session-2.0.mo
then msgunfmt makes msgids purple and msgstrs blue, by adding
escape sequences like "\033[34m" to the output. However, if I
pipe the output to less, like so:
% msgunfmt /usr/share/locale/fi/LC_MESSAGES/gnome-session-2.0.mo |
less -R
then I do not get any colors. Apparently, msgunfmt detects that
stdout is not a terminal. Such detection is all right but there
should be a way to enable colors regardless. In ls and git, this
is done with a --color option, but msgunfmt does not support that:
% LANG=C msgunfmt --color /usr/share/locale/fi/LC_MESSAGES/gnome-session-2.0.mo
msgunfmt: unrecognized option '--color'
Try `msgunfmt --help' for more information.
I can instead get the desired result by filtering the output
through msgcat:
% msgunfmt /usr/share/locale/fi/LC_MESSAGES/gnome-session-2.0.mo |
msgcat --color - |
less -R
but it seems silly that msgunfmt cannot do this on its own, given
that it already supports colorizing the output to a terminal.
[...]
--- End Message ---