Localizing scripts

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#76 Post by droope »

Hi there. Fixed connect wizard. (wansn't working for es_ES).

Changed
mo=connectwizard.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
To:
mo=connectwizard.mo
lng=`echo $LANG | sed "s/\(..\).*/\1/"`
#echo $lng
. "/usr/share/locale/$lng/LC_MESSAGES/$mo"
if [ -f "/usr/share/locale/$lng/LC_MESSAGES/$mo" ];then
. "/usr/share/locale/$lng/LC_MESSAGES/$mo"
fi
Attachments
connectwizard-420Loc.tar.gz
Newer version, the correct one.
(3.06 KiB) Downloaded 1058 times

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

#77 Post by magerlab »

i've already done this for puppy 3 and 4.1.2
so can for 4.2

as for menu directories translations( /usr/share/desktop-directories)
i've noticed that after installing a package they return to English so fix menus needs to run again

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

#78 Post by droope »

magerlab wrote:i've already done this for puppy 3 and 4.1.2
so can for 4.2

as for menu directories translations( /usr/share/desktop-directories)
i've noticed that after installing a package they return to English so fix menus needs to run again
Any help is welcome.

Hey, esmorguit, mark. Will any of you send the info to whodo?

Lots of progress here. We should send him that list i made.

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

#79 Post by droope »

Connect wizard (last esmorguit link).
Xwin
XorgWizard (Updated to Mu's corrected version)
Remasterpup2
Chooselocale
Bootmanager
Cups Shell
[http://murga-linux.com/puppy/viewtopic. ... h&id=16271]Petget.[/url] (fixed).
Applications directory localized


Updated 19/03/09. This should be the list then.
Last edited by droope on Thu 19 Mar 2009, 18:29, edited 1 time in total.

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

#80 Post by MU »

droope, I would suggest, that you contact Whodoo.
I'm sooo tired...
Did hours of tests to get Genie+Glade working in Windows, and from tomorrow on, I must work on a Java project for 1 1/2 weeks.
It will need my full concentration, so I cannot follow all the messages in the Puppyforum.

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

#81 Post by droope »

MU wrote:droope, I would suggest, that you contact Whodoo.
I'm sooo tired...
Did hours of tests to get Genie+Glade working in Windows, and from tomorrow on, I must work on a Java project for 1 1/2 weeks.
It will need my full concentration, so I cannot follow all the messages in the Puppyforum.

Mark
Ok no problem :D Life's too short mark!

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

#82 Post by MU »

thanks, muchas gracias :D
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

#83 Post by droope »

Hi. Petget has the same issues as connectwizard. My system is configured in es_ES, and "echo $lng" echoes "es", but the program attemps to fetch the mo file in /usr/share/locale/en/.

I changed the code the way i did it with connect wizard and got a pretty scary error. I can't solve this, sorry :(

Esmorguit maybe you can? Or mark?

Ty.
Droope

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

#84 Post by MU »

Code: Select all

mo=connectwizard.mo 
lng=`echo $LANG | sed "s/\(..\).*/\1/"` 
#echo $lng 
. "/usr/share/locale/$lng/LC_MESSAGES/$mo" 
if [ -f "/usr/share/locale/$lng/LC_MESSAGES/$mo" ];then 
. "/usr/share/locale/$lng/LC_MESSAGES/$mo" 
fi
this will not work.
The first line MUST use "en", so that the script has a file to read the variables from, even if no localized .mo is available.

So it must be:

Code: Select all

mo=connectwizard.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
You did not include the spanish connectwizard.mo, please attach it, so that I can test it.
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

#85 Post by droope »

MU wrote:

Code: Select all

mo=connectwizard.mo 
lng=`echo $LANG | sed "s/\(..\).*/\1/"` 
#echo $lng 
. "/usr/share/locale/$lng/LC_MESSAGES/$mo" 
if [ -f "/usr/share/locale/$lng/LC_MESSAGES/$mo" ];then 
. "/usr/share/locale/$lng/LC_MESSAGES/$mo" 
fi
this will not work.
The first line MUST use "en", so that the script has a file to read the variables from, even if no localized .mo is available.

So it must be:

Code: Select all

mo=connectwizard.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
You did not include the spanish connectwizard.mo, please attach it, so that I can test it.
Mark
That way it worked with connect wizard, tested only in es_ES.

The way I saw it, if no mo files were found, suicide would be a great choice :P

Here are the mo files for petget:
http://murga-linux.com/puppy/viewtopic. ... h&id=15995

And here's connectwizard:
http://www.murga-linux.com/puppy/viewto ... h&id=15179

I've been working on this for too long, perhaps. Sure hope not to make you work for nothing.

Thanks mark.

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

#86 Post by MU »

The way I saw it, if no mo files were found, suicide would be a great choice
hehe, but, no, sorry, this is a bad idea.
Like this you could not connect to internet, even if you speak english, but use french, german, or other settings.
We must keep english as fallback.

I tested your connectwizard with the spanish connectwizard.mo.
In Puppy 4.12.
Language first was set to en_US, then I switched to es_ES.
It works fine with "en", so in the way, before you modified it.

With your modification it crashes, if I use "de_DE" (german) as language, so connectwizard is not usable for non-US american or non-spanish users.

So I cannot reproduce your errors.
Maybe you might try it with a second, new savefile.
Maybe in your old savefile, something got broken by all the work you did for localization?

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

#87 Post by droope »

It should crash, of course, unless you hace a connectwizard.mo in /usr/share... de_DE or "en".

What you could do to test it is to place the spanish mo in /usr/share/locale/de_DE/LC_Messages/ that way you will see it will continue crashing because it can't find the file in "en".

For some reason, it always looks for en, even tho $lng is es in my case.

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

#88 Post by Aitch »

I would like to know if anyone knows of a program that'd let me to know the exact diferences between a file and another. It would save a lot of work for me.
I know it was awhile ago, Droope, but I just spotted this, and thought it might be useful to you

http://murga-linux.com/puppy/viewtopic. ... 6714f82a57

Good effort, guys!

Aitch :)

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

#89 Post by magerlab »

i've almost finished to add russian names for applications, so i'll put my archive back here this evening

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

#90 Post by esmourguit »

Bonjour,
Here a fixed /usr/sbin/petget localized.
Tested in RC3 instead of original. Can you test yourself?
What conclusion about the corrections made on the localized files ? Should we change and what version to use?
I have great difficulties with the forum. It takes considerable time to load a page when it wants to load.
Cordialement ;)
Attachments
petget_loc_09-03-18.tar.gz
(24.98 KiB) Downloaded 1310 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
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#91 Post by esmourguit »

Bonjour,
About the menu files in /usr/share/applications.
I thought that my explanations were not clear.
Here one example for /usr/share/applications/Alsamixer-sound-sound.desktop :

[Desktop Entry]
Encoding=UTF-8
Name=AlsaMixer audio mixer
Name[fr]=Mixeur audio AlsaMixer
Icon=mini-sound.xpm
Comment=AlsaMixer sound mixer
Exec=xterm -e alsamixer
Terminal=true
Type=Application
Categories=AudioVideo
GenericName=AlsaMixer

Create a new line for spanish (here in red) and save.

[Desktop Entry]
Encoding=UTF-8
Name=AlsaMixer audio mixer
Name[fr]=Mixeur audio AlsaMixer
Name[es]=Name_of_mixer_in_spanish
Icon=mini-sound.xpm
Comment=AlsaMixer sound mixer
Exec=xterm -e alsamixer
Terminal=true
Type=Application
Categories=AudioVideo
GenericName=AlsaMixer

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]

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

