wok-6.x rev 10783

slitaz-i18n: Fix and improve - Get files from slitaz-configs and slitaz-tools
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jun 01 13:54:49 2011 +0200 (2011-06-01)
parents 0b96ee321bf3
children ee88cfdf14a2
files slitaz-i18n/receipt slitaz-i18n/stuff/locale-pack.functions
line diff
     1.1 --- a/slitaz-i18n/receipt	Wed Jun 01 12:10:23 2011 +0200
     1.2 +++ b/slitaz-i18n/receipt	Wed Jun 01 13:54:49 2011 +0200
     1.3 @@ -29,7 +29,7 @@
     1.4  			tazwok cook locale-$i
     1.5  		fi
     1.6  	done
     1.7 -	cat > $fs/usr/share/doc/slitaz/i18n.txt << _EOT_
     1.8 +	cat > $fs/usr/share/doc/slitaz/i18n.txt << EOT
     1.9  SliTaz i18n information
    1.10  ================================================================================
    1.11  
    1.12 @@ -49,5 +49,5 @@
    1.13  
    1.14  
    1.15  ================================================================================
    1.16 -_EOT_
    1.17 +EOT
    1.18  }
     2.1 --- a/slitaz-i18n/stuff/locale-pack.functions	Wed Jun 01 12:10:23 2011 +0200
     2.2 +++ b/slitaz-i18n/stuff/locale-pack.functions	Wed Jun 01 13:54:49 2011 +0200
     2.3 @@ -9,18 +9,36 @@
     2.4  		$fs/etc/xdg/openbox
     2.5  }
     2.6  
     2.7 -# Get translated files from SliTaz sub projects: configs, doc, tools.
     2.8 +# Get translated files from SliTaz sub projects: configs & tools.
     2.9  get_slitaz_messages()
    2.10  {
    2.11 -	[ -d $WOK/slitaz-configs ] && . $WOK/slitaz-configs/receipt
    2.12 -	[ -f $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml ] && \
    2.13 -		cp $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml \
    2.14 -		$fs/etc/xdg/openbox
    2.15 +	configs=$WOK/slitaz-configs/source
    2.16 +	openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox
    2.17 +	tools=$WOK/slitaz-tools/source
    2.18 +	
    2.19 +	[ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1
    2.20 +	[ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1
    2.21  
    2.22 -	[ -d $WOK/slitaz-tools ] && . $WOK/slitaz-tools/receipt
    2.23 -	[ -d $WOK/slitaz-tools/slitaz-tools-$VERSION/messages/$LOCALE ] && \
    2.24 -		cp -a $WOK/slitaz-tools/slitaz-tools-$VERSION/messages/$LOCALE \
    2.25 -		$fs/usr/share/slitaz/messages
    2.26 +	if [ -f $openbox/menu.${LOCALE}.xml ]; then
    2.27 +		echo "* Found $LOCALE locale for: openbox menu"
    2.28 +		cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox
    2.29 +	fi
    2.30 +	
    2.31 +	# Tools messages will be replace in time by POT files.
    2.32 +	if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then
    2.33 +		echo "* Found $LOCALE locale for: slitaz-tools"
    2.34 +		cp -a $tools/slitaz-tools-*/messages/$LOCALE \
    2.35 +			$fs/usr/share/slitaz/messages
    2.36 +	fi
    2.37 +	
    2.38 +	if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then
    2.39 +		for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE)
    2.40 +		do
    2.41 +			echo "* Found $LOCALE locale for: ${app%.mo}"
    2.42 +			cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \
    2.43 +				$fs/usr/share/locale/$LOCALE
    2.44 +		done
    2.45 +	fi
    2.46  }
    2.47  
    2.48  # Get the core packages messages.