Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1116176

Summary: RFE: [zanata-client] client should use color output
Product: [Retired] Zanata Reporter: Patrick Huang <pahuang>
Component: Component-zanata-clientAssignee: Michelle Kim <mkim>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 3.4CC: dchen, zanata-bugs
Target Milestone: ---Keywords: screened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-31 01:50:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1124615    

Description Patrick Huang 2014-07-04 01:21:33 UTC
Description of problem:
Zanata client is a command line tool and use console. It should color its output so that important information is easier to catch attention.

Comment 1 Patrick Huang 2014-07-04 01:33:13 UTC
http://jansi.fusesource.org/index.html can be used.
Current impediments:
- unpredictable client console's background color thus hard to pick a foreground color that is contrast enough
- we use resource bundle (ATM only in init command) to store actual messages. The message itself is in printf format which makes it hard to tokenize/color individual parts (i.e. ansi color an argument before passing it to printf may result in exception if the template is %d)
- need to either have all commands done or none. Otherwise will end up with inconsistency.
- some information are passed to user in form of log. Some are in form of console output. May need a way to unify these. NB, log can be turned off.

Comment 2 Patrick Huang 2014-12-01 05:14:32 UTC
Things to consider (quoted from Sean in one of the review comments):
From a scriptability point of view, it is good to output to stdout and stderr, which can be redirected to pipes, grepped, etc.

If this were C, I would suggest using isatty(stdout) to decide whether to use fancy console features or just write to stdout. In Java, it might be better to have a command line option (eg --avoid-console or --plaintext).

Comment 4 Damian Jansen 2015-07-14 00:21:26 UTC
Reassigned to PM

Comment 5 Zanata Migrator 2015-07-31 01:50:33 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-571