Localizing scripts

For efforts in internationalising Puppy and solving problems in this area
Message
Author
magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#106 Post by magerlab »

i expected that loclized menus would be in final release....
please tell whodo to include them in bugfix

i'll also try to add some russian mo. files for scripts and also will make an archive with mo. files for as many apps as i can find(actually i do have many already)

apendragon
Posts: 56
Joined: Tue 16 Jan 2007, 00:44

#107 Post by apendragon »

I send files Xwin localized in English and Spanish. I fixed the problems.
Attachments
xwin.tar.gz
(8.54 KiB) Downloaded 753 times

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#108 Post by Aitch »

droope/anyone

I posted to Irihapeti in the 41 language thread

http://www.murga-linux.com/puppy/viewto ... &start=540

This is her reply
Irihapeti wrote:I had a quick look at that, Aitch, but it's rather over my head. I'm not a developer; I only compile other people's programs.

One thing I believe still needs attention: that ordinary, unlocalised Puppy be able to display non-Latin characters in dialogue boxes and window title bars. (Assuming, of course, that the necessary fonts have been installed.) I have an idea that it has to do with the "C locale" - some programs can't use the locale files and use the default, and the default is not compiled to handle non-Latin characters. At least, that's what I think it is; a developer would be able to clarify that.

Irihapeti
Why is puppy still short of fonts, & IS it compiled without non-latin character handling?

If so, it may explain some people's frustration with Puppy at boot up?

Is this one for BarryK, since he's changed the boot up to include keyboard/locale, I believe?

Perhaps you could see if WhoDo is aware of that?

And if anything can/should be done?

Thanks

Aitch :)

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#109 Post by droope »

Hi aitch,

I am unaware of that issue :? I really don't know. I think it might have something to do with what The Hamsters was attempting to do, something related with utf-8, and being able to imput greek characters into Dialogs and console windows.

(Not sure tho, and I think the issue needs to be solved, but is not really a big big deal, i think. Maybe for Chinese people, who need their titles in chinese, for example.)

But I think this has been attempted, don't know where though.

Cheers!

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#110 Post by MU »

how to use arab, chinese etc. in messageboxes using "gxmessage" instead of "xmessage":
http://murga-linux.com/puppy/viewtopic.php?t=25319

Replacing "yaf-splash":
http://www.murga-linux.com/puppy/viewtopic.php?t=25536

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#111 Post by droope »

Should this be done in default Puppy version? I think it would be a good idea to wait untill Puppy 4.2.x is totally bug-free and then grab it, and add all localizations, plus this.

Anyone up to it? I could make a pet of all english tar.gz s here. Someday. I think that'd be step 1. I would love to be able to do a script that would download only files that are attached in phpBB forums, and nothing else.

Wait, I can!! :D

I think i will.

magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#112 Post by magerlab »

i say again that it all MUST be in default puppy
i'll do what i can to provide russian locale files

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#113 Post by Aitch »

hi droope

we are having an effect - keep pushing! :D
raffy wrote:It's back to simple website for now, at least until the difficult recurring error at the site is solved. It will take some time.

Darreljon is making available a wikibook:
http://murga-linux.com/puppy/viewtopic.php?t=42755
It must be good to have the translations there, too.


so here it is....http://en.wikibooks.org/wiki/Puppy_Linux

Spread the word
puppyluvr wrote:Puppies for You..,Puppies for Me...
Puppy is fun and Puppy is free...
Puppies from Ubuntu / Slackware / Debian too.
Puppy`s for Everyone...Puppy`s for You....

Puppy Linux..
Resistance is Futile......

I love this...... :D
me too, Jay

Aitch :)

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#114 Post by droope »

Do you reckon it'd be really necesary? Where would that book be? (besides that page, i mean)

User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#115 Post by esmourguit »

Bonjour à tous,
I resume this post.
Here is an updated localized xorgwizard script from last Puppy 4.17.
To test in Puppy 4.16 or 4.17
If (when it'll be OK after tests) Barry Kauler could introduce it in future alpha and beta releases, it would be a great help for translators.
Cordialement ;)
Attachments
xorgwizard417-loc.pet
Edited today july 20
(23.23 KiB) Downloaded 694 times
Last edited by esmourguit on Mon 20 Jul 2009, 14:54, edited 1 time in total.
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Three comments

#116 Post by shinobar »

deleted
Last edited by shinobar on Sun 19 Jul 2009, 22:35, edited 1 time in total.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: Three comments

#117 Post by shinobar »

good job, esmourguit.

i put 3 comments
  1. note that Barry add some code to 416.
    #w482 allow switch between intel_drv.so and i810OLD_drv.so.
  2. any of localisation on X failes because of the bug in /usr/bin/xwin.
    see http://www.murga-linux.com/puppy/viewto ... 229#325229
  3. the localization scripts by MU can be improbed.
    next code distinguishes zh_CN and zh_TW for example.
    assumed default messages at ./C/*/*.mo instead of ./en/*/*.mo.

    Code: Select all

    # set locale
    for LOCALE in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done	# ex. 	ja_JP.UTF-8
    # search locale file
    LOCALE1=$(echo $LOCALE|cut -d'.' -f1)		# ex.	ja_JP
    LOCALE2=$(echo $LOCALE|cut -d'_' -f1)	# ex.	ja
    LOCALEDIR=/usr/share/locale
    LOCALEFILE=$(basename $0).mo
    for D in C $LOCALE2 $LOCALE1 $LOCALE
    do
    	F="$LOCALEDIR/$D/LC_MESSAGES/$LOCALEFILE"
    	[ -f "$F" ] && . "$F" 
    done

