# HG changeset patch # User Christophe Lincoln # Date 1306775001 -7200 # Node ID 872ecb790c849064e1e37b91a240ac768927734c # Parent 2d72c1dcc4bb46e02d2fef6ad72dd04ae5b153a1 Add slitaz-i18n-extra and first step with locale-fr-extra diff -r 2d72c1dcc4bb -r 872ecb790c84 locale-fr-extra/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locale-fr-extra/receipt Mon May 30 19:03:21 2011 +0200 @@ -0,0 +1,22 @@ +# SliTaz package receipt + +PACKAGE="locale-fr-extra" +VERSION="4.0" +CATEGORY="system-tools" +SHORT_DESC="Extra French locale pack (with Gimp, Mplayer, Xine)" +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://www.slitaz.org/" + +DEPENDS="locale-fr" +BUILD_DEPENDS="slitaz-i18n-extra" + +LOCALE="fr" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + . $WOK/slitaz-i18n-extra/stuff/locale-pack.functions + . $WOK/slitaz-i18n-extra/stuff/locale-pack.conf + mk_locale_dir + get_extra_messages +} diff -r 2d72c1dcc4bb -r 872ecb790c84 slitaz-i18n-extra/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-i18n-extra/receipt Mon May 30 19:03:21 2011 +0200 @@ -0,0 +1,31 @@ +# SliTaz package receipt + +PACKAGE="slitaz-i18n-extra" +VERSION="4.0" +CATEGORY="meta" +SHORT_DESC="SliTaz internationalization meta package to build extra locale pack." +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://www.slitaz.org/" + +# Bdeps ensure packages are built so we can get generated po files. +BUILD_DEPENDS="gimp mplayer xine-ui" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + . $stuff/locale-pack.conf + for p in $EXTRA_PKGS + do + [ ! -d "$WOK/$p/install" ] && echo "Missing in wok: $p" + done + # Cook all extra locale pack. + for i in $LOCALE_PACK + do + if [ -x /usr/bin/cook ]; then + cook locale-$i + elif [ -x /usr/bin/tazwok ]; then + tazwok cook locale-$i + fi + done + mkdir -p $fs/usr +} diff -r 2d72c1dcc4bb -r 872ecb790c84 slitaz-i18n-extra/stuff/locale-pack.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-i18n-extra/stuff/locale-pack.conf Mon May 30 19:03:21 2011 +0200 @@ -0,0 +1,7 @@ + +# Packages translations included in the language pack. +EXTRA_PKGS="gimp mplayer" + +# List of all locale pack (locale-xx) +#LOCALE_PACK="cs de es fr hu id it pt ru sl zh_CN zh_TW" +LOCALE_PACK="fr" diff -r 2d72c1dcc4bb -r 872ecb790c84 slitaz-i18n-extra/stuff/locale-pack.functions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-i18n-extra/stuff/locale-pack.functions Mon May 30 19:03:21 2011 +0200 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Standard directories having translated files. +mk_locale_dir() +{ + mkdir -p $fs/usr/share/locale/$LOCALE +} + +# Get the core packages messages. +get_extra_messages() +{ + for i in $EXTRA_PKGS + do + if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then + echo "* Found $LOCALE locale for: $i" + cp -a $WOK/$i/install/usr/share/locale/$LOCALE \ + $fs/usr/share/locale + fi + done +} diff -r 2d72c1dcc4bb -r 872ecb790c84 slitaz-i18n/receipt --- a/slitaz-i18n/receipt Mon May 30 14:37:56 2011 +0200 +++ b/slitaz-i18n/receipt Mon May 30 19:03:21 2011 +0200 @@ -2,19 +2,25 @@ PACKAGE="slitaz-i18n" VERSION="4.0" -CATEGORY="system-tools" +CATEGORY="meta" SHORT_DESC="SliTaz internationalization meta package to build locale pack." MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://www.slitaz.org/" + +# Bdeps ensure packages are built so we can get generated po files. BUILD_DEPENDS="asunder alsaplayer epdfview galculator viewnior gparted \ glib gtk+ leafpad lxpanel lxtask obconf openbox pcmanfm" -SUGGESTED="locale-de locale-es locale-fr locale-hu locale-pt" -WEB_SITE="http://www.slitaz.org/" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/share/doc/slitaz . $stuff/locale-pack.conf + for p in $CORE_PKGS + do + [ ! -d "$WOK/$p/install" ] && echo "Missing in wok: $p" + done + # Cook all locale pack. for i in $LOCALE_PACK do if [ -x /usr/bin/cook ]; then @@ -37,9 +43,9 @@ $CORE_PKGS ---- -SliTaz i18n project coordination is done on the Labs: +SliTaz i18n project coordination is done on the SCN and doc is on the website: - http://labs.slitaz.org/wiki/i18n + http://www.slitaz.org/i18n.php ================================================================================ diff -r 2d72c1dcc4bb -r 872ecb790c84 slitaz-i18n/stuff/locale-pack.functions --- a/slitaz-i18n/stuff/locale-pack.functions Mon May 30 14:37:56 2011 +0200 +++ b/slitaz-i18n/stuff/locale-pack.functions Mon May 30 19:03:21 2011 +0200 @@ -6,7 +6,6 @@ mkdir -p \ $fs/usr/share/locale/$LOCALE \ $fs/usr/share/slitaz/messages \ - $fs/usr/share/doc/slitaz \ $fs/etc/xdg/openbox } @@ -17,12 +16,6 @@ [ -f $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml ] && \ cp $WOK/slitaz-configs/slitaz-configs-$VERSION/rootfs/etc/xdg/openbox/menu.${LOCALE}.xml \ $fs/etc/xdg/openbox - - # All doc is include and linked in slitaz-doc package - #[ -d $WOK/slitaz-doc ] && . $WOK/slitaz-doc/receipt - #[ -f $WOK/slitaz-doc/slitaz-doc-$VERSION/slitaz/index.${LOCALE}.html ] && \ - #cp $WOK/slitaz-doc/slitaz-doc-$VERSION/slitaz/index.${LOCALE}.html \ - #$fs/usr/share/doc/slitaz [ -d $WOK/slitaz-tools ] && . $WOK/slitaz-tools/receipt [ -d $WOK/slitaz-tools/slitaz-tools-$VERSION/messages/$LOCALE ] && \ @@ -35,8 +28,8 @@ { for i in $CORE_PKGS do - [ -f $WOK/$i/receipt ] && . $WOK/$i/receipt if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then + echo "* Found $LOCALE locale for: $i" cp -a $WOK/$i/install/usr/share/locale/$LOCALE \ $fs/usr/share/locale fi