slitaz-tools rev 961
tazlocale: accept only existing locales, show locale description; translations: un-fuzzy already translated messages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Nov 25 23:50:30 2015 +0200 (2015-11-25) |
parents | f29d39a9b6f7 |
children | 0f57e55885af |
files | po/tazbox/el.po po/tazbox/es.po po/tazbox/fa.po po/tazbox/fr.po po/tazbox/pl.po po/tazbox/pt_BR.po po/tazbox/ru.po po/tazbox/sv.po tinyutils/tazlocale |
line diff
1.1 --- a/po/tazbox/el.po Tue Nov 17 17:19:20 2015 +0200 1.2 +++ b/po/tazbox/el.po Wed Nov 25 23:50:30 2015 +0200 1.3 @@ -26,7 +26,7 @@ 1.4 1.5 #: tazbox/tazbox:31 1.6 msgid "command" 1.7 -msgstr "" 1.8 +msgstr "εντολή" 1.9 1.10 #: tazbox/tazbox:33 1.11 msgid "Commands:" 1.12 @@ -113,7 +113,7 @@ 1.13 1.14 #: tazbox/tazbox:88 1.15 msgid "CANCEL" 1.16 -msgstr "" 1.17 +msgstr "ΜΑΤΑΊΩΣΗ" 1.18 1.19 #: tazbox/tazbox:95 1.20 msgid "TazBox Output" 1.21 @@ -124,7 +124,6 @@ 1.22 msgstr "Αποσύνδεση από το SliTaz" 1.23 1.24 #: tazbox/tazbox:110 1.25 -#, fuzzy 1.26 msgid "SliTaz Logout - Please choose an action:" 1.27 msgstr "Παρακαλώ, επιλέξτε μια ενέργεια:" 1.28 1.29 @@ -145,11 +144,10 @@ 1.30 msgstr "Αρχικές ρυθμίσεις του SliTaz" 1.31 1.32 #: tazbox/tazbox:137 1.33 -#, fuzzy 1.34 msgid "" 1.35 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 1.36 msgstr "" 1.37 -"Εδώ, μπορείτε να ορίσετε τις προτιμήσεις σας\\nγια το <b>locale, το keymap " 1.38 +"Εδώ, μπορείτε να ορίσετε τις προτιμήσεις σας \\n για το <b>locale, το keymap " 1.39 "και τη ζώνη ώρας</b>." 1.40 1.41 #: tazbox/tazbox:139
2.1 --- a/po/tazbox/es.po Tue Nov 17 17:19:20 2015 +0200 2.2 +++ b/po/tazbox/es.po Wed Nov 25 23:50:30 2015 +0200 2.3 @@ -74,9 +74,8 @@ 2.4 msgstr "Crea nuevo fichero o carpeta en el escritorio" 2.5 2.6 #: tazbox/tazbox:45 2.7 -#, fuzzy 2.8 msgid "Display icons of all installed applications" 2.9 -msgstr "Mostrar íconos de todas las aplicaciónes instaladas." 2.10 +msgstr "Mostrar íconos de todas las aplicaciónes instaladas" 2.11 2.12 #: tazbox/tazbox:46 2.13 msgid "Notify user with a desktop centered box" 2.14 @@ -123,7 +122,6 @@ 2.15 msgstr "Salir de SliTaz" 2.16 2.17 #: tazbox/tazbox:110 2.18 -#, fuzzy 2.19 msgid "SliTaz Logout - Please choose an action:" 2.20 msgstr "Por favor seleccione una acción:" 2.21 2.22 @@ -144,12 +142,11 @@ 2.23 msgstr "Configuración inicial de SliTaz" 2.24 2.25 #: tazbox/tazbox:137 2.26 -#, fuzzy 2.27 msgid "" 2.28 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 2.29 msgstr "" 2.30 "Aquí puede configurar sus preferencias \\n for <b>localización, teclado, zona " 2.31 -"horaria</b>" 2.32 +"horaria</b>." 2.33 2.34 #: tazbox/tazbox:139 2.35 msgid "Locale" 2.36 @@ -173,7 +170,7 @@ 2.37 2.38 #: tazbox/tazbox:170 2.39 msgid "Tip: manage locales list by installing/removing locale packages." 2.40 -msgstr "Consejo: maneje listas de localización (des)instalando paquetes de locale" 2.41 +msgstr "Consejo: maneje listas de localización (des)instalando paquetes de locale." 2.42 2.43 #: tazbox/tazbox:171 tazbox/tazbox:279 2.44 msgid "Flag" 2.45 @@ -213,7 +210,7 @@ 2.46 2.47 #: tazbox/tazbox:247 2.48 msgid "Suggested location:" 2.49 -msgstr "Ubicación sugerida" 2.50 +msgstr "Ubicación sugerida:" 2.51 2.52 #: tazbox/tazbox:248 2.53 msgid "Are you agreed?" 2.54 @@ -229,7 +226,7 @@ 2.55 2.56 #: tazbox/tazbox:277 2.57 msgid "Tip: manage timezones list by installing/removing locale packages." 2.58 -msgstr "Consejo: maneje zonas horarias (des)instalando paquetes de locale" 2.59 +msgstr "Consejo: maneje zonas horarias (des)instalando paquetes de locale." 2.60 2.61 #: tazbox/tazbox:279 2.62 msgid "Code" 2.63 @@ -293,7 +290,7 @@ 2.64 2.65 #: tazbox/tazbox:445 2.66 msgid "Install/Remove" 2.67 -msgstr "(des)instalar" 2.68 +msgstr "(Des)instalar" 2.69 2.70 #: tazbox/tazbox:461 2.71 msgid "TazPkg log" 2.72 @@ -353,20 +350,20 @@ 2.73 2.74 #: tazbox/tazbox:646 2.75 msgid "File manager:" 2.76 -msgstr "Administrador de ficheros" 2.77 +msgstr "Administrador de ficheros:" 2.78 2.79 #: tazbox/tazbox:647 2.80 msgid "Web browser:" 2.81 -msgstr "Navegador Web" 2.82 +msgstr "Navegador Web:" 2.83 2.84 #: tazbox/tazbox:648 2.85 msgid "Text editor:" 2.86 -msgstr "Editor de texto" 2.87 +msgstr "Editor de texto:" 2.88 2.89 #: tazbox/tazbox:649 2.90 msgid "Terminal:" 2.91 -msgstr "Terminal" 2.92 +msgstr "Terminal:" 2.93 2.94 #: tazbox/tazbox:650 2.95 msgid "Window manager:" 2.96 -msgstr "Administrador de ventanas" 2.97 +msgstr "Administrador de ventanas:"
3.1 --- a/po/tazbox/fa.po Tue Nov 17 17:19:20 2015 +0200 3.2 +++ b/po/tazbox/fa.po Wed Nov 25 23:50:30 2015 +0200 3.3 @@ -124,7 +124,7 @@ 3.4 3.5 #: tazbox/tazbox:110 3.6 msgid "SliTaz Logout - Please choose an action:" 3.7 -msgstr " :- لطفا یک عملیات را انتخاب کنید SliTaz خروج از سیست" 3.8 +msgstr ": لطفا یک عملیات را انتخاب کنید SliTaz خروج از سیست" 3.9 3.10 #: tazbox/tazbox:112 3.11 msgid "Close X session" 3.12 @@ -146,8 +146,8 @@ 3.13 msgid "" 3.14 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 3.15 msgstr "" 3.16 -"اینجا میتوانید تنظیمات را انجام دهید\\n</b>منطقه، حالت صفحه کلید و منطقه " 3.17 -"زمانی<b>برای" 3.18 +"اینجا میتوانید تنظیمات را انجام دهید منطقه، حالت صفحه کلید و منطقه " 3.19 +"زمانی برای" 3.20 3.21 #: tazbox/tazbox:139 3.22 msgid "Locale"
4.1 --- a/po/tazbox/fr.po Tue Nov 17 17:19:20 2015 +0200 4.2 +++ b/po/tazbox/fr.po Wed Nov 25 23:50:30 2015 +0200 4.3 @@ -23,7 +23,7 @@ 4.4 4.5 #: tazbox/tazbox:30 4.6 msgid "Usage:" 4.7 -msgstr "Utilisation:" 4.8 +msgstr "Utilisation :" 4.9 4.10 #: tazbox/tazbox:31 4.11 msgid "command" 4.12 @@ -31,7 +31,7 @@ 4.13 4.14 #: tazbox/tazbox:33 4.15 msgid "Commands:" 4.16 -msgstr "Commandes:" 4.17 +msgstr "Commandes :" 4.18 4.19 #: tazbox/tazbox:35 4.20 msgid "Display this short help usage" 4.21 @@ -86,17 +86,16 @@ 4.22 msgstr "Configure les applications SliTaz par défaut" 4.23 4.24 #: tazbox/tazbox:66 4.25 -#, fuzzy 4.26 msgid "SliTaz admin password" 4.27 msgstr "Mot de passe administrateur" 4.28 4.29 #: tazbox/tazbox:69 4.30 msgid "Please enter root password (default root) to execute:" 4.31 -msgstr "Veuillez entre le mot de passe root (defaut root) pour exécuter:" 4.32 +msgstr "Veuillez entre le mot de passe root (defaut root) pour exécuter :" 4.33 4.34 #: tazbox/tazbox:72 4.35 msgid "Password:" 4.36 -msgstr "Mot de passe:" 4.37 +msgstr "Mot de passe :" 4.38 4.39 #: tazbox/tazbox:73 4.40 msgid "Autosave password" 4.41 @@ -108,7 +107,7 @@ 4.42 4.43 #: tazbox/tazbox:81 4.44 msgid "Error: wrong password!" 4.45 -msgstr "Erreur: mauvais mot de passe!" 4.46 +msgstr "Erreur: mauvais mot de passe !" 4.47 4.48 #: tazbox/tazbox:88 4.49 msgid "CANCEL" 4.50 @@ -123,9 +122,8 @@ 4.51 msgstr "Déconnexion" 4.52 4.53 #: tazbox/tazbox:110 4.54 -#, fuzzy 4.55 msgid "SliTaz Logout - Please choose an action:" 4.56 -msgstr "Veuillez choisir une action:" 4.57 +msgstr "Fermeture de SliTaz - Veuillez sélectionner votre choix :" 4.58 4.59 #: tazbox/tazbox:112 4.60 msgid "Close X session" 4.61 @@ -144,11 +142,10 @@ 4.62 msgstr "Réglages initiale de SliTaz" 4.63 4.64 #: tazbox/tazbox:137 4.65 -#, fuzzy 4.66 msgid "" 4.67 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 4.68 msgstr "" 4.69 -"Ici vous pouver régler vos préférences\\npour <b>la langue, le clavier et la " 4.70 +"Ici vous pouver régler vos préférences \\n pour <b>la langue, le clavier et la " 4.71 "zone horaire</b>" 4.72 4.73 #: tazbox/tazbox:139
5.1 --- a/po/tazbox/pl.po Tue Nov 17 17:19:20 2015 +0200 5.2 +++ b/po/tazbox/pl.po Wed Nov 25 23:50:30 2015 +0200 5.3 @@ -125,7 +125,6 @@ 5.4 msgstr "Wyloguj z SliTaz" 5.5 5.6 #: tazbox/tazbox:110 5.7 -#, fuzzy 5.8 msgid "SliTaz Logout - Please choose an action:" 5.9 msgstr "Proszę wybrać polecenie:" 5.10 5.11 @@ -146,11 +145,10 @@ 5.12 msgstr "Wstęþna Konfiguracja SliTaz" 5.13 5.14 #: tazbox/tazbox:137 5.15 -#, fuzzy 5.16 msgid "" 5.17 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 5.18 msgstr "" 5.19 -"Tu można zmienić ustawienia dla <b>języka,</b>\\n<b>układu klawiatury i " 5.20 +"Tu można zmienić ustawienia dla <b>języka,</b> \\n <b>układu klawiatury i " 5.21 "strefy czasowej</b>." 5.22 5.23 #: tazbox/tazbox:139
6.1 --- a/po/tazbox/pt_BR.po Tue Nov 17 17:19:20 2015 +0200 6.2 +++ b/po/tazbox/pt_BR.po Wed Nov 25 23:50:30 2015 +0200 6.3 @@ -75,7 +75,7 @@ 6.4 6.5 #: tazbox/tazbox:45 6.6 msgid "Display icons of all installed applications" 6.7 -msgstr "Ícones de todos os aplicativos instalados." 6.8 +msgstr "Ícones de todos os aplicativos instalados" 6.9 6.10 #: tazbox/tazbox:46 6.11 msgid "Notify user with a desktop centered box" 6.12 @@ -145,8 +145,8 @@ 6.13 msgid "" 6.14 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 6.15 msgstr "" 6.16 -"Aqui você pode definir suas preferências\\npara <b>localização, mapa de " 6.17 -"teclado e zona horária</b>" 6.18 +"Aqui você pode definir suas preferências \\n para <b>localização, mapa de " 6.19 +"teclado e zona horária</b>." 6.20 6.21 #: tazbox/tazbox:139 6.22 msgid "Locale"
7.1 --- a/po/tazbox/ru.po Tue Nov 17 17:19:20 2015 +0200 7.2 +++ b/po/tazbox/ru.po Wed Nov 25 23:50:30 2015 +0200 7.3 @@ -102,7 +102,7 @@ 7.4 7.5 #: tazbox/tazbox:72 7.6 msgid "Password:" 7.7 -msgstr "Пароль" 7.8 +msgstr "Пароль:" 7.9 7.10 #: tazbox/tazbox:73 7.11 msgid "Autosave password" 7.12 @@ -152,8 +152,8 @@ 7.13 msgid "" 7.14 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 7.15 msgstr "" 7.16 -"Здесь вы можете установить\\n<b>локаль, раскладку клавиатуры и часовой пояс</" 7.17 -"b>." 7.18 +"Здесь вы можете установить \\n <b>локаль, раскладку клавиатуры и часовой " 7.19 +"пояс</b>." 7.20 7.21 #: tazbox/tazbox:139 7.22 msgid "Locale"
8.1 --- a/po/tazbox/sv.po Tue Nov 17 17:19:20 2015 +0200 8.2 +++ b/po/tazbox/sv.po Wed Nov 25 23:50:30 2015 +0200 8.3 @@ -121,7 +121,6 @@ 8.4 msgstr "SliTaz utloggning" 8.5 8.6 #: tazbox/tazbox:110 8.7 -#, fuzzy 8.8 msgid "SliTaz Logout - Please choose an action:" 8.9 msgstr "Var god välj ett alternativ:" 8.10 8.11 @@ -142,11 +141,10 @@ 8.12 msgstr "SliTaz Första Inställning" 8.13 8.14 #: tazbox/tazbox:137 8.15 -#, fuzzy 8.16 msgid "" 8.17 "Here you can set your preferences \\n for <b>locale, keymap and timezone</b>." 8.18 msgstr "" 8.19 -"Här kan du ställa dina inställningar\\nför <b>språk, tangentbord och " 8.20 +"Här kan du ställa dina inställningar \\n för <b>språk, tangentbord och " 8.21 "tidszon</b>." 8.22 8.23 #: tazbox/tazbox:139
9.1 --- a/tinyutils/tazlocale Tue Nov 17 17:19:20 2015 +0200 9.2 +++ b/tinyutils/tazlocale Wed Nov 25 23:50:30 2015 +0200 9.3 @@ -91,8 +91,13 @@ 9.4 9.5 get_locale_name() { 9.6 for i in $(ls -1 /usr/share/i18n/locales | grep [a-z]_[A-Z]); do 9.7 - #desc=$(grep ^title /usr/share/i18n/locales/$i | cut -d '"' -f 2) 9.8 - echo "$i Locale" 9.9 + echo -n "$i " 9.10 + desc=$(grep ^title /usr/share/i18n/locales/$i | cut -d '"' -f 2) 9.11 + if [ -n "$desc" ]; then 9.12 + echo "$desc" | tr -c '[A-Za-z0-9\n]' '_' 9.13 + else 9.14 + echo "Locale" 9.15 + fi 9.16 done 9.17 } 9.18 9.19 @@ -101,20 +106,25 @@ 9.20 # Run localedef in background to have a faster boot. 9.21 9.22 gen_utf8_locale() { 9.23 - [ -e /usr/lib/locale/$locale ] || \ 9.24 - localedef -i $locale -c -f UTF-8 /usr/lib/locale/$locale & 9.25 + if [ ! -d "/usr/lib/locale/$locale.UTF-8" ]; then 9.26 + localedef -i "$locale" -c -f 'UTF-8' "/usr/lib/locale/$locale.UTF-8" & 9.27 + fi 9.28 } 9.29 9.30 9.31 # Config /etc/locale.conf 9.32 9.33 system_config() { 9.34 - export LC_ALL=$locale 9.35 - _n 'Setting system locale to: %s' "$locale" 9.36 - echo -e "LANG=$locale\nLC_ALL=$locale" > /etc/locale.conf 9.37 + # If locale not defined: show error and exit 9.38 + ls "/usr/share/i18n/locales/$locale" >/dev/null || return 9.39 + export LC_ALL="$locale.UTF-8" 9.40 + action 'Setting system locale to: %s' "$locale.UTF-8" 9.41 + echo -e "LANG=$locale.UTF-8\nLC_ALL=$locale.UTF-8" > /etc/locale.conf 9.42 status 9.43 gen_utf8_locale 9.44 link_language_files 9.45 + # Clean TazPanel cached headers in old language 9.46 + [ -n "$(which tazpanel)" ] && tazpanel cc 9.47 } 9.48 9.49 9.50 @@ -153,6 +163,7 @@ 9.51 --help|-h) 9.52 usage ;; 9.53 info) 9.54 + . /etc/locale.conf 9.55 _ 'Config file: %s' '/etc/locale.conf' 9.56 _ 'Current locale: %s' "$LANG" 9.57 ;;