Simplify locales installation

This commit is contained in:
Hugo Posnic
2016-12-18 22:55:41 +01:00
parent c52c9df6db
commit 177e1e356d
2 changed files with 7 additions and 13 deletions
+4 -7
View File
@@ -28,12 +28,9 @@ package() {
install -D -m644 ${_pkgname}.desktop ${pkgdir}/etc/skel/.config/autostart/${_pkgname}.desktop install -D -m644 ${_pkgname}.desktop ${pkgdir}/etc/skel/.config/autostart/${_pkgname}.desktop
install -D -m644 ${_pkgname}.desktop ${pkgdir}/usr/share/applications/${_pkgname}.desktop install -D -m644 ${_pkgname}.desktop ${pkgdir}/usr/share/applications/${_pkgname}.desktop
install -D -m755 "src/manjaro_hello.py" "${pkgdir}/usr/bin/${_pkgname}" install -D -m755 "src/manjaro_hello.py" "${pkgdir}/usr/bin/${_pkgname}"
cd "po" cd po
for lang in $(ls -1 | sed -e 's/\..*$//'); do for lang in $(ls *.po); do
if [ ${lang} != ${_pkgname} ] install -d -m755 ${pkgdir}/usr/share/locale/${lang::-3}/LC_MESSAGES
then msgfmt -c -o "${pkgdir}/usr/share/locale/${lang::-3}/LC_MESSAGES/${_pkgname}.mo" ${lang}
install -d -m755 ${pkgdir}/usr/share/locale/${lang}/LC_MESSAGES
msgfmt -c -o "${pkgdir}/usr/share/locale/${lang}/LC_MESSAGES/${_pkgname}.mo" ${lang}.po
fi
done done
} }
+3 -6
View File
@@ -4,12 +4,9 @@
rm -rf locale rm -rf locale
mkdir locale mkdir locale
cd po cd po
for lang in $(ls -1 | sed -e 's/\..*$//'); do for lang in $(ls *.po); do
if [ $lang != "manjaro-hello" ] mkdir -p ../locale/${lang::-3}/LC_MESSAGES
then msgfmt -c -o ../locale/${lang::-3}/LC_MESSAGES/manjaro-hello.mo $lang
mkdir -p ../locale/$lang/LC_MESSAGES
msgfmt -c -o ../locale/$lang/LC_MESSAGES/manjaro-hello.mo $lang.po
fi
done done
cd .. cd ..
python src/manjaro_hello.py python src/manjaro_hello.py