slitaz-tools rev 553
Add tazbox (will replace desktopbox and subox) with just a logout box for now
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Apr 17 22:45:45 2011 +0200 (2011-04-17) |
parents | c41b9dc4bda2 |
children | 1666483eb2d2 |
files | Makefile README po/tazbox/tazbox.pot rootfs/usr/share/applications/desktopbox-logout.desktop rootfs/usr/share/applications/slitaz-logout.desktop tazbox/README tazbox/tazbox |
line diff
1.1 --- a/Makefile Thu Apr 14 00:54:53 2011 +0000 1.2 +++ b/Makefile Sun Apr 17 22:45:45 2011 +0200 1.3 @@ -11,10 +11,15 @@ 1.4 1.5 # i18n. 1.6 1.7 -pot: 1.8 +tazboxpot: 1.9 + xgettext -o po/tazbox/tazbox.pot -L Shell \ 1.10 + --package-name="TazBox" ./tazbox/tazbox 1.11 + 1.12 +pot: tazboxpot 1.13 @for p in $(TINYUTILS); do \ 1.14 echo -n "Generating $$p pot file... "; \ 1.15 - xgettext -o po/$$p/$$p.pot -L Shell --package-name=$$p tinyutils/$$p; \ 1.16 + xgettext -o po/$$p/$$p.pot -L Shell \ 1.17 + --package-name=$$p tinyutils/$$p; \ 1.18 echo "done"; \ 1.19 done; 1.20
2.1 --- a/README Thu Apr 14 00:54:53 2011 +0000 2.2 +++ b/README Sun Apr 17 22:45:45 2011 +0200 2.3 @@ -25,7 +25,7 @@ 2.4 To start a new translation please use msginit from the pot file directory. 2.5 Example for French/France locale (fr_FR): 2.6 2.7 - $ msginit -l fr_FR -o fr.po -i subox.pot 2.8 + $ msginit -l fr_FR -o fr.po -i tazbox.pot 2.9 2.10 To update all pot files when some new strings have been added (mainly for 2.11 developers before commit): 2.12 @@ -40,7 +40,7 @@ 2.13 compile your translation. Example for french locale, note that the file must 2.14 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it: 2.15 2.16 - $ msgfmt -o tazusb.mo fr.po 2.17 + $ msgfmt -o tazbox.mo fr.po 2.18 2.19 2.20 ===============================================================================
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/po/tazbox/tazbox.pot Sun Apr 17 22:45:45 2011 +0200 3.3 @@ -0,0 +1,50 @@ 3.4 +# SOME DESCRIPTIVE TITLE. 3.5 +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3.6 +# This file is distributed under the same license as the PACKAGE package. 3.7 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 3.8 +# 3.9 +#, fuzzy 3.10 +msgid "" 3.11 +msgstr "" 3.12 +"Project-Id-Version: PACKAGE VERSION\n" 3.13 +"Report-Msgid-Bugs-To: \n" 3.14 +"POT-Creation-Date: 2011-04-17 22:43+0200\n" 3.15 +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 3.16 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 3.17 +"Language-Team: LANGUAGE <LL@li.org>\n" 3.18 +"Language: \n" 3.19 +"MIME-Version: 1.0\n" 3.20 +"Content-Type: text/plain; charset=CHARSET\n" 3.21 +"Content-Transfer-Encoding: 8bit\n" 3.22 + 3.23 +#: tazbox/tazbox:24 3.24 +msgid "Usage:" 3.25 +msgstr "" 3.26 + 3.27 +#: tazbox/tazbox:26 3.28 +msgid "Commands:" 3.29 +msgstr "" 3.30 + 3.31 +#: tazbox/tazbox:27 3.32 +msgid "Display this short help usage" 3.33 +msgstr "" 3.34 + 3.35 +#: tazbox/tazbox:28 3.36 +msgid "Desktop lougout box" 3.37 +msgstr "" 3.38 + 3.39 +#: tazbox/tazbox:35 3.40 +msgid "SliTaz Logout. Please choose an action:" 3.41 +msgstr "" 3.42 + 3.43 +#: tazbox/tazbox:41 3.44 +msgid "Close X session" 3.45 +msgstr "" 3.46 + 3.47 +#: tazbox/tazbox:42 3.48 +msgid "Reboot system" 3.49 +msgstr "" 3.50 + 3.51 +#: tazbox/tazbox:43 3.52 +msgid "Shutdown system" 3.53 +msgstr ""
4.1 --- a/rootfs/usr/share/applications/desktopbox-logout.desktop Thu Apr 14 00:54:53 2011 +0000 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,5 +0,0 @@ 4.4 -[Desktop Entry] 4.5 -Name=Logout 4.6 -Name[fr]=Déconnexion 4.7 -Icon=/usr/share/pixmaps/logout.png 4.8 -Exec=desktopbox logout
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/rootfs/usr/share/applications/slitaz-logout.desktop Sun Apr 17 22:45:45 2011 +0200 5.3 @@ -0,0 +1,22 @@ 5.4 +[Desktop Entry] 5.5 +Type=Application 5.6 +Exec=desktopbox logout 5.7 +Icon=logout 5.8 +StartupNotify=false 5.9 +Terminal=false 5.10 +Name=Log Out 5.11 +Name[de]=Abmelden 5.12 +Name[es]=Salir 5.13 +Name[fr]=Déconnexion 5.14 +Name[hr]=Odjava 5.15 +Name[hu]=Kijelentkezés 5.16 +Name[id]=Log Keluar 5.17 +Name[it]=Esci 5.18 +Name[ja]=ログアウト 5.19 +Name[nl]=Uitloggen 5.20 +Name[pl]=Wyloguj 5.21 +Name[pt]=Sair 5.22 +Name[pt_BR]=Encerrar sessão 5.23 +Name[ru]=Выйти 5.24 +Name[zh_CN]=注销 5.25 +Name[zh_TW]=登出
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/tazbox/README Sun Apr 17 22:45:45 2011 +0200 6.3 @@ -0,0 +1,5 @@ 6.4 + 6.5 + 6.6 +TazBox is the new desktop tools boxes using Yad and replacing subox 6.7 +and desktopbox. 6.8 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/tazbox/tazbox Sun Apr 17 22:45:45 2011 +0200 7.3 @@ -0,0 +1,70 @@ 7.4 +#!/bin/sh 7.5 +# 7.6 +# SliTaz tiny GUI boxes for the desktop (su, logout, etc) and as usual 7.7 +# please KISS 7.8 +# 7.9 +# Note: $(gettext "text") dont work inside Yad so use `gettext \"text\"` 7.10 +# 7.11 +# Copyright (C) 2011 SliTaz GNU/linux - GNU gpl v3 7.12 +# - Christophe Lincoln <pankso@slitaz.org> 7.13 +# 7.14 + 7.15 +# Internationalization 7.16 +. /usr/bin/gettext.sh 7.17 +TEXTDOMAIN='tazbox' 7.18 +export TEXTDOMAIN 7.19 + 7.20 +# 7.21 +# Functions 7.22 +# 7.23 + 7.24 +usage() { 7.25 + cat << EOT 7.26 + 7.27 +$(gettext "Usage:") $(basename $0) [command] 7.28 + 7.29 +$(gettext "Commands:") 7.30 + usage $(gettext "Display this short help usage") 7.31 + logout $(gettext "Desktop lougout box") 7.32 + 7.33 +EOT 7.34 +} 7.35 + 7.36 +# Logout GUI function 7.37 +logout_main() { 7.38 + text=$(gettext "SliTaz Logout. Please choose an action:") 7.39 + yad --entry --title="SliTaz Logout" \ 7.40 + --window-icon=/usr/share/pixmaps/slitaz-menu.png \ 7.41 + --width=440 --height=150 --text="$text" \ 7.42 + --image="slitaz-menu" --image-on-top \ 7.43 + --center --on-top --entry-text \ 7.44 + "`gettext \"Close X session\"` : exit" \ 7.45 + "`gettext \"Reboot system\"` : reboot" \ 7.46 + "`gettext \"Shutdown system\"` : halt" 7.47 +} 7.48 + 7.49 +# 7.50 +# Commands 7.51 +# 7.52 +case "$1" in 7.53 + su) 7.54 + echo "TODO" ;; 7.55 + logout) 7.56 + # Store box results 7.57 + main=`logout_main` 7.58 + # Deal with --button values 7.59 + case $? in 7.60 + 1) exit 0 ;; 7.61 + *) continue ;; 7.62 + esac 7.63 + # Deal with $main values 7.64 + case "$main" in 7.65 + *exit) openbox --exit || jwm -exit ;; 7.66 + *reboot) reboot ;; 7.67 + *halt) poweroff ;; 7.68 + esac ;; 7.69 + *) 7.70 + usage ;; 7.71 +esac 7.72 + 7.73 +exit 0