slitaz-configs rev 312

Make Openbox menu translated again.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Sep 27 15:17:39 2017 +0300 (22 months ago)
parents 47f6bed040f7
children 81166740b29b
files Makefile ob-menu/menu.xml.in
line diff
     1.1 --- a/Makefile	Wed Sep 27 08:48:02 2017 +0200
     1.2 +++ b/Makefile	Wed Sep 27 15:17:39 2017 +0300
     1.3 @@ -28,13 +28,13 @@
     1.4  menu:
     1.5  	@for l in $(LINGUAS); do \
     1.6  		echo "Formatting $$l messages..."; \
     1.7 -		mkdir -p po/mo/$$l/LC_MESSAGES; \
     1.8 -		msgfmt -o po/mo/$$l/LC_MESSAGES/$(DOMAIN).mo po/$$l.po; \
     1.9 +		mkdir -p  /usr/share/locale/$$l/LC_MESSAGES; \
    1.10 +		msgfmt -o /usr/share/locale/$$l/LC_MESSAGES/$(DOMAIN).mo po/$$l.po; \
    1.11  	done; \
    1.12  	mkdir -p $(DESTDIR)/etc/xdg/openbox; \
    1.13  	for l in en $(LINGUAS); do \
    1.14  		echo "Processing $$l menu..."; \
    1.15 -		./ob-menu/menu.xml.in $$l `pwd`/po/mo > \
    1.16 +		./ob-menu/menu.xml.in $$l > \
    1.17  		$(DESTDIR)/etc/xdg/openbox/menu.$$l.xml; \
    1.18  	done;
    1.19  
     2.1 --- a/ob-menu/menu.xml.in	Wed Sep 27 08:48:02 2017 +0200
     2.2 +++ b/ob-menu/menu.xml.in	Wed Sep 27 15:17:39 2017 +0300
     2.3 @@ -1,25 +1,23 @@
     2.4  # don't forget to add "locale-**" as BUILD_DEPENDS to slitaz-configs receipt
     2.5  # in case of adding new menu languages
     2.6  case $1 in
     2.7 -	en) L=C ;;
     2.8 -	fr) L=fr_FR ;;
     2.9 -	hu) L=hu_HU ;;
    2.10 -	ja) L=ja_JP ;;
    2.11 -	pt|pt_BR) L=pt_BR ;;
    2.12 -	ru) L=ru_RU ;;
    2.13 -	zh_CN) L=zh_CN ;;
    2.14 +	de) L='de_DE';;
    2.15 +	en) L='en_US';;
    2.16 +	fr) L='fr_FR';;
    2.17 +	hu) L='hu_HU';;
    2.18 +	ja) L='ja_JP';;
    2.19 +	pt|pt_BR) L='pt_BR';;
    2.20 +	ru) L='ru_RU';;
    2.21 +	zh_CN) L='zh_CN';;
    2.22  esac
    2.23  
    2.24 -if [ $L != C ]; then
    2.25 -	mkdir -p /usr/lib/locale/$L.UTF-8
    2.26 -	localedef -i $L -c -f UTF-8 /usr/lib/locale/$L.UTF-8
    2.27 -fi
    2.28 +mkdir -p "/usr/lib/locale/$L.UTF-8"
    2.29 +localedef -i "$L" -c -f 'UTF-8' "/usr/lib/locale/$L.UTF-8"
    2.30  
    2.31 -export LANG=$L LC_ALL=$L TEXTDOMAINDIR=$2 TEXTDOMAIN=slitaz-ob-menu
    2.32 +export LC_ALL="$L.UTF-8" TEXTDOMAIN='slitaz-ob-menu'
    2.33  
    2.34 -cat << EOT
    2.35 +cat <<EOT
    2.36  <?xml version="1.0" encoding="UTF-8"?>
    2.37 -
    2.38  <openbox_menu xmlns="http://openbox.org/3.4/menu">
    2.39  
    2.40  <!-- Favorite applications -->