tazpkg diff tazpkg-notify @ rev 633
Add Polish translation (thanks Pawel Pyrczak); merge tazpkg, tazpkg-notify and other *pkg* translations into one; simplify plural translations using $num; normalize name (Tazpkg, TazPKG -> TazPkg); move markup outside translations; re-use categories names in tazpkg and tazpanel; other tiny improvements.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jul 25 01:47:48 2013 +0300 (2013-07-25) |
parents | de952705379e |
children | 0daa5fc6754f |
line diff
1.1 --- a/tazpkg-notify Sat Jun 23 00:51:57 2012 +0000 1.2 +++ b/tazpkg-notify Thu Jul 25 01:47:48 2013 +0300 1.3 @@ -1,30 +1,31 @@ 1.4 #!/bin/sh 1.5 # 1.6 -# TazPKG Notify - Notification icon for Tazpkg packages. Recharging pkgs 1.7 +# TazPkg Notify - Notification icon for TazPkg packages. Recharging pkgs 1.8 # list can be done automatically at boot, so notifies users if some 1.9 # updates are available. Also notifies users if the packages list is too 1.10 # old and out-of-date or if no packages list found. This script should 1.11 # be run by the WM autostart script or ~/.xsession and needs a systray to 1.12 # sit in like in LXpanel or Tint2. 1.13 # 1.14 -# Copyright (C) 2012 SliTaz GNU/Linux - GNU gpl v2 1.15 +# Copyright (C) 2012 SliTaz GNU/Linux - GNU GPL v2 1.16 # 1.17 # Authors : Christophe Lincoln <pankso@slitaz.org> 1.18 # 1.19 1.20 # I18n 1.21 . /usr/bin/gettext.sh 1.22 -TEXTDOMAIN='tazpkg-notify' 1.23 -export TEXTDOMAIN 1.24 +export TEXTDOMAIN='tazpkg' 1.25 1.26 fifo=/tmp/$(basename $0).fifo 1.27 panel="http://tazpanel:82/pkgs.cgi" 1.28 db="/var/lib/tazpkg" 1.29 doc="file:///usr/share/doc/tazpkg/tazpkg.html" 1.30 + 1.31 installed=$(ls $db/installed | wc -l) 1.32 +num="<b>$installed</b>" 1.33 text="$(eval_ngettext \ 1.34 - '<b>$installed</b> installed package' \ 1.35 - '<b>$installed</b> installed packages' $installed)" 1.36 + '$num installed package' \ 1.37 + '$num installed packages' $installed)" 1.38 icon="/usr/share/pixmaps/tazpkg.png" 1.39 [ -f "$db/packages.list" ] && mtime=$(find $db/packages.list -mtime +10;) 1.40 [ -f "$db/packages.up" ] && up=$(cat $db/packages.up | wc -l) 1.41 @@ -49,8 +50,8 @@ 1.42 $(gettext "My packages")!tazweb $panel?list!tazpkg|\ 1.43 $(gettext "Recharge lists")!tazweb $panel?recharge!tazpkg-up|\ 1.44 $(gettext "Check upgrade")!tazweb $panel?up!tazpkg-up|\ 1.45 -$(gettext "TazPKG SHell")!terminal -e tazpkg shell!xterm|\ 1.46 -$(gettext "TazPKG manual")!tazweb $doc!text-html|\ 1.47 +$(gettext "TazPkg SHell")!terminal -e tazpkg shell!xterm|\ 1.48 +$(gettext "TazPkg manual")!tazweb $doc!text-html|\ 1.49 $(gettext "Close notification")!quit!gtk-close 1.50 EOT 1.51 } 1.52 @@ -82,9 +83,10 @@ 1.53 fi 1.54 # Available upgrades 1.55 if [ "$up" -gt 0 ]; then 1.56 + num="<b>$up</b>" 1.57 tooltip=$(eval_ngettext \ 1.58 - 'There is <b>$up</b> upgradeable package' \ 1.59 - 'There are <b>$up</b> upgradeable packages' $up) 1.60 + 'There is $num upgradeable package' \ 1.61 + 'There are $num upgradeable packages' $up) 1.62 echo "action:tazweb $panel?up" > $fifo 1.63 echo "tooltip:$tooltip" > $fifo 1.64 echo "icon:tazpkg-up" > $fifo && exit 0