slitaz-tools diff tinyutils/tazlocale @ rev 943
Move translations to use '%s'. Fix subox icon and allow it to work with spaces in the path.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jun 04 17:11:36 2015 +0300 (2015-06-04) |
parents | 5d80f6fdbdb7 |
children | 3e742c2981ea |
line diff
1.1 --- a/tinyutils/tazlocale Fri Apr 17 07:35:02 2015 +0300 1.2 +++ b/tinyutils/tazlocale Thu Jun 04 17:11:36 2015 +0300 1.3 @@ -58,7 +58,7 @@ 1.4 link_language_files() { 1.5 . /etc/locale.conf 1.6 LANGUAGE=${LANG%_*} 1.7 - [ "$LANG" == "POSIX" ] && LANGUAGE="en" 1.8 + [ "$LANG" == 'POSIX' ] && LANGUAGE='en' 1.9 1.10 # Openbox menu 1.11 make_i18n_link /etc/xdg/openbox/menu.%%.xml 1.12 @@ -110,7 +110,7 @@ 1.13 1.14 system_config() { 1.15 export LC_ALL=$locale 1.16 - _n "Setting system locale to: $locale" 1.17 + _n 'Setting system locale to: %s' "$locale" 1.18 echo -e "LANG=$locale\nLC_ALL=$locale" > /etc/locale.conf 1.19 status 1.20 gen_utf8_locale 1.21 @@ -135,9 +135,9 @@ 1.22 1|255) exit 0 ;; 1.23 esac 1.24 1.25 - # Default: POSIX = English 1.26 - [ "$locale" = "en" ] && locale="en_US" 1.27 - [ -s /etc/locale.conf ] && RECONFIG="yes" 1.28 + # Default: POSIX => English 1.29 + [ "$locale" = 'en' ] && locale='en_US' 1.30 + [ -s /etc/locale.conf ] && RECONFIG='yes' 1.31 1.32 # If it's a reconfiguration give an info message. 1.33 if [ -n "$RECONFIG" ]; then 1.34 @@ -153,9 +153,8 @@ 1.35 --help|-h) 1.36 usage ;; 1.37 info) 1.38 - optlist "\ 1.39 -$(_ 'Config file:') /etc/locale.conf 1.40 -$(_ 'Current locale:') $LANG" 1.41 + _ 'Config file: %s' '/etc/locale.conf' 1.42 + _ 'Current locale: %s' "$LANG" 1.43 ;; 1.44 list) 1.45 list=