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

Xorg marathon, Day 2. xorg-trapproto: fix receipt; xorg-libXau(-dev): up 1.0.8; xorg-xtrans: prettify receipt; xorg-libX11: move X11 locales to locale-*; slitaz-i18n: add function get_x11_locale; locale-el: add receipt; locale-pt_BR locale-ru locale-zh_CN locale-zh_TW: add here X11 locales.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 02 12:09:39 2013 +0000 (2013-06-02)
parents 438b7a480f9e
children 874b0d62ff7e
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 }
65 # Get X11 locale
66 get_x11_locale()
67 {
68 mkdir -p $fs/usr/share/X11/locale
69 cp -a $WOK/xorg-libX11/install/usr/share/X11/locale/$LOCALEDEF.$CHARMAP \
70 $fs/usr/share/X11/locale
71 }