67 |
diffcp /etc/pootle/templates/$(basename $pkg).pot /etc/pootle/po/sme7bp/templates/$(basename $pkg).pot |
diffcp /etc/pootle/templates/$(basename $pkg).pot /etc/pootle/po/sme7bp/templates/$(basename $pkg).pot |
68 |
done |
done |
69 |
|
|
70 |
|
# Update sme7admin templates |
71 |
|
potempl /etc/pootle/cvs/smecontribs/smeserver-sme7admin/*/*/root/{etc/e-smith/web/functions/sme7admin,usr/bin/sme7admind} > sme7admin.pot |
72 |
|
diffmv sme7admin.pot /etc/pootle/po/sme7cp/templates/sme7admin.pot |
73 |
|
|
74 |
# Update contrib panel templates |
# Update contrib panel templates |
75 |
for pkg in $(find /etc/pootle/cvs/smecontribs/*/*7/*/root/etc/e-smith/locale/en-us/ -type f -print) |
for pkg in $(find /etc/pootle/cvs/smecontribs/*/*7/*/root/etc/e-smith/locale/en-us/ -type f -print) |
76 |
do |
do |
124 |
# Recalculate stats and restart server |
# Recalculate stats and restart server |
125 |
cd /etc/pootle |
cd /etc/pootle |
126 |
PootleServer --refreshstats &> /dev/null |
PootleServer --refreshstats &> /dev/null |
127 |
nohup PootleServer --servertype threaded >> /var/log/pootle.log 2>&1 & |
nohup PootleServer --prefsfile /etc/pootle/pootle.prefs >> /var/log/pootle.log 2>&1 & |
128 |
|
|
129 |
#========================================================== |
#========================================================== |
130 |
|
|
145 |
# Build console files |
# Build console files |
146 |
pkgname=$(ls -d /etc/pootle/cvs/smeserver/smeserver-locale/*7/*/root | cut -d/ -f8) |
pkgname=$(ls -d /etc/pootle/cvs/smeserver/smeserver-locale/*7/*/root | cut -d/ -f8) |
147 |
mkdir -p ${pkgname}.update/po/$lang |
mkdir -p ${pkgname}.update/po/$lang |
148 |
for pkg in $(ls /etc/pootle/po/sme7bc/templates/ | sed -n '/^anaconda.pot$/b;s@\.pot@\.po@p') |
for pkg in $(ls /etc/pootle/po/sme7bc/templates/ -I anaconda.pot | sed -n 's@\.pot@\.po@p') |
149 |
do |
do |
150 |
msgcat -F --no-wrap /etc/pootle/po/sme7bc/$lang/$pkg \ |
msgcat -F --no-wrap /etc/pootle/po/sme7bc/$lang/$pkg \ |
151 |
| grep -v 'Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
| grep -v 'Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
152 |
| sed '0,/msgid ""/{/^#/d};/^#,/d' \ |
| sed '0,/msgid ""/{/^#/d};/^#,/d' \ |
153 |
> ${pkgname}.update/po/$lang/$pkg |
> ${pkgname}.update/po/$lang/$pkg |
154 |
done |
done |
155 |
|
|
156 |
|
# Build sme7admin file |
157 |
|
pkgname=$(ls -d /etc/pootle/cvs/smecontribs/smeserver-sme7admin/*7/*/root | cut -d/ -f8) |
158 |
|
mkdir -p ${pkgname}.update/po/$lang |
159 |
|
msgcat -F --no-wrap /etc/pootle/po/sme7cp/$lang/sme7admin.po \ |
160 |
|
| grep -v 'Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
161 |
|
| sed '0,/msgid ""/{/^#/d};/^#,/d' \ |
162 |
|
> ${pkgname}.update/po/$lang/sme7admin.po |
163 |
done |
done |
164 |
|
|
165 |
# Build translated xml files |
# Build translated xml files |
166 |
for pkg in $(ls /etc/pootle/po/sme7*p/templates/ | sed -n 's@\.pot@@p') |
for pkg in $(ls /etc/pootle/po/sme7*p/templates/ -I sme7admin.pot | sed -n 's@\.pot@@p') |
167 |
do |
do |
168 |
pkgname=$(find /etc/pootle/cvs/smecontribs/*/*7/*/root/etc/e-smith/locale/en-us -name $pkg | cut -d/ -f8) |
pkgname=$(find /etc/pootle/cvs/smecontribs/*/*7/*/root/etc/e-smith/locale/en-us -name $pkg | cut -d/ -f8) |
169 |
if [ -z "$pkgname" ] |
if [ -z "$pkgname" ] |
192 |
for pkg in $(ls -d *.update | sed 's@.update$@@') |
for pkg in $(ls -d *.update | sed 's@.update$@@') |
193 |
do |
do |
194 |
orig=/etc/pootle/cvs/sme*/*/*7/$pkg/root/etc/e-smith/locale |
orig=/etc/pootle/cvs/sme*/*/*7/$pkg/root/etc/e-smith/locale |
195 |
rm /var/www/html/patches/$(echo $pkg | sed 's/-[^-]\+$//')-*-locale-*.patch |
rm -f /var/www/html/patches/$(echo $pkg | sed 's/-[^-]\+$//')-*-locale-*.patch |
196 |
diff -ruN $orig $pkg.update/root/etc/e-smith/locale \ |
diff -ruN $orig $pkg.update/root/etc/e-smith/locale \ |
197 |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@;/^diff -ruN/d' \ |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@;/^diff -ruN/d' \ |
198 |
> /var/www/html/patches/$pkg-locale-$(date +%F).patch |
> /var/www/html/patches/$pkg-locale-$(date +%F).patch |
201 |
# Build console diffs |
# Build console diffs |
202 |
pkg=$(ls -d smeserver-locale-* | sed 's@.update$@@') |
pkg=$(ls -d smeserver-locale-* | sed 's@.update$@@') |
203 |
orig=/etc/pootle/cvs/smeserver/smeserver-locale/*7/$pkg/po |
orig=/etc/pootle/cvs/smeserver/smeserver-locale/*7/$pkg/po |
|
rm /var/www/html/patches/$(echo $pkg | sed 's/-[^-]\+$//')-*-locale-*.patch |
|
204 |
diff -ruN $orig $pkg.update/po \ |
diff -ruN $orig $pkg.update/po \ |
205 |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
206 |
>> /var/www/html/patches/$pkg-locale-$(date +%F).patch |
>> /var/www/html/patches/$pkg-locale-$(date +%F).patch |