# HG changeset patch # User Christophe Lincoln # Date 1307991463 -7200 # Node ID 3a2f682ce267d223e2de75c1c980b9fab830545d # Parent 525d7e3482055d5857fd64d89068deb9c0d98025 Prepa for i18n diff -r 525d7e348205 -r 3a2f682ce267 Makefile --- a/Makefile Mon Jun 13 19:52:42 2011 +0100 +++ b/Makefile Mon Jun 13 20:57:43 2011 +0200 @@ -6,8 +6,32 @@ PACKAGE=ssfs VERSION=0.1-beta +LINGUAS?=fr -all: +all: msgmerge + +# i18n + +pot: + xgettext -o po/ssfs.pot -L Shell \ + --package-name="Ssfs" \ + --package-version="$(VERSION)" \ + ./ssfs ./ssfs-box + +msgmerge: + @for l in $(LINGUAS); do \ + echo -n "Updating $$l po file."; \ + msgmerge -U po/$$l.po po/ssfs.pot; \ + done; + +msgfmt: + @for l in $(LINGUAS); do \ + echo "Compiling $$l mo file..."; \ + mkdir -p po/mo/$$l/LC_MESSAGES; \ + msgfmt -o po/mo/$$l/LC_MESSAGES/ssfs.mo po/$$l.po; \ + done; + +# Installation install: mkdir -p $(DESTDIR)/bin \ @@ -30,4 +54,5 @@ $(DESTDIR)$(PREFIX)/share/applications install -m 0755 $(PACKAGE)-env \ $(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin + #cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale touch $(DESTDIR)/var/lib/$(PACKAGE)/vdisk.files diff -r 525d7e348205 -r 3a2f682ce267 TODO --- a/TODO Mon Jun 13 19:52:42 2011 +0100 +++ b/TODO Mon Jun 13 20:57:43 2011 +0200 @@ -2,6 +2,7 @@ * Check if we can use only Dropbear as SSH client and server * A better Web server interface in CGI (SHell or Python) or PHP - * Improve quota management, use vdisk per user ? + * Improve quota management, use virtual disk per user ? + * Add doc and ensure client works on other Linux distro than SliTaz. * A logo :-) diff -r 525d7e348205 -r 3a2f682ce267 ssfs --- a/ssfs Mon Jun 13 19:52:42 2011 +0100 +++ b/ssfs Mon Jun 13 20:57:43 2011 +0200 @@ -12,6 +12,11 @@ logdir=$HOME/.local/var/log/$app config=$HOME/.config/$app/client.lua +# Internationalization +. /usr/bin/gettext.sh +TEXTDOMAIN='ssfs' +export TEXTDOMAIN + # Parse cmdline options. for opt in $@ do @@ -60,7 +65,7 @@ gen_config() { mkdir -p $(dirname $config) cat > $config << EOT --- Configuration file for SliTaz Secure Filesystem lsyncd daemon. +-- Configuration file for SliTaz Secure File Storage lsyncd daemon. sync { default.rsyncssh, diff -r 525d7e348205 -r 3a2f682ce267 ssfs-box --- a/ssfs-box Mon Jun 13 19:52:42 2011 +0100 +++ b/ssfs-box Mon Jun 13 20:57:43 2011 +0200 @@ -10,6 +10,11 @@ config=$HOME/.config/ssfs/client.lua pixmap=/usr/share/pixmaps/ssfs.png +# Internationalization +. /usr/bin/gettext.sh +TEXTDOMAIN='ssfs' +export TEXTDOMAIN + # # Functions # diff -r 525d7e348205 -r 3a2f682ce267 ssfs-env --- a/ssfs-env Mon Jun 13 19:52:42 2011 +0100 +++ b/ssfs-env Mon Jun 13 20:57:43 2011 +0200 @@ -1,6 +1,7 @@ #!/bin/sh # # Ssfs vdisk chroot env utility - Help chrooted users use the environment. +# No i18n in this script since gettext is not installed in vdisk chroot. # # Copyright (C) SliTaz GNU/Linux - BSD License # Author: Christophe Lincoln diff -r 525d7e348205 -r 3a2f682ce267 ssfs-server --- a/ssfs-server Mon Jun 13 19:52:42 2011 +0100 +++ b/ssfs-server Mon Jun 13 20:57:43 2011 +0200 @@ -1,6 +1,7 @@ #!/bin/sh # -# SliTaz Secure File Storage server side tool. +# SliTaz Secure File Storage server side tool. Use virtual disk with a minimal +# chroot for more security and to protect server host. # # Copyright (C) SliTaz GNU/Linux - BSD License # Author: Christophe Lincoln @@ -12,6 +13,11 @@ state=/var/lib/ssfs share=/usr/share/ssfs +# Internationalization +. /usr/bin/gettext.sh +TEXTDOMAIN='ssfs' +export TEXTDOMAIN + # Be sure we're root. [ $(id -u) != 0 ] && gettext "You must be root to run:" && \ echo " $app" && exit 0