wok-stable view slitaz-i18n/stuff/locale-pack.functions @ rev 10851
pth: Fixed typo in deps.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Jun 12 11:09:02 2011 +0000 (2011-06-12) |
parents | 872ecb790c84 |
children | f6ca653dfa74 |
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/usr/share/slitaz/messages \
9 $fs/etc/xdg/openbox
10 }
12 # Get translated files from SliTaz sub projects: configs & tools.
13 get_slitaz_messages()
14 {
15 configs=$WOK/slitaz-configs/source
16 openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox
17 tools=$WOK/slitaz-tools/source
19 [ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1
20 [ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1
22 if [ -f $openbox/menu.${LOCALE}.xml ]; then
23 echo "* Found $LOCALE locale for: openbox menu"
24 cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox
25 fi
27 # Tools messages will be replace in time by POT files.
28 if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then
29 echo "* Found $LOCALE locale for: slitaz-tools"
30 cp -a $tools/slitaz-tools-*/messages/$LOCALE \
31 $fs/usr/share/slitaz/messages
32 fi
34 if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then
35 for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE)
36 do
37 echo "* Found $LOCALE locale for: ${app%.mo}"
38 cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \
39 $fs/usr/share/locale/$LOCALE
40 done
41 fi
42 }
44 # Get the core packages messages.
45 get_core_messages()
46 {
47 for i in $CORE_PKGS
48 do
49 if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then
50 echo "* Found $LOCALE locale for: $i"
51 cp -a $WOK/$i/install/usr/share/locale/$LOCALE \
52 $fs/usr/share/locale
53 fi
54 done
55 }