wok diff slitaz-i18n/stuff/locale-pack.functions @ rev 10794

lostirc: use irc.freenode.net for slitaz IRC chan
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jun 03 03:13:13 2011 +0200 (2011-06-03)
parents 872ecb790c84
children f6ca653dfa74
line diff
     1.1 --- a/slitaz-i18n/stuff/locale-pack.functions	Mon May 30 19:03:21 2011 +0200
     1.2 +++ b/slitaz-i18n/stuff/locale-pack.functions	Fri Jun 03 03:13:13 2011 +0200
     1.3 @@ -9,18 +9,36 @@
     1.4  		$fs/etc/xdg/openbox
     1.5  }
     1.6  
     1.7 -# Get translated files from SliTaz sub projects: configs, doc, tools.
     1.8 +# Get translated files from SliTaz sub projects: configs & tools.
     1.9  get_slitaz_messages()
    1.10  {
    1.11 -	[ -d $WOK/slitaz-configs ] && . $WOK/slitaz-configs/receipt
    1.12 -	[ -f $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml ] && \
    1.13 -		cp $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml \
    1.14 -		$fs/etc/xdg/openbox
    1.15 +	configs=$WOK/slitaz-configs/source
    1.16 +	openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox
    1.17 +	tools=$WOK/slitaz-tools/source
    1.18 +	
    1.19 +	[ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1
    1.20 +	[ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1
    1.21  
    1.22 -	[ -d $WOK/slitaz-tools ] && . $WOK/slitaz-tools/receipt
    1.23 -	[ -d $WOK/slitaz-tools/slitaz-tools-$VERSION/messages/$LOCALE ] && \
    1.24 -		cp -a $WOK/slitaz-tools/slitaz-tools-$VERSION/messages/$LOCALE \
    1.25 -		$fs/usr/share/slitaz/messages
    1.26 +	if [ -f $openbox/menu.${LOCALE}.xml ]; then
    1.27 +		echo "* Found $LOCALE locale for: openbox menu"
    1.28 +		cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox
    1.29 +	fi
    1.30 +	
    1.31 +	# Tools messages will be replace in time by POT files.
    1.32 +	if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then
    1.33 +		echo "* Found $LOCALE locale for: slitaz-tools"
    1.34 +		cp -a $tools/slitaz-tools-*/messages/$LOCALE \
    1.35 +			$fs/usr/share/slitaz/messages
    1.36 +	fi
    1.37 +	
    1.38 +	if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then
    1.39 +		for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE)
    1.40 +		do
    1.41 +			echo "* Found $LOCALE locale for: ${app%.mo}"
    1.42 +			cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \
    1.43 +				$fs/usr/share/locale/$LOCALE
    1.44 +		done
    1.45 +	fi
    1.46  }
    1.47  
    1.48  # Get the core packages messages.