Done, thanks, but Fatdog actually doesn't have a menu entry for "help". It is accessible directly from the browser's homepage. May be I should add one, hmmm ...L18L wrote:@jamesbond
take it and change menu entry for help to "fhelp" please.
Internationalization of Fatdog64-700b2
Re: Internationalization of Fatdog
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
Fatdog Chinese Language pets
I am making new Chinese Language pets for fatdog64 630rc2 and runs into this challenge:
1. the starting menu at the lower left hand corner of the screen shows a fatdog logo with the word "Menu"
2. I think this is controlled by /etc/xdg/razor/razor-panel/panel.conf 2nd section [mainmenu] line 3:
English version: text=Menu
3. when I changed the above line to Chinese:
text=
1. the starting menu at the lower left hand corner of the screen shows a fatdog logo with the word "Menu"
2. I think this is controlled by /etc/xdg/razor/razor-panel/panel.conf 2nd section [mainmenu] line 3:
English version: text=Menu
3. when I changed the above line to Chinese:
text=
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Fatdog Chinese Language pets
Sorry, no idea how to fix this.icake wrote:Does anyone know how to fix this?
It is not specific to Chinese, just no UTF-8 support I think.
Code: Select all
[mainmenu]
showText=true
type=mainmenu
text=Menü
- Attachments
-
- menü.png
- German menu which is Menü (last letter is u umlaut)
- (2.35 KiB) Downloaded 1025 times
Internationalization of Fatdog
Here are my 2 cents input on how to tackle this UTF-8 label:
1. In a perfect world, /etc/xdg/razor/razor-panel/panel.conf should be able to print UTF-8 characters. It cannot. We can wait for the next version(s) and hope UTF-8 will be correctly shown soon.
2. We can recompile the program from source with UTF-8 enabled. However I do not think the effort is justified.
3. A temporary fix is to hide the label text (showtext=false) and replace the fatdog icon with a new icon with fatdog logo on the left and UTF-8 characters on the right, all in one image file. This requires the name of the file controlling what icon to print. I still cannot find this file and wonder whether someone might know the answer.
1. In a perfect world, /etc/xdg/razor/razor-panel/panel.conf should be able to print UTF-8 characters. It cannot. We can wait for the next version(s) and hope UTF-8 will be correctly shown soon.
2. We can recompile the program from source with UTF-8 enabled. However I do not think the effort is justified.
3. A temporary fix is to hide the label text (showtext=false) and replace the fatdog icon with a new icon with fatdog logo on the left and UTF-8 characters on the right, all in one image file. This requires the name of the file controlling what icon to print. I still cannot find this file and wonder whether someone might know the answer.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
fatdog-control-panel
/usr/sbin/fatdog-package-manager-library.awk and fatdog-control-panel.sh installed
(downloaded, moved to /usr/sbin and made executable)
puppy-compatible sounds good.
Argument of -f is blanc, see Hope that helps
EDIT
Overriding "which" makes the error messages disappear but slows down performance.
(downloaded, moved to /usr/sbin and made executable)
Code: Select all
#!/bin/dash
# Fatdog Package Manager
# A puppy-compatible replacement for Puppy Package Manager
Code: Select all
# fatdog-package-manager.sh
awk: Diese Option benötigt ein Argument -- »f«
BusyBox v1.22.0.git (2013-07-05 02:56:35 WIT) multi-call binary.
Usage: awk [OPTIONS] [AWK_PROGRAM] [FILE]...
-v VAR=VAL Set variable
-F SEP Use SEP as field separator
-f FILE Read program from FILE
Code: Select all
#
# which fatdog-package-manager-library.awk
#
EDIT
Overriding "which"
Code: Select all
AWK_LIB=$(which fatdog-package-manager-library.awk)
AWK_LIB=/usr/sbin/fatdog-package-manager-library.awk
Re: Internationalization of Fatdog
I can't answer this two. I've asked kirk.icake wrote:Here are my 2 cents input on how to tackle this UTF-8 label:
1. In a perfect world, /etc/xdg/razor/razor-panel/panel.conf should be able to print UTF-8 characters. It cannot. We can wait for the next version(s) and hope UTF-8 will be correctly shown soon.
2. We can recompile the program from source with UTF-8 enabled. However I do not think the effort is justified.
I think the filename can't be changed (it's mainmenu.svg) but what you can change is the "theme". The default theme is "ambiance", you can copy the entire directory (in /usr/share/razor/themes), change the theme name (e.g. ambience-de), and tell razor-panel to use that theme in /etc/xdg/razor/razor.conf. Disclaimer: haven't tried it myself3. A temporary fix is to hide the label text (showtext=false) and replace the fatdog icon with a new icon with fatdog logo on the left and UTF-8 characters on the right, all in one image file. This requires the name of the file controlling what icon to print. I still cannot find this file and wonder whether someone might know the answer.
That's because you're supposed to chmod +x fatdog-package-manager-library.awk too. Or just override the stuff like you did - that should work too.L18L wrote:Argument of -f is blanc, see
Now this is annoying How much slower? Where is it slow (initial startup?).makes the error messages disappear but slows down performance.
EDIT:
Yes, but you need to know which version of PPM it is compatible with - the very earliest one (puppy 4.x). In fact, Puppy's PPM is still in Fatdog, just run /usr/local/petget/pkg_chooser.sh and you'll be greeted with something very familiar (and it still works - whatever is installed by FPM can be uninstalled by PPM and vice versa).puppy-compatible sounds good.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
I removed all of the localization files from razorqt-panel, which is what we have normally done in the past since everything was english only and we try to keep things as small as possible. For Fatdog64-700 we will have to reconsider that. I've attached a pet with the razorqt-panel localization files. I just happened to still have that around. Hope that helps.icake wrote:
Here are my 2 cents input on how to tackle this UTF-8 label:
1. In a perfect world, /etc/xdg/razor/razor-panel/panel.conf should be able to print UTF-8 characters. It cannot. We can wait for the next version(s) and hope UTF-8 will be correctly shown soon.
2. We can recompile the program from source with UTF-8 enabled. However I do not think the effort is justified.
I can't answer this two. I've asked kirk.
- Attachments
-
- int-1.0.pet
- (92.16 KiB) Downloaded 521 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Internationalization of Fatdog
That's it. Has not been executable.jamesbond wrote:That's because you're supposed to chmod +x fatdog-package-manager-library.awk too. Or just override the stuff like you did - that should work too.L18L wrote:Argument of -f is blanc, see
Now this is annoying How much slower? Where is it slow (initial startup?).makes the error messages disappear but slows down performance.
Code: Select all
time populate_all_pkg
AWK_LIB=$(which fatdog-package-manager-library.awk) 15sec
AWK_LIB= 5sec and error messages in console
But I do not see any difference in GUI output.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Internationalization of Fatdog
Or just a shell script (store it where ever you like or just paste it to terminal):L18L wrote:Some notes, howto create these translations will follow.
Code: Select all
#!/bin/sh
# create translation files for fatdog's home and faqs
# /usr/share/doc/home/htm must be translated first
# /usr/share/doc/faqs/faq.html must be translated secondly
# choose from faqs directory which one to translate
# functions
go() { echo "
$1
Press ENTER to continue or Ctrl_C to cancel"; read x; }
create_file() {
from=$1
to=$2
go "Convert $from to $to --to-code=UTF-8"
iconv --from-code=ASCII --to-code=UTF-8 $from --output=$to
go "Insert language and change charset to UTF-8"
sed -i "s/<html>/<html lang="$L">/" $to
sed -i 's/charset=ISO-8859-1/charset=UTF-8/' $to
go "Set base for all links"
sed -i "s#<head>#<head>${BASE}#" $to
go "Some style"
sed -i 's@</head>@<style type="text/css">#container {max-width:44em;margin:auto;} h1 img {height:100px;margin:0 2em -.1em 0;} h1 {text-align:center;} .translated {text-align:right;font-size:67%;}</style></head>@' $to
echo "Set link back to original"
sed -i "s#</body>#<p class="translated">Translated from the <a href="$from">English Original</a></p></body>#" $to
go "That's all I could do for you.
Note, properties of this file is yet shown as ASCII, when you have entered the first non-ASCII word then it will be shown as UTF-8.
The file $to will be opened in text editor geany now
Happy translating"
geany $to
}
# /functions
L=${LANG%_*}
# create subdirs for language
for i in /usr/share/doc/help /usr/share/doc/faqs; do mkdir -p $i/$L; done
for i in /usr/share/doc/help/$L/home.htm /usr/share/doc/faqs/$L/faq.html; do
[ -f $i ] && continue
case $i in
*home*) f=/usr/share/doc/home.htm; BASE='<base a href="../../">' ;;
*faq*) f=/usr/share/doc/faqs/faq.html BASE='<base a href="../">';;
esac
create_file $f $i
done # home.htm and faqs/faq.html translated
cd /usr/share/doc/faqs
while true; do # translate one or some or all faq
f=$1
until [ `ls ${f}* | wc -w` -eq 1 ]; do
echo ""; ls ${f}*.htm*; echo ""; read f
done
f=`ls ${f}*`
BASE='<base a href="../">'
create_file $f ${L}/$f
done # break endless loop by pressing Ctrl-C
cd - > /dev/null
- translate line 30 (Translated from the <a href="$from">English Original</a>) to your language....
- change style
EDIT
- override an already translated file
Re: Internationalization of Fatdog
No, of course not. This is dash we're talking about (bash is more versatile and can do that - dash can only "time" external commands and not internal functions).L18L wrote:does not work.Code: Select all
time populate_all_pkg
This is odd - "which" shouldn't take that long. You need to check your system. Anyway, I've hardcoded the location to /usr/sbin rather than doing 'which'.Therefore just the raw seconds:
AWK_LIB=$(which fatdog-package-manager-library.awk) 15sec
You're not supposed to see any difference. Only shorter delays. Which isn't happening tooBut I do not see any difference in GUI output.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Internationalization of Fatdog
I mean the difference betweenjamesbond wrote:You're not supposed to see any difference. Only shorter delays. Which isn't happening tooBut I do not see any difference in GUI output.
- using fatdog-package-manager-library.awk (using which or hardcoded) that is slow (15sec)
- using "" that is fast (5 sec)
Re: Internationalization of Fatdog
No, that can't be. If AWK_LIB is blank then you will get an error and will see the visual differences immediately - your package list will be totally empty (only the categories). The only explanation is that somehow you're still accessing the old package manager, not the new one then.L18L wrote:I mean the difference between
- using fatdog-package-manager-library.awk (using which or hardcoded) that is slow (15sec)
- using "" that is fast (5 sec)
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Internationalization of Fatdog
Now I do see them. You are right.jamesbond wrote: If AWK_LIB is blank then you will get an error and will see the visual differences immediately - your package list will be totally empty (only the categories).
Internationalization of Fatdog
jamesbond wrote:
kirk wrote:
This is a much better and more realistic fix than my suggestion. Thanks jamesbond.I think the filename can't be changed (it's mainmenu.svg) but what you can change is the "theme". The default theme is "ambiance", you can copy the entire directory (in /usr/share/razor/themes), change the theme name (e.g. ambience-de), and tell razor-panel to use that theme in /etc/xdg/razor/razor.conf. Disclaimer: haven't tried it myself Cool
kirk wrote:
Thanks kirk.I've attached a pet with the razorqt-panel localization files. I just happened to still have that around. Hope that helps.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Internationalization of Fatdog
Here is the improved script for the same purpose.L18L wrote:Or just a shell script (store it where ever you like or just paste it to terminal):L18L wrote:Some notes, howto create these translations will follow.You mightCode: Select all
#!/bin/sh # create translation files for fatdog's home and faqs ... ... create_file $f ${L}/$f done # break endless loop by pressing Ctrl-C cd - > /dev/null
- translate line 30 (Translated from the <a href="$from">English Original</a>) to your language....
- change style
EDIT
- override an already translated file
Code: Select all
#!/bin/sh
TITLE="Translate Fatdog's home and FAQs"
# /usr/share/doc/home/htm must be translated first
# /usr/share/doc/faqs/faq.html must be translated secondly
# choose from faqs directory which one to translate
#140123 avoid overriding, avoid no charset, adjust link in translated faq.html,
function init_vars() {
L=${LANG%_*} # Chinese and Portuguese might change this line
for i in /usr/share/doc/help /usr/share/doc/faqs; do mkdir -p $i/$L; done
TRANSLATED_FROM="Übersetzt aus dem" # Translate this to your language
ENGLISH_ORIGINAL="Englischen Original" # Translate this to your language
DEFAULTHTMLEDITOR="seamonkey -edit"
DEFAULTHTMLEDITOR=geany # for experts
#DEFAULTHTMLEDITOR=yudit # for 'right-to-left'-languages
}
function go() { echo "
$1
Press ENTER to continue or Ctrl_C to cancel"; read x; }
function choose_file() {
tmp=/tmp/translate_faq$$
ALL_FILES=/tmp/translate_faq
TODO=
n=0
ls *.htm* | tr ' ' '\n' > $ALL_FILES
while read LINE;do
[ `ls $L | grep $LINE` ] || { n=$(($n + 1)); TODO="$TODO $LINE $n"; }
done < $ALL_FILES
case $n in
0) MSG="No file found, all translations appear to be done." ;;
1) MSG="This is the last file to translate." ;;
*) MSG="Choose ONE of these $n files to translate NOW." ;;
esac
dialog --title "$TITLE" --menu "$MSG" 0 0 12 `echo $TODO` 2> $tmp
file_chosen=`cat $tmp`
rm $tmp $ALL_FILES
}
function create_file() {
from=$1
to=$2
go "Convert $from to $to --to-code=UTF-8"
iconv --from-code=ASCII --to-code=UTF-8 $from --output=$to
go "Insert language and change charset to UTF-8"
sed -i "s/<html>/<html lang="$L">/" $to
sed -i 's/charset=ISO-8859-1/charset=UTF-8/' $to
sed -i 's/charset=windows-1252/charset=UTF-8/' $to
grep 'meta http-equiv="content-type"' $to >/dev/null || sed -i 's#<head>#<head><meta http-equiv="content-type" content="text/html; charset=utf-8">#' $to
go "Set base for all links"
sed -i "s#<head>#<head>${BASE}#" $to
go "Some style"
sed -i 's@</head>@<style type="text/css">#container {max-width:44em;margin:auto;} h1 img {height:100px;margin:0 2em -.1em 0;} h1 {text-align:center;} .translated {text-align:right;font-size:67%;}</style></head>@' $to
go "Set link back to original"
#sed -i "s#</body>#<p class="translated">Translated from the <a href="$from">English Original</a></p></body>#" $to
sed -i "s#</body>#<p class="translated">${TRANSLATED_FROM} <a href="$from">${ENGLISH_ORIGINAL}</a></p></body>#" $to
case ${to} in
*${L}/faq.html) : ;;
*${L}/*.htm*)
go "Set link to this page in 'index' page faq.html from ${to#*/} to $to
Don't forget to also translate the link title in ${L}/faq.html"
sed -i "s@${to#*/}@$to@" ${L}/faq.html ;;
esac
go "That's all I could do for you.
Note, properties of this file is yet shown as ASCII, when you have entered the first non-ASCII word then it will be shown as UTF-8.
The file $to will be opened in $DEFAULTHTMLEDITOR now
Happy translating"
$DEFAULTHTMLEDITOR $to
}
# /functions
init_vars
for i in /usr/share/doc/help/$L/home.htm /usr/share/doc/faqs/$L/faq.html; do
[ -f $i ] && continue
case $i in
*home*) f=/usr/share/doc/home.htm; BASE='<base href="../../">' ;;
*faq*) f=/usr/share/doc/faqs/faq.html BASE='<base href="../">';;
esac
create_file $f $i
done # home.htm and faqs/faq.html translated
cd /usr/share/doc/faqs
while true; do # translate one or some or all faq
choose_file
BASE='<base href="../">'
[ "$file_chosen" ] && create_file $file_chosen ${L}/$file_chosen || break
done # break endless loop by cancel in dialog
cd - > /dev/null
[ $n -gt 0 ] && echo "See you later, use just
$0
in Terminal." || echo bye, hope you really did translate something.
#
- Attachments
-
- translate_home_and_faq.png
- (11.86 KiB) Downloaded 736 times
Last edited by L18L on Thu 23 Jan 2014, 18:30, edited 1 time in total.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
choose-locale
jamesbond wrote:I will look into choose-locale later ...
Code: Select all
# read the source for title (description), language, and territory (country)
while read -r q ; do
case $q in
# title*|language*) echo -n ""${q#*"}|" ;;
# territory*) echo ""${q#*"}"; break ;;
title*) TI=""${q#*"}" ;;
language*) LA="${q#*"}" ;;
territory*) TE=""${q#*"}" ;;
lang_name*) lang_name=""${q#*"}"
lang_name="${lang_name%?}"
lang_name="${lang_name//>/}"
lang_name="${lang_name//</\\}"
LN=`printf "$lang_name"`
echo "${TI}|${LN} ${LA}|${TE}"; break ;;
esac
done < $LOCALE_DEF_DIR/$src
..and messes up some other thing (->ISO-8859-8 and UTF-8 and ...)
(Xdialog:5169): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
15 sec vs 1 or 2 sec
- Attachments
-
- lang_name_from_glibc-locale.png
- (21.06 KiB) Downloaded 510 times
Re: choose-locale
Bash's unicode support for "printf" seems to be broken. Fatdog's /usr/bin/printf links to busybox and isn't unicode aware, so it doesn't help either. This one does.it.(Xdialog:5169): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
This will work, assuming you have compiled show-ucs-data linked above.L18L wrote:Above code reads lang_name from files in in /usr/share/i18n/locales and does produce something.
..and messes up some other thing (->ISO-8859-8 and UTF-8 and ...)
Code: Select all
# only process if we have the source file
if [ -e $LOCALE_DEF_DIR/$src ]; then
# locale and charmaps
echo -n "${p%%/*}|${p##*/}|"
# read the source for title (description), language, and territory (country)
LN='"'
while read -r q ; do
case $q in
%*) ;; # comment, ignore
# title*|language*) echo -n ""${q#*"}|" ;;
# territory*) echo ""${q#*"}"; break ;;
title*) TI=""${q#*"}" ;;
language*) LA="${q#*"}" ;;
territory*) TE=""${q#*"}" ;;
lang_name*) LN=""${q#*"}"; LN="${LN%"*} " ;;
esac
done << EOF
$(./show-ucs-data $LOCALE_DEF_DIR/$src)
EOF
echo "${TI}|${LN}${LA}|${TE}"
fi
That's because now it has to scan every line in locale files instead of scanning just a few lines at the top.15 sec vs 1 or 2 sec
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: choose-locale
Thanks for the code.jamesbond wrote:This will work, assuming you have compiled show-ucs-data linked above.Code: Select all
# only process if we have the source file if [ -e $LOCALE_DEF_DIR/$src ]; then # locale and charmaps echo -n "${p%%/*}|${p##*/}|" # read the source for title (description), language, and territory (country) LN='"' while read -r q ; do case $q in %*) ;; # comment, ignore # title*|language*) echo -n ""${q#*"}|" ;; # territory*) echo ""${q#*"}"; break ;; title*) TI=""${q#*"}" ;; language*) LA="${q#*"}" ;; territory*) TE=""${q#*"}" ;; lang_name*) LN=""${q#*"}"; LN="${LN%"*} " ;; esac done << EOF $(./show-ucs-data $LOCALE_DEF_DIR/$src) EOF echo "${TI}|${LN}${LA}|${TE}" fi
Yes it works, but not the way we need it.
Reason: lang_name is not always in locales
see: English, English English and English
I have manually inserted lang_name into de_AT. (deutsch of Austria)
I have changed SUPPORTED to contain UTF-8 only
Code: Select all
grep UTF-8 SUPPORTED.orig > SUPPORTED
EDIT
Code: Select all
# time show-ucs-data /usr/share/i18n/locales/de_DE | grep lang_name
lang_name "Deutsch"
real 0m0.015s
user 0m0.010s
sys 0m0.000s
# show-ucs-data /usr/share/i18n/locales/de_LU | grep lang_name
#
- Attachments
-
- lang_name_from_glibc-locale_is_optional .png
- (13.22 KiB) Downloaded 615 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: choose-locale
...and inserted all missing (available ) lang_names using:L18L wrote:Thanks for the code.
Yes it works, but not the way we need it.
Reason: lang_name is not always in locales
see: English, English English and English
I have manually inserted lang_name into de_AT. (deutsch of Austria)
Code: Select all
#!/bin/sh
# insert missing lang_name into /usr/share/i18n/locales files
WORK_DIR=/usr/share/i18n
cd $WORK_DIR/locales >/dev/null
#find locales without lang_name
echo -n '' > ../NO_LANG_NAME
for L in `ls`; do
[ ${L%%_*} = "iso14651" ] && continue
[ ${L%%_*} = "translit" ] && continue
[ ${L%%_*} = "POSIX" ] && continue
grep ^lang_name $L && { echo "$L
"; } || echo $L >> ../NO_LANG_NAME
done
while read LINE; do
lang_name=
#echo -n "LINE=$LINE"
lang=${LINE%%_*}
#echo " lang=$lang"
lang_list=`ls ${lang}_*`
lang_name="`for i in ${lang_list}; do grep lang_name $i; done | head -n 1`"
if [ "$lang_name" ]; then
#echo insert $lang_name into $LINE
sed -i "s/LC_IDENTIFICATION/LC_IDENTIFICATION\n${lang_name}/" $LINE
fi
done < ../NO_LANG_NAME
rm ../NO_LANG_NAME
cd - >/dev/null
- Attachments
-
- lang_name_from_glibc-locale_missing_ones_inserted.png
- (13.46 KiB) Downloaded 729 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: choose-locale
Above GUI needed 15 sec
6 sec only if (I have done it) locales files are converted once ( 1.1 sec ) and used
in /usr/sbin/fatdog-choose-locale.sh
...Will test now in a locale without UTF-8....
EDIT: confirm: it works
6 sec only if (I have done it) locales files are converted once ( 1.1 sec )
Code: Select all
#!/bin/sh
# convert all locales /usr/share/i18n/locales files to ucs
WORK_DIR=/usr/share/i18n
cd $WORK_DIR/locales >/dev/null
mkdir -p ../locales.ucs
for L in `ls`; do
case 4L in
iso14651*) cp $L ../locales.ucs/$L ;;
translit*) cp $L ../locales.ucs/$L ;;
POSIX) cp $L ../locales.ucs/$L ;;
*) show-ucs-data $L > ../locales.ucs/$L ;;
esac
done
cd - >/dev/null
Code: Select all
LOCALE_DEF_DIR=/usr/share/i18n/locales.ucs
Code: Select all
done < $LOCALE_DEF_DIR/$src
# done << EOF
#$(show-ucs-data $LOCALE_DEF_DIR/$src)
#EOF
in /usr/sbin/fatdog-choose-locale.sh
...Will test now in a locale without UTF-8....
EDIT: confirm: it works