Tiny Core Base > TCB Talk
Translations
eluring:
--- Quote ---And what about the shell scripts?
--- End quote ---
I am working at usbinstall (UTF-8 in urxvt)
wait awhile, please :)
edit: script and pot finished, just translating to de
@curaga
which do you prefer?
1: messages of all scripts in tc_scripts.po, or
2: add them to tinycore.po
curaga:
Let's keep tinycore.pot for the GUIs for now.
I'm against translating shell scripts, because it would clutter them, and add ~36kb of binaries. Besides losing readability, they have to be able to work in all consoles, not just urxvt with a good font - the linux console is restricted to vga fonts, IIRC 256 glyphs.
eluring:
--- Quote ---Let's keep tinycore.pot for the GUIs for now.
--- End quote ---
OK: tc_scripts.po
--- Quote ---I'm against translating shell scripts, because it would clutter them
--- End quote ---
Could you please explain what is clutter?
--- Code: ---#!/bin/sh
# (c) Robert Shingledecker 2010
# After boot setup for TCE directory and backup
# i18n by eluring 2010
#export TEXTDOMAINDIR=/usr/local/share/locale
export TEXTDOMAINDIR=/home/tc/tc_scripts # first test only
export TEXTDOMAIN=tc_scripts
source /usr/local/bin/gettext.sh
. /etc/init.d/tc-functions
[ -f /opt/.tce_dir ] || exit 1
read TCEDIR < /opt/.tce_dir
if [ "${TCEDIR:0:8}" != "/tmp/tce" ]; then
echo
echo -n "${GREEN}`eval_gettext \"Your TCE Drive, ${TCEDIR}, has already been selected!\"`${NORMAL}"
sleep 5
exit 1
fi
TMP="/tmp/tcesetdev.$$"
TMP2="/tmp/tcesetdev2.$$"
awk '/mnt/{printf "%s\n",$2}' /etc/fstab|sort -n > "$TMP"
while read F; do
if grep -qv ${F##*/} /etc/sysconfig/cdroms ; then echo $F >> "$TMP2"; fi
done < "$TMP"
mv "$TMP2" "$TMP"
[ -s "$TMP" ] || exit 1
echo "${GREEN}"
select "tce-setdrive - `gettext \"Choose Drive for TCE directory\"`" "$TMP" 1
echo "${NORMAL}"
ANSWER=`cat /tmp/select.ans`;rm "$TMP"
[ "$ANSWER" == "q" ] && exit 1
DEVICE="$ANSWER"
LOCAL_DEVICE="${DEVICE##/*/}"
[ -z "$LOCAL_DEVICE" ] && exit 1
find_mountpoint "$LOCAL_DEVICE"
if [ -n "$MOUNTPOINT" ]; then
if [ "$MOUNTED" == "no" ]; then
mount "$MOUNTPOINT"
fi
fi
TCEDIR="$ANSWER"/tce
if [ ! -d "$TCEDIR"/optional ]; then
sudo mkdir -p "$TCEDIR"/optional
sudo chown -R ${USER}.staff "$TCEDIR"
sudo chmod -R g+w "$TCEDIR"
fi
[ -f "$TCEDIR"/mydata.tgz ] || touch "$TCEDIR"/mydata.tgz
echo "$TCEDIR" > /opt/.tce_dir
echo
echo -n "${GREEN}`eval_gettext \"Your TCE Drive, \\\${TCEDIR}, is now enabled!\"`${NORMAL}"
sleep 5
exit 0
--- End code ---
--- Quote ---have to be able to work in all consoles
--- End quote ---
why that?
We are talking only about cpanel which is launching one console.
Anyway, the work is done:
usbinstall tce-setdrive and tce-update are ready to be translated.
curaga:
--- Quote ---Could you please explain what is clutter?
--- End quote ---
Well, all the calls to *gettext. Triple quoting on the last echo (\\\${TCEDIR}).
Because of all the calls, boot or shutdown scripts are a definitive no. For others, there is the terminal requirement (+ the size increase of gettext and gettext.sh).
--- Quote ---why that?
We are talking only about cpanel which is launching one console.
--- End quote ---
Micro Core. Or people who have a preference to work in the console, even when X is available.
roberts:
--- Quote from: curaga on September 16, 2010, 07:28:23 AM ---Fixed wallpaper and swapfile. Appsaudit would need refactoring, I'll ping Robert on that.
Shell scripts won't get translations.
--- End quote ---
I will adjust Appsaudit to support translations.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version