User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#118 Post by esmourguit »

Bonjour à tous,
Many thanks shinobar for your help.
Post above new xorgwizard localized file. But without modifs from shinobar. I don't know where insert the modified script.
And here xwin localized file with modif from shinobar, line 517 newly 508 in localized file.
Hope it'll be ok.
Thank you for yours tests.
Cordialement ;)
Attachments
xwin417-loc.pet
(9.5 KiB) Downloaded 695 times
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

xwin

#119 Post by shinobar »

esmourguit wrote:And here xwin localized file with modif from shinobar, line 517 newly 508 in localized file.
tnx esmourguit.
but it seems wrong directory, missing /usr.
the last quotation mark was missing at line 68 in the mo files.

anyway, i think the default 'mo' shall be written in the script itself so that it can run by the single file, /usr/bin/xwin alone. it is more safe.

and i add my code searching the 'mo' file:

Code: Select all

#-- simple localization for scripts by Shinobar based on MU. 
mo=xwin.mo
# set locale
for lng in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done   # ex.    ja_JP.UTF-8
# search locale file
lng1=$(echo $lng|cut -d'.' -f1)      # ex.   ja_JP
lng2=$(echo $lng|cut -d'_' -f1)   # ex.   ja
LOCALEDIR=/usr/share/locale
[ "$mo" ] || mo=$(basename $0).mo
for D in C en $lng2 $lng1 $lng
do
   F="$LOCALEDIR/$D/LC_MESSAGES/$mo"
   [ -f "$F" ] && . "$F"
done
hope my pet attached works.
Attachments
xwin417-loc1.pet
(9.64 KiB) Downloaded 1095 times

User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#120 Post by esmourguit »

Bonjour à tous,
@ shinobar,
You're great.
I Tested your xwin file and all works perfectly. I have tried also without the french locale file and all went ok.
And what about the xorgwizard localized file?
I hope Barry will include it in next release.
Cordialement ;)
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

localization of xorgwizard

#121 Post by shinobar »

tnx for testing smourguit.

your xorgwizard417-loc.pet works with np as for 2-letter langage codes.
i think the code from MU can be expanded for more precise language selection.

line 38-45 (code from MU)

Code: Select all

#-- simple localization for scripts by MU. Localized JJ Moulinier July 2009
mo=xorgwizard.mo
lng=`echo $LANG | sed "s/\(..\).*/\1/"`
#echo $lng
. "/usr/share/locale/en/LC_MESSAGES/$mo"
if [ -f "/usr/share/locale/$lng/LC_MESSAGES/$mo" ];then
  . "/usr/share/locale/$lng/LC_MESSAGES/$mo"
fi
my code as described before: (the priority between 'en' and 'C' changed on 25 aug)

Code: Select all

#-- simple localization for scripts by Shinobar based on MU.
mo=xorgwizard.mo
# set locale
for lng in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done   # ex.    ja_JP.UTF-8
# search locale file
lng1=$(echo $lng|cut -d'.' -f1)      # ex.   ja_JP
lng2=$(echo $lng|cut -d'_' -f1)   # ex.   ja
LOCALEDIR=/usr/share/locale
[ "$mo" ] || mo=$(basename $0).mo
for D in en C $lng2 $lng1 $lng
do
   F="$LOCALEDIR/$D/LC_MESSAGES/$mo"
   [ -f "$F" ] && . "$F"
done
Last edited by shinobar on Tue 25 Aug 2009, 02:01, edited 1 time in total.

User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#122 Post by esmourguit »

Bonjour à tous,
Here are xorgwizard_417 and chooselocale scripts localized (french and english .po files) with shinobar improvements.
Hope B. Kauler will place them in future releases.
Cordialement ;)
Attachments
chooselocale_Loc.pet
(4.79 KiB) Downloaded 1374 times
xorgwizard417-loc.pet
(23.48 KiB) Downloaded 1319 times
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

xorgwizard revised

#123 Post by shinobar »

found bug around xvidtune ....fixed.
fix keyboard model for jp106.
with japanese translation.
Attachments
xorgwizard423-loc.pet
xorgwizard I18N
(26.24 KiB) Downloaded 937 times

ljfr
Posts: 176
Joined: Thu 23 Apr 2009, 08:35

Script localization

#124 Post by ljfr »

Hi,

Do you know gettext could be used inside bash script:
http://tldp.org/LDP/abs/html/localization.html
Could this be usefull?

I just tried on simple examples (pure output text and gtkdialog box), and it worked fine.

regards,

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: Script localization

#125 Post by shinobar »

ljfr wrote: Do you know gettext could be used inside bash script:
Maybe Puppy Linux Chinese version does.
http://puppy.cnbits.com/

Post Reply