You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
857 B
29 lines
857 B
#!/bin/sh |
|
# |
|
# Get ISO codes from the iso-codes package and extract translations |
|
# |
|
rm -rf debian/iso-codes || true |
|
mkdir debian/iso-codes |
|
|
|
echo "Grabbing ISO-639-2 languages names:" |
|
for i in `find /usr/share/locale/ -name iso_639-2.mo` ; do |
|
language=`echo $i | cut -f5 -d/` |
|
echo -n "$language"... |
|
# If a file exists in iso-codes.updated, then use it |
|
# else extract translations from the iso-codes package |
|
if [ ! -f iso-codes.updates/$language.po ] ; then |
|
msgunfmt $i >debian/iso-codes/${language}.po |
|
else |
|
cp iso-codes.updates/$language.po debian/iso-codes |
|
fi |
|
echo " done." |
|
done |
|
|
|
for i in `find iso-codes.updates -name \*.po -maxdepth 1 2>/dev/null` ; do |
|
if [ ! -f debian/iso-codes/`basename $i` ] ; then |
|
cp $i debian/iso-codes |
|
fi |
|
done |
|
|
|
# Delete all files of size 0. |
|
find debian/iso-codes -size 0 | xargs --no-run-if-empty rm
|
|
|