39 |
|
|
40 |
cd /var/lib/pootle/tmp |
cd /var/lib/pootle/tmp |
41 |
|
|
42 |
|
# Sync database stores to filesystem |
43 |
|
django-admin sync_stores --settings=pootle.settings &> /dev/null |
44 |
|
|
45 |
for ver in sme7 sme8 |
for ver in sme7 sme8 |
46 |
do |
do |
47 |
# Update anaconda template |
# Update anaconda template |
128 |
|
|
129 |
#========================================================== |
#========================================================== |
130 |
|
|
131 |
|
# Sync filesystem to database stores |
132 |
|
django-admin update_stores --settings=pootle.settings &> /dev/null |
133 |
|
|
134 |
# Recalculate stats and restart server |
# Recalculate stats and restart server |
135 |
/usr/sbin/PootleServer --refreshstats &> /dev/null |
django-admin refresh_stats --settings=pootle.settings &> /dev/null |
136 |
|
|
137 |
#========================================================== |
#========================================================== |
138 |
|
|
144 |
| msgattrib --only-fuzzy \ |
| msgattrib --only-fuzzy \ |
145 |
| sed '0,/^$/d;/^#~/d' \ |
| sed '0,/^$/d;/^#~/d' \ |
146 |
| sed ':a;/^\n*$/{$d;N;ba;}' \ |
| sed ':a;/^\n*$/{$d;N;ba;}' \ |
147 |
> errors-$lang.po |
> errors-$lang.err |
148 |
chmod 644 errors-$lang.po |
chmod 644 errors-$lang.err |
149 |
diffmv errors-$lang.po /var/www/html/errors/errors-$lang.po |
diffmv errors-$lang.err /var/www/html/errors/errors-$lang.err |
150 |
done |
done |
151 |
|
|
152 |
# Build diffs for languages |
# Build diffs for languages |
171 |
do |
do |
172 |
for lang in $(ls -I templates /var/lib/pootle/po/$ver/ 2> /dev/null | grep '[[:alpha:]]$' | sort -u) |
for lang in $(ls -I templates /var/lib/pootle/po/$ver/ 2> /dev/null | grep '[[:alpha:]]$' | sort -u) |
173 |
do |
do |
174 |
mkdir -p diff/$ver/${pkgname}.update/po/$lang |
if [ -f "/var/lib/pootle/po/$ver/$lang/${pkg}.po" ] |
175 |
msgcat -F --no-wrap /var/lib/pootle/po/$ver/$lang/${pkg}.po \ |
then |
176 |
| grep -v 'Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
mkdir -p diff/$ver/${pkgname}.update/po/$lang |
177 |
| sed '0,/msgid ""/{/^#/d};/^#,/d;s@^\(#: \)[^/]\+/root@\1root@' \ |
msgcat -F --no-wrap /var/lib/pootle/po/$ver/$lang/${pkg}.po \ |
178 |
> diff/$ver/${pkgname}.update/po/$lang/${pkg/backup-console/backup}.po |
| grep -v 'Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
179 |
|
| sed '0,/msgid ""/{/^#/d};/^#,/d;s@^\(#: \)[^/]\+/root@\1root@' \ |
180 |
|
> diff/$ver/${pkgname}.update/po/$lang/${pkg/backup-console/backup}.po |
181 |
|
fi |
182 |
done |
done |
183 |
done |
done |
184 |
fi |
fi |