ssfs rev 73

Prepa for i18n
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jun 13 20:57:43 2011 +0200 (2011-06-13)
parents 525d7e348205
children 00d35dfe62e4
files Makefile TODO ssfs ssfs-box ssfs-env ssfs-server
line diff
     1.1 --- a/Makefile	Mon Jun 13 19:52:42 2011 +0100
     1.2 +++ b/Makefile	Mon Jun 13 20:57:43 2011 +0200
     1.3 @@ -6,8 +6,32 @@
     1.4  
     1.5  PACKAGE=ssfs
     1.6  VERSION=0.1-beta
     1.7 +LINGUAS?=fr
     1.8  
     1.9 -all:
    1.10 +all: msgmerge
    1.11 +
    1.12 +# i18n
    1.13 +
    1.14 +pot:
    1.15 +	xgettext -o po/ssfs.pot -L Shell \
    1.16 +		--package-name="Ssfs" \
    1.17 +		--package-version="$(VERSION)" \
    1.18 +		./ssfs ./ssfs-box
    1.19 +
    1.20 +msgmerge:
    1.21 +	@for l in $(LINGUAS); do \
    1.22 +		echo -n "Updating $$l po file."; \
    1.23 +		msgmerge -U po/$$l.po po/ssfs.pot; \
    1.24 +	done;
    1.25 +
    1.26 +msgfmt:
    1.27 +	@for l in $(LINGUAS); do \
    1.28 +		echo "Compiling $$l mo file..."; \
    1.29 +		mkdir -p po/mo/$$l/LC_MESSAGES; \
    1.30 +		msgfmt -o po/mo/$$l/LC_MESSAGES/ssfs.mo po/$$l.po; \
    1.31 +	done;
    1.32 +	
    1.33 +# Installation
    1.34  
    1.35  install:
    1.36  	mkdir -p $(DESTDIR)/bin \
    1.37 @@ -30,4 +54,5 @@
    1.38  		$(DESTDIR)$(PREFIX)/share/applications
    1.39  	install -m 0755 $(PACKAGE)-env \
    1.40  		$(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin
    1.41 +	#cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.42  	touch $(DESTDIR)/var/lib/$(PACKAGE)/vdisk.files
     2.1 --- a/TODO	Mon Jun 13 19:52:42 2011 +0100
     2.2 +++ b/TODO	Mon Jun 13 20:57:43 2011 +0200
     2.3 @@ -2,6 +2,7 @@
     2.4  
     2.5  	* Check if we can use only Dropbear as SSH client and server
     2.6  	* A better Web server interface in CGI (SHell or Python) or PHP
     2.7 -	* Improve quota management, use vdisk per user ?
     2.8 +	* Improve quota management, use virtual disk per user ?
     2.9 +	* Add doc and ensure client works on other Linux distro than SliTaz.
    2.10  	* A logo :-)
    2.11  
     3.1 --- a/ssfs	Mon Jun 13 19:52:42 2011 +0100
     3.2 +++ b/ssfs	Mon Jun 13 20:57:43 2011 +0200
     3.3 @@ -12,6 +12,11 @@
     3.4  logdir=$HOME/.local/var/log/$app
     3.5  config=$HOME/.config/$app/client.lua
     3.6  
     3.7 +# Internationalization
     3.8 +. /usr/bin/gettext.sh
     3.9 +TEXTDOMAIN='ssfs'
    3.10 +export TEXTDOMAIN
    3.11 +
    3.12  # Parse cmdline options.
    3.13  for opt in $@
    3.14  do
    3.15 @@ -60,7 +65,7 @@
    3.16  gen_config() {
    3.17  	mkdir -p $(dirname $config)
    3.18  	cat > $config << EOT
    3.19 --- Configuration file for SliTaz Secure Filesystem lsyncd daemon.
    3.20 +-- Configuration file for SliTaz Secure File Storage lsyncd daemon.
    3.21  
    3.22  sync {
    3.23  	default.rsyncssh,
     4.1 --- a/ssfs-box	Mon Jun 13 19:52:42 2011 +0100
     4.2 +++ b/ssfs-box	Mon Jun 13 20:57:43 2011 +0200
     4.3 @@ -10,6 +10,11 @@
     4.4  config=$HOME/.config/ssfs/client.lua
     4.5  pixmap=/usr/share/pixmaps/ssfs.png
     4.6  
     4.7 +# Internationalization
     4.8 +. /usr/bin/gettext.sh
     4.9 +TEXTDOMAIN='ssfs'
    4.10 +export TEXTDOMAIN
    4.11 +
    4.12  #
    4.13  # Functions
    4.14  #
     5.1 --- a/ssfs-env	Mon Jun 13 19:52:42 2011 +0100
     5.2 +++ b/ssfs-env	Mon Jun 13 20:57:43 2011 +0200
     5.3 @@ -1,6 +1,7 @@
     5.4  #!/bin/sh
     5.5  #
     5.6  # Ssfs vdisk chroot env utility - Help chrooted users use the environment.
     5.7 +# No i18n in this script since gettext is not installed in vdisk chroot.
     5.8  #
     5.9  # Copyright (C) SliTaz GNU/Linux - BSD License
    5.10  # Author: Christophe Lincoln <pankso@slitaz.org>
     6.1 --- a/ssfs-server	Mon Jun 13 19:52:42 2011 +0100
     6.2 +++ b/ssfs-server	Mon Jun 13 20:57:43 2011 +0200
     6.3 @@ -1,6 +1,7 @@
     6.4  #!/bin/sh
     6.5  #
     6.6 -# SliTaz Secure File Storage server side tool.
     6.7 +# SliTaz Secure File Storage server side tool. Use virtual disk with a minimal
     6.8 +# chroot for more security and to protect server host.
     6.9  #
    6.10  # Copyright (C) SliTaz GNU/Linux - BSD License
    6.11  # Author: Christophe Lincoln <pankso@slitaz.org>
    6.12 @@ -12,6 +13,11 @@
    6.13  state=/var/lib/ssfs
    6.14  share=/usr/share/ssfs
    6.15  
    6.16 +# Internationalization
    6.17 +. /usr/bin/gettext.sh
    6.18 +TEXTDOMAIN='ssfs'
    6.19 +export TEXTDOMAIN
    6.20 +
    6.21  # Be sure we're root.
    6.22  [ $(id -u) != 0 ] && gettext "You must be root to run:" && \
    6.23  	echo " $app" && exit 0