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

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}/usr/share/applications/${_pkgname}.desktop
install -D -m755 "src/manjaro_hello.py" "${pkgdir}/usr/bin/${_pkgname}"
cd "po"
for lang in $(ls -1 | sed -e 's/\..*$//'); do
if [ ${lang} != ${_pkgname} ]
then
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
cd po
for lang in $(ls *.po); do
install -d -m755 ${pkgdir}/usr/share/locale/${lang::-3}/LC_MESSAGES
msgfmt -c -o "${pkgdir}/usr/share/locale/${lang::-3}/LC_MESSAGES/${_pkgname}.mo" ${lang}
done
}

View File

@ -4,12 +4,9 @@
rm -rf locale
mkdir locale
cd po
for lang in $(ls -1 | sed -e 's/\..*$//'); do
if [ $lang != "manjaro-hello" ]
then
mkdir -p ../locale/$lang/LC_MESSAGES
msgfmt -c -o ../locale/$lang/LC_MESSAGES/manjaro-hello.mo $lang.po
fi
for lang in $(ls *.po); do
mkdir -p ../locale/${lang::-3}/LC_MESSAGES
msgfmt -c -o ../locale/${lang::-3}/LC_MESSAGES/manjaro-hello.mo $lang
done
cd ..
python src/manjaro_hello.py