81 |
do |
do |
82 |
# Create error compendium to assist translators |
# Create error compendium to assist translators |
83 |
pocompendium -e errors-$lang.po -d /etc/pootle/po/sme*/$lang |
pocompendium -e errors-$lang.po -d /etc/pootle/po/sme*/$lang |
84 |
sed -i '0,/^$/d' errors-$lang.po |
sed -i '0,/^$/d;/^#~/d' errors-$lang.po |
85 |
|
sed -i ':a;/^\n*$/{$d;N;ba;}' errors-$lang.po |
86 |
chmod 644 errors-$lang.po |
chmod 644 errors-$lang.po |
87 |
diffmv errors-$lang.po /var/www/html/errors/errors-$lang.po |
diffmv errors-$lang.po /var/www/html/errors/errors-$lang.po |
88 |
|
|
141 |
# Build console files |
# Build console files |
142 |
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) |
143 |
mkdir -p ${pkgname}.update/po/$lang |
mkdir -p ${pkgname}.update/po/$lang |
144 |
for pkg in $(ls /etc/pootle/po/sme7bc/templates/ -I anaconda.pot | sed 's@\.pot@\.po@') |
for pkg in $(ls /etc/pootle/po/sme7bc/templates/ | sed -n 's@\.pot@\.po@p') |
145 |
do |
do |
146 |
msgcat -F --no-wrap /etc/pootle/po/sme7bc/$lang/$pkg \ |
msgcat -F --no-wrap /etc/pootle/po/sme7bc/$lang/$pkg \ |
147 |
| 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' \ |
194 |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
195 |
>> /var/www/html/patches/$pkg-locale-$(date +%F).patch |
>> /var/www/html/patches/$pkg-locale-$(date +%F).patch |
196 |
|
|
|
## cd /etc/pootle/tmp |
|
|
## |
|
|
## # Build diffs for languages |
|
|
## rm -f /var/www/html/patches/smeserver-locale-all-*.patch /var/www/html/patches/contribs/* |
|
|
## for lang in $(ls /etc/pootle/po/sme7bp -I templates) |
|
|
## do |
|
|
## # Remove previous patches |
|
|
## rm -f /var/www/html/patches/smeserver-locale-$lang-*.patch |
|
|
## |
|
|
## # Build anaconda files |
|
|
## mkdir -p /var/www/html/anaconda/sme7/$lang/LC_MESSAGES |
|
|
## anacondagen sme7 $lang > /var/www/html/anaconda/sme7/$lang/LC_MESSAGES/anaconda.mo |
|
|
## [ -s /var/www/html/anaconda/sme7/$lang/LC_MESSAGES/anaconda.mo ] || rm -rf /var/www/html/anaconda/sme7/$lang |
|
|
## |
|
|
## mkdir -p /var/www/html/anaconda/sme8/$lang/LC_MESSAGES |
|
|
## anacondagen sme8 $lang > /var/www/html/anaconda/sme8/$lang/LC_MESSAGES/anaconda.mo |
|
|
## [ -s /var/www/html/anaconda/sme8/$lang/LC_MESSAGES/anaconda.mo ] || rm -rf /var/www/html/anaconda/sme8/$lang |
|
|
## |
|
|
## # Build console diffs |
|
|
## mkdir -p pootleupdate/po/$lang |
|
|
## for pkg in $(ls /etc/pootle/po/sme7bc/templates/ -I anaconda.pot | sed 's@\.pot@\.po@') |
|
|
## do |
|
|
## msgcat -F --no-wrap /etc/pootle/po/sme7bc/$lang/$pkg \ |
|
|
## | grep -v 'Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|X-Generator' \ |
|
|
## | sed '0,/msgid ""/{/^#/d}' \ |
|
|
## > pootleupdate/po/$lang/$pkg |
|
|
## if [ -f /etc/pootle/cvs/smeserver/smeserver-locale/*/*/po/$lang/$pkg ] |
|
|
## then |
|
|
## diff -u /etc/pootle/cvs/smeserver/smeserver-locale/*/*/po/$lang/$pkg pootleupdate/po/$lang/$pkg \ |
|
|
## | sed 's@/etc/pootle/cvs/smeserver/smeserver-locale/@@' \ |
|
|
## >> /var/www/html/patches/smeserver-locale-$lang-$(date +%F).patch |
|
|
## else |
|
|
## diff -u /dev/null pootleupdate/po/$lang/$pkg >> /var/www/html/patches/smeserver-locale-$lang-$(date +%F).patch |
|
|
## fi |
|
|
## done |
|
|
## |
|
|
## # Build panel diffs |
|
|
## mkdir -p pootleupdate/{$(localedir $lang general),$(localedir $lang userpassword),$(localedir $lang other)} |
|
|
## for pkg in $(ls /etc/pootle/po/sme7bp/templates/ | sed 's@\.pot@@') |
|
|
## do |
|
|
## match=$(find /etc/pootle/cvs/smeserver/ -type f -regex ".*/e-smith/locale/$lang/.*/$pkg") |
|
|
## xmlgen /etc/pootle/po/sme7bp/$lang/$pkg.po > pootleupdate/$(localedir $lang $pkg)/$pkg |
|
|
## diff -u ${match:-/dev/null} pootleupdate/$(localedir $lang $pkg)/$pkg \ |
|
|
## | sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@' \ |
|
|
## >> /var/www/html/patches/smeserver-locale-$lang-$(date +%F).patch |
|
|
## done |
|
|
## |
|
|
## # Build contrib diffs |
|
|
## for pkg in $(ls /etc/pootle/po/sme7cp/templates/ | sed 's@\.pot@@') |
|
|
## do |
|
|
## match=$(find /etc/pootle/cvs/smecontribs/ -type f -regex ".*/e-smith/locale/$lang/.*/$pkg") |
|
|
## pkgname=$(find /etc/pootle/cvs/smecontribs/ -type f -regex ".*/e-smith/locale/en-us/.*/$pkg" | sed 's@.*/\([^/]\+\)/root/.*@\1@') |
|
|
## if [ ! -z "$pkgname" ] |
|
|
## then |
|
|
## xmlgen /etc/pootle/po/sme7cp/$lang/$pkg.po > pootleupdate/$(localedir $lang $pkg)/$pkg |
|
|
## diff -u ${match:-/dev/null} pootleupdate/$(localedir $lang $pkg)/$pkg \ |
|
|
## | sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@' \ |
|
|
## >> /var/www/html/patches/contribs/$pkgname-locale-$(date +%F).patch |
|
|
## fi |
|
|
## done |
|
|
## done |
|
|
## cat /var/www/html/patches/smeserver-locale-*-$(date +%F).patch > /var/www/html/patches/smeserver-locale-all-$(date +%F).patch |
|