wok view slitaz-i18n/stuff/locale-pack.functions @ rev 14000

Up: emacs-pkg-lua-mode (20111107)
author Dominique Corbex <domcox@slitaz.org>
date Thu Feb 14 13:36:00 2013 +0100 (2013-02-14)
parents 6916f08d8107
children 919b102812ab
line source
1 #!/bin/sh
3 # Standard directories having translated files.
4 mk_locale_dir()
5 {
6 mkdir -p \
7 $fs/usr/share/locale/$LOCALE \
8 $fs/etc/xdg/openbox
9 }
11 # Get translated files from SliTaz sub projects: configs & tools.
12 get_slitaz_messages()
13 {
14 configs=$WOK/slitaz-configs/source
15 openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox
16 #tools=$WOK/slitaz-tools/source
18 # Make tazwok compatible with this.
19 if [ ! -x /usr/bin/cook ]; then
20 [ -d $configs ] || tazwok get-src slitaz-configs --target=$configs
21 #[ -d $tools ] || tazwok get-src slitaz-tools --target=$tools
22 fi
24 [ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1
25 #[ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1
27 if [ -f $openbox/menu.${LOCALE}.xml ]; then
28 echo "* Found $LOCALE locale for: openbox menu"
29 cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox
30 fi
32 # Tools messages will be replace in time by POT files.
33 #
34 # NOTE: All po files are now include into slitaz-tools (easy for update)
35 #
36 #if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then
37 #echo "* Found $LOCALE locale for: slitaz-tools"
38 #cp -a $tools/slitaz-tools-*/messages/$LOCALE \
39 #$fs/usr/share/slitaz/messages
40 #fi
42 #if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then
43 #for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE)
44 #do
45 #echo "* Found $LOCALE locale for: ${app%.mo}"
46 #cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \
47 #$fs/usr/share/locale/$LOCALE
48 #done
49 #fi
50 }
52 # Get the core packages messages.
53 get_core_messages()
54 {
55 for i in $CORE_PKGS
56 do
57 if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then
58 echo "* Found $LOCALE locale for: $i"
59 cp -a $WOK/$i/install/usr/share/locale/$LOCALE \
60 $fs/usr/share/locale
61 fi
62 done
63 }