WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Translations  (Read 563662 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Translations
« on: September 04, 2010, 03:48:36 AM »
Quote
Want to help translate the base GUIs?

https://translations.launchpad.net/tctools



Our translations are hosted at Launchpad, so you will need an account there.

The front page shows all languages with any existing translations, if you'd like to translate to a new language, go here:
https://translations.launchpad.net/tctools/trunk/+pots/tinycore


The translations will be snapped ~once per release to the base-locale.tcz extension. The first release to support base apps' translations is 3.1.
The only barriers that can stop you are the ones you create yourself.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Translations
« Reply #1 on: September 04, 2010, 01:36:07 PM »
Finally! great idea :)

Offline eluring

  • Newbie
  • *
  • Posts: 22
Re: Translations
« Reply #2 on: September 06, 2010, 03:29:43 PM »
great deed  :)
Quote
The first release to support base apps' translations is 3.1.
will the translations be in a rc before final?
Everyone is a foreigner, almost everywhere.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Translations
« Reply #3 on: September 07, 2010, 08:30:46 AM »
Supported in the rc series since 3.1 rc2:

Quote
* Internationalization (setlocale) added to FLTK GUIs.

However the extension will only be updated for stable releases.
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Translations
« Reply #4 on: September 08, 2010, 10:14:47 AM »
is the "&" supported? So the user can use alt+something?
dCore user

Offline eluring

  • Newbie
  • *
  • Posts: 22
Re: Translations
« Reply #5 on: September 08, 2010, 11:10:41 AM »
Quote
is the "&" supported? So the user can use alt+something?
Yes, it is.
I have just tried.
Everyone is a foreigner, almost everywhere.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Translations
« Reply #6 on: September 08, 2010, 11:20:43 AM »
how have u tried?
dCore user

Offline eluring

  • Newbie
  • *
  • Posts: 22
Re: Translations
« Reply #7 on: September 08, 2010, 11:45:41 AM »
Quote
how have u tried?

my
Code: [Select]
cat /proc/cmdline... lang=de_DE.UTF-8 ...

set locale to lang in
Quote
sudo getlocale.sh
no reboot

go to https://translations.launchpad.net/tctools/trunk/+pots/tinycore/it/+translate
there is a link:
Quote
Download translation
(that is your translation)

I have downloaded mine as .po
copied to /home/tc
and renamed as tinycore.po

get the extension gettext.tcz
make .mo file
Code: [Select]
msgfmt tinycore.po -o - > /usr/local/share/locale/it/LC_MESSAGES/tinycore.mo
launch Apps and/or Panel

and look at your translations

to correct anything:
geany tinycore.po
save and
Code: [Select]
msgfmt tinycore.po -o - > /usr/local/share/locale/it/LC_MESSAGES/tinycore.morelaunch Apps and/or Panel
loop until satisfied
then upload tinycore.po

donĀ“t forget to save your tinycore.mo
Code: [Select]
echo "usr/local/share/locale/${LANG:0:2}/LC_MESSAGES/tinycore.mo" >> /opt/.filetool.lst

hope that helps (if not, ask again, of course )
ciao

edit:
attached screenshot shows how it looks in my translation
(tested locally, uploaded, downloaded tested, changed and uploaded again)
« Last Edit: September 09, 2010, 05:34:32 AM by eluring »
Everyone is a foreigner, almost everywhere.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Translations
« Reply #8 on: September 16, 2010, 10:09:31 AM »
Altough I've translated all the items I still see some windows still in english:
-appsaudit
-wallpaper
-swap

And what about the shell scripts? Like update apps for example?
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Translations
« Reply #9 on: September 16, 2010, 10:28:23 AM »
Fixed wallpaper and swapfile. Appsaudit would need refactoring, I'll ping Robert on that.

Shell scripts won't get translations.
The only barriers that can stop you are the ones you create yourself.

Offline eluring

  • Newbie
  • *
  • Posts: 22
Re: Translations
« Reply #10 on: September 16, 2010, 10:31:00 AM »
Quote
And what about the shell scripts?
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
« Last Edit: September 16, 2010, 10:37:53 AM by eluring »
Everyone is a foreigner, almost everywhere.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Translations
« Reply #11 on: September 16, 2010, 01:00:30 PM »
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.
The only barriers that can stop you are the ones you create yourself.

Offline eluring

  • Newbie
  • *
  • Posts: 22
Re: Translations
« Reply #12 on: September 16, 2010, 03:23:58 PM »
Quote
Let's keep tinycore.pot for the GUIs for now.
OK: tc_scripts.po

Quote
I'm against translating shell scripts, because it would clutter them
Could you please explain what is clutter?
Code: [Select]
#!/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
Quote
have to be able to work in all consoles
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.
« Last Edit: September 16, 2010, 03:33:57 PM by eluring »
Everyone is a foreigner, almost everywhere.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Translations
« Reply #13 on: September 17, 2010, 03:43:08 AM »
Quote
Could you please explain what is clutter?

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.

Micro Core. Or people who have a preference to work in the console, even when X is available.
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Translations
« Reply #14 on: September 17, 2010, 08:19:10 AM »
Fixed wallpaper and swapfile. Appsaudit would need refactoring, I'll ping Robert on that.

Shell scripts won't get translations.

I will adjust Appsaudit to support translations.
10+ Years Contributing to Linux Open Source Projects.