Re: Libtaz: extended messages

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


I think the old way maintains backwards compatibility and is simpler + faster.  My vote is to stick with the old one.

Christian

On Thu, May 24, 2012 at 10:08 AM, Aleksej Bobylev <al.bobylev@xxxxxxxxx> wrote:
Last days I see the sources of (relatively) new /lib/libtaz.sh base library.
Even I added function unboldify() to it.
Libtaz have several functions to format text: boldify, separator,
newline, colorize, indent.
But I think that we need only one function to format text. Why?
Because we can write one composite message via one function. Like here:
==1==
Before:
 boldify "$(gettext 'Usage:')"; gettext 'man [section] command'
After:
 emsg "$(gettext '<b>Usage:</b> man [section] command')"
==2==
Before:
 newline
 boldify "$(gettext 'Tazpkg SHell')"
 separator
After:
 emsg "<n><b>$(gettext 'Tazpkg SHell')</b><->"

What you think about next one try?

Attached files:
/home/hg/emsg/emsg: function emsg()
/home/hg/emsg/test: test suite for emsg()

Original libtaz.sh on the SliTaz Mercurial repos:
http://hg.slitaz.org/slitaz-base-files/file/tip/rootfs/lib/libtaz.sh

--
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/