wok-next annotate slitaz-i18n/stuff/locale-pack.functions @ rev 12630
cairo-dock: update WGET_URL
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 29 12:56:03 2012 +0200 (2012-04-29) |
parents | 6916f08d8107 |
children | 919b102812ab |
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/etc/xdg/openbox |
pankso@3087 | 9 } |
pankso@3087 | 10 |
pankso@10783 | 11 # Get translated files from SliTaz sub projects: configs & tools. |
pankso@3087 | 12 get_slitaz_messages() |
pankso@3087 | 13 { |
pankso@10783 | 14 configs=$WOK/slitaz-configs/source |
pankso@10783 | 15 openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox |
pankso@12018 | 16 #tools=$WOK/slitaz-tools/source |
gokhlayeh@11389 | 17 |
gokhlayeh@11389 | 18 # Make tazwok compatible with this. |
gokhlayeh@11399 | 19 if [ ! -x /usr/bin/cook ]; then |
gokhlayeh@11389 | 20 [ -d $configs ] || tazwok get-src slitaz-configs --target=$configs |
pankso@12018 | 21 #[ -d $tools ] || tazwok get-src slitaz-tools --target=$tools |
gokhlayeh@11389 | 22 fi |
gokhlayeh@11389 | 23 |
pankso@10783 | 24 [ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1 |
pankso@12018 | 25 #[ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1 |
pankso@3087 | 26 |
pankso@10783 | 27 if [ -f $openbox/menu.${LOCALE}.xml ]; then |
pankso@10783 | 28 echo "* Found $LOCALE locale for: openbox menu" |
pankso@10783 | 29 cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox |
pankso@10783 | 30 fi |
pankso@10783 | 31 |
pankso@10783 | 32 # Tools messages will be replace in time by POT files. |
pankso@12018 | 33 # |
pankso@12018 | 34 # NOTE: All po files are now include into slitaz-tools (easy for update) |
pankso@12018 | 35 # |
pankso@12018 | 36 #if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then |
pankso@12018 | 37 #echo "* Found $LOCALE locale for: slitaz-tools" |
pankso@12018 | 38 #cp -a $tools/slitaz-tools-*/messages/$LOCALE \ |
pankso@12018 | 39 #$fs/usr/share/slitaz/messages |
pankso@12018 | 40 #fi |
pankso@10783 | 41 |
pankso@12018 | 42 #if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then |
pankso@12018 | 43 #for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE) |
pankso@12018 | 44 #do |
pankso@12018 | 45 #echo "* Found $LOCALE locale for: ${app%.mo}" |
pankso@12018 | 46 #cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \ |
pankso@12018 | 47 #$fs/usr/share/locale/$LOCALE |
pankso@12018 | 48 #done |
pankso@12018 | 49 #fi |
pankso@3087 | 50 } |
pankso@3087 | 51 |
pankso@3087 | 52 # Get the core packages messages. |
pankso@3087 | 53 get_core_messages() |
pankso@3087 | 54 { |
pankso@10740 | 55 for i in $CORE_PKGS |
pankso@3087 | 56 do |
pankso@10740 | 57 if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then |
pankso@10751 | 58 echo "* Found $LOCALE locale for: $i" |
pankso@10740 | 59 cp -a $WOK/$i/install/usr/share/locale/$LOCALE \ |
pankso@3087 | 60 $fs/usr/share/locale |
pankso@3087 | 61 fi |
pankso@3087 | 62 done |
pankso@3087 | 63 } |