Russian translations for menu

#92 Post by magerlab »

So here i am!
i 've added russian lines for applications and packed it back
:!: :?:
note : there are 3 .bak files for
e3 mp and top
i translated them also but i do not know if they will be in Puppy 4.2
also there's a pet.specs file wich can be removed :?:

as an example i put a pack from /usr/share/desktop-directories wich i did for puppy 4.1.2
i've translated only entries for JWM menu
it's all the same things: just added some lines

For Icewm it needs to have a localized template in /etc/xdg/...
Attachments
desktop-dirs.tar.gz
example for JWM menu entries
(2.26 KiB) Downloaded 921 times
Rep-Applications-Loc.tar.gz
added russian translations
(24.46 KiB) Downloaded 885 times

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

#93 Post by droope »

The whole menus have been translated, so i figure there must be a way to make a program that extracts it from the original and pastes it here, i'll try.

It gets hard, programming :P

I won't do it manually, that is certain, waaay to many desktop files!! :(

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

#94 Post by magerlab »

i did it once in summer for puppy 4
so just copy/paste was not difficult
i'd also will add some scripts translations ...

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

#95 Post by esmourguit »

Bonjour,
Here is the desktop-dirs.tar.gz.
French added.
Cordialement ;)
Attachments
desktop-dirs.tar.gz
(2.7 KiB) Downloaded 1171 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]

Post Reply