Libtaz: extended messages |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/slitaz Archives
]
- To: slitaz@xxxxxxxxxxxxxxxxxxx
- Subject: Libtaz: extended messages
- From: Aleksej Bobylev <al.bobylev@xxxxxxxxx>
- Date: Thu, 24 May 2012 14:08:19 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=PxBvYSZQ6lu8aFx0QuXQBRRQBi93Z4qkGCDIMT0XPFc=; b=DbqFLhjAw2IEbRg5rJ60/jPFHoouv+/+Y4Ra0twfuKqqVPfiHEl3Vk4x1zFcusIqQ5 dXnHZaVXRgHnAblzhIo1hzLBGMTFiSrHkIACpO3kjTr4N7LUFD41KareaFyRzMGle4OC /oiz/O67YYMJzLy/KPaTJAI+P0mF2iMorOPZBKcY70mNUlPp/1Rl2YL5ZPBvOdw01M5z vnd4eT0zACCP1oRERnh9hfBgO8sezogzKgSv1XwsA3J3oLlfPHSvUwA9OfHKThygqtoE oqL2H0ogBUfGeQoY8UKSv8r159qK2CBVqKXHzmOtalHCl91V2PYQQCqFGlKfT8Jr911E o4ug==
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/