Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/misc/pootle.cron
blob: 9e0c707dd55e38b8f5517bb984ea16f4bc3089dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

if [ $(whoami) = "root" ]; then
    echo "$0 should not be run by root user"
    exit 1
fi

cd "/var/lib/pootle"

HELPERS="maintenance/helpers"

echo "-- Support old .po filenames to make pack_generator.py happy"
for lang_dir in `ls -d translations/*/*`; do
        if [ -e $lang_dir/TamTamSuite.po ]; then
                ln -fs TamTamSuite.po $lang_dir/TamTamEdit.activity.po
                ln -fs TamTamSuite.po $lang_dir/TamTamJam.activity.po
                ln -fs TamTamSuite.po $lang_dir/TamTamMini.activity.po
                ln -fs TamTamSuite.po $lang_dir/TamTamSynthLab.activity.po
        fi
        if [ -e $lang_dir/distance.po ]; then
                ln -fs distance.po $lang_dir/acoustic-measure-activity.po
        fi
done

echo "-- If one particular msgid contains too big value (e.g., 3MB),"
echo "-- it will cause Pootle to hang for reasonanble time eating much CPU."
echo "-- So, lets see all >1MB .po files to analyze."
find translations/ -name '*.po*' -size +1M -exec ls -al {} \;

echo "-- check_bad_ownership.sh"
$HELPERS/potupdater/check_bad_ownership.sh
test $? -eq 0 || echo "-- ERROR"

echo "-- Generate .pot files"
python $HELPERS/potupdater/pogenerator.py $HELPERS/potupdater/project_list.ini $PWD/translations
test $? -eq 0 || echo "-- ERROR"

echo "-- Generate status page"
python $HELPERS/misc/check_pendings_commits.py
test $? -eq 0 || echo "-- ERROR"

echo "-- Generate langpacks"
python langpackgen/src/LangPackGen/pack_generator.py langpackgen/data/langpackgen_84.ini public_html/packs/0.84
test $? -eq 0 || echo "-- ERROR"