wok annotate slitaz-i18n/stuff/locale-pack.functions @ rev 11487
suricata: add pcre to depends
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Dec 18 03:02:00 2011 +0100 (2011-12-18) |
parents | f6ca653dfa74 |
children | 438b7a480f9e |
rev | line source |
---|---|
pankso@3087 | 1 #!/bin/sh |
pankso@3087 | 2 |
paul@4858 | 3 # Standard directories having translated files. |
pankso@3087 | 4 mk_locale_dir() |
pankso@3087 | 5 { |
pankso@3087 | 6 mkdir -p \ |
pankso@3087 | 7 $fs/usr/share/locale/$LOCALE \ |
pankso@3087 | 8 $fs/usr/share/slitaz/messages \ |
pankso@3087 | 9 $fs/etc/xdg/openbox |
pankso@3087 | 10 } |
pankso@3087 | 11 |
pankso@10783 | 12 # Get translated files from SliTaz sub projects: configs & tools. |
pankso@3087 | 13 get_slitaz_messages() |
pankso@3087 | 14 { |
pankso@10783 | 15 configs=$WOK/slitaz-configs/source |
pankso@10783 | 16 openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox |
pankso@10783 | 17 tools=$WOK/slitaz-tools/source |
gokhlayeh@11389 | 18 |
gokhlayeh@11389 | 19 # Make tazwok compatible with this. |
gokhlayeh@11399 | 20 if [ ! -x /usr/bin/cook ]; then |
gokhlayeh@11389 | 21 [ -d $configs ] || tazwok get-src slitaz-configs --target=$configs |
gokhlayeh@11389 | 22 [ -d $tools ] || tazwok get-src slitaz-tools --target=$tools |
gokhlayeh@11389 | 23 fi |
gokhlayeh@11389 | 24 |
pankso@10783 | 25 [ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1 |
pankso@10783 | 26 [ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1 |
pankso@3087 | 27 |
pankso@10783 | 28 if [ -f $openbox/menu.${LOCALE}.xml ]; then |
pankso@10783 | 29 echo "* Found $LOCALE locale for: openbox menu" |
pankso@10783 | 30 cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox |
pankso@10783 | 31 fi |
pankso@10783 | 32 |
pankso@10783 | 33 # Tools messages will be replace in time by POT files. |
pankso@10783 | 34 if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then |
pankso@10783 | 35 echo "* Found $LOCALE locale for: slitaz-tools" |
pankso@10783 | 36 cp -a $tools/slitaz-tools-*/messages/$LOCALE \ |
pankso@10783 | 37 $fs/usr/share/slitaz/messages |
pankso@10783 | 38 fi |
pankso@10783 | 39 |
pankso@10783 | 40 if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then |
pankso@10783 | 41 for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE) |
pankso@10783 | 42 do |
pankso@10783 | 43 echo "* Found $LOCALE locale for: ${app%.mo}" |
pankso@10783 | 44 cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \ |
pankso@10783 | 45 $fs/usr/share/locale/$LOCALE |
pankso@10783 | 46 done |
pankso@10783 | 47 fi |
pankso@3087 | 48 } |
pankso@3087 | 49 |
pankso@3087 | 50 # Get the core packages messages. |
pankso@3087 | 51 get_core_messages() |
pankso@3087 | 52 { |
pankso@10740 | 53 for i in $CORE_PKGS |
pankso@3087 | 54 do |
pankso@10740 | 55 if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then |
pankso@10751 | 56 echo "* Found $LOCALE locale for: $i" |
pankso@10740 | 57 cp -a $WOK/$i/install/usr/share/locale/$LOCALE \ |
pankso@3087 | 58 $fs/usr/share/locale |
pankso@3087 | 59 fi |
pankso@3087 | 60 done |
pankso@3087 | 61 } |