diff --git a/BUILD/PKGBUILD b/BUILD/PKGBUILD index cff1dee..e6ef9ae 100644 --- a/BUILD/PKGBUILD +++ b/BUILD/PKGBUILD @@ -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 } diff --git a/launch.sh b/launch.sh index 5236a2f..1136588 100644 --- a/launch.sh +++ b/launch.sh @@ -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