slitaz-tools diff tinyutils/tazkeymap @ rev 813
Current state, features stabilized and open for bugfixes and translations.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Sep 09 03:27:04 2013 +0300 (2013-09-09) |
parents | 494b03aad433 |
children | c79e656b37a5 |
line diff
1.1 --- a/tinyutils/tazkeymap Mon Apr 30 14:12:13 2012 +0200 1.2 +++ b/tinyutils/tazkeymap Mon Sep 09 03:27:04 2013 +0300 1.3 @@ -3,23 +3,18 @@ 1.4 # Tazkeymap - SliTaz GNU/Linux keymap config using loadkeys and dialog boxes. 1.5 # Configuration file is: /etc/keymap.conf 1.6 # 1.7 -# Copyright (C) 2008-2012 SliTaz GNU/Linux - BSD License 1.8 +# Copyright (C) 2008-2013 SliTaz GNU/Linux - BSD License 1.9 # 1.10 # Author: Christophe Lincoln <pankso@slitaz.org> 1.11 # 1.12 . /lib/libtaz.sh 1.13 - 1.14 -# Internationalization 1.15 -. /usr/bin/gettext.sh 1.16 -TEXTDOMAIN='slitaz-tools' 1.17 -export TEXTDOMAIN 1.18 +export TEXTDOMAIN='slitaz-tools' #i18n 1.19 1.20 # List all keymaps. 1.21 list_keymaps() { 1.22 cd /usr/share/kbd/keymaps/i386 1.23 # We first need a list to sort and then use \n for Yad list. 1.24 - for i in $(find *rty *rtz dvorak -name *.map.gz) 1.25 - do 1.26 + for i in $(find *rty *rtz dvorak -name *.map.gz); do 1.27 keymap=$(basename $i) 1.28 type=$(dirname $i) 1.29 echo "${keymap%.map.gz} $type" 1.30 @@ -44,8 +39,8 @@ 1.31 1.32 case "$1" in 1.33 info) 1.34 - gettext "Config file :"; echo " /etc/keymap.conf" 1.35 - gettext "Current keymap:"; echo " $(cat /etc/keymap.conf)" ;; 1.36 + _n 'Config file:'; echo " /etc/keymap.conf" 1.37 + _n 'Current keymap:'; echo " $(cat /etc/keymap.conf)" ;; 1.38 list) 1.39 list_keymaps | sort ;; 1.40 "") 1.41 @@ -54,7 +49,7 @@ 1.42 check_root 1.43 exec 3>&1 1.44 value=$($DIALOG --clear \ 1.45 - --title " $(gettext "SliTaz keymap configuration") " \ 1.46 + --title " $(_n 'SliTaz keymap configuration') " \ 1.47 --menu "" 15 70 5 \ 1.48 $(list_keymaps | sort) \ 1.49 2>&1 1>&3) 1.50 @@ -66,9 +61,8 @@ 1.51 esac 1.52 # If it's a reconfiguration give an info message. 1.53 if [ -s /etc/keymap.conf ]; then 1.54 - msg=$(gettext "\ 1.55 -Please logout of your current session and login again to use new keyboard.") 1.56 - $DIALOG --clear --title " Information " --msgbox "$msg" 16 70 1.57 + $DIALOG --clear --title " $(_n 'Information') " \ 1.58 + --msgbox "$(_n 'Please logout of your current session and login again to use new keyboard.')" 16 70 1.59 fi 1.60 kmap=$value 1.61 system_config