Localizing scripts

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#61 Post by MU »

esmourguit,

I can reproduce your errors with "xwin".
Unfortunately I could not find out yet, what causes them.

Newyearspup02 rc4 will contain bootmanager, cups_shell, xorgwizard (not xwin), remasterpup2 (and connectwizard from droope in english, though I am not certain, if Dougal has a more recent version meanwhile. Which one should we use?)

For the next release I will look, if droope already created spanish translations, I currently just use the french ones that were included in esmourguits files.

Is Droopes spanish remasterscript.mo compatible with esmourguits remasterpup2?
Esmurguit: remasterpup2: 19455 byte
Droope: remasterpup2: 18057 byte.

So I assume, that the one from esmurguit is more complete?

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/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

#62 Post by esmourguit »

Bonjour,
@ MU here is the connectwizard in 4.20RC1.
It is bad for xwin issue, although it works normally
I 'm working on localization of the Petget package. May be ready for wednesday.
II have translated in french Remaster Express by pa_mcclamrock. Is it possible to localize this kind of program in a similar way as the scripts?
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
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#63 Post by MU »

thanks for the connectwizard-link :)

remaster-express is written in Tcl/Tk.
It is also a script-language, but the syntax is very different from bash scripts.
I coded some small utilities maybe 8 years ago, but have forgotten most.
It would be best, to request David to show you an example, or to add the basic stuff to use external languagefiles with a short example.

Once you see how the syntax works, you could add more localization variables on your own, just like for the bash scripts.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/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

#64 Post by esmourguit »

Bonjour,
@MU,
I had already asked pa_mcclamrock, see here.
But i found that
#==========================================#
# Load international messages #
#==========================================#
# msgdir : directory where message file are
# file name example fr.msg de.msg nl.msg es.msg
proc IntlMsg {msgdir {lang {}} } {
package require msgcat
if {$lang == ""} {set lang [string range [::msgcat::mclocale] 0 1] }
set msgfile [file join $msgdir $lang.msg]
if { [catch {open $msgfile r} fmsg] } {
puts stderr "Could not open $msgfile for reading\n$fmsg"
} else {
while {[gets $fmsg ligne] >= 0} {
lappend ll $ligne
}
close $fmsg
::msgcat::::mcmset $lang [join $ll]
unset ll
}
}
on this site,
How do I indicate the path of files.msg in this part of script, if they are in /usr/local/remasterex for example?
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
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#65 Post by esmourguit »

Bonjour,
Here is a new localized utility that is petget.
There are the french and english file.mo.
If someone wants to test it?
Cordialement ;)

Edited and modified the Petget_Loc.tar.gz, today friday march 6
Attachments
Petget_Loc.tar.gz
(7.11 KiB) Downloaded 1154 times
Last edited by esmourguit on Fri 06 Mar 2009, 07:26, 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
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#66 Post by droope »

It works well, i've installed and uninstalled a program.

I see it in english, but the program does read the variable values from the files.

Warning: Don't make a pet directly out of that tar, because the locale files will be misplaced at /usr/share/locale/en instead of in /usr/share/locale/en/LC_MESSAGES/

Really sleepy now. :P Can't figure of anything else to do with the program.

Hope this helps.
Thank you
Droope

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

Re: Localizing scripts

#67 Post by droope »

Connect wizard (This is what esmorguit linked to last)
Xwin
XorgWizard (Updated to Mu's corrected version)
Remasterpup2
Chooselocale
Bootmanager
Cups Shell
Petget.
Alsaconf & Ayttmshell Warning: Spanish only!!! they need to be translated to english.

Updated 5/03/09. :)
Last edited by droope on Fri 06 Mar 2009, 16:49, edited 2 times 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

#68 Post by esmourguit »

Bonjour,
I modified the Petget_Loc.tar.gz.
Locales files are now in good place (/usr/share/en/LC_MESSAGES/)

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
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#69 Post by MU »

merci beaucoup, petget seems to work fine.
Added it to NYP rc7:
http://www.murga-linux.com/puppy/viewto ... 174#282174
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

#70 Post by droope »

Here comes alsaconf translated to english. It's really untidy in some areas, some things aren't centered... Really not professional looking, but functional and localized, as far as i now.

If someone would like it translated, perhaps it's easier to fix the spaces and stuff,.
Attachments
alsaconf.tar.gz
extract mo file in /usr/share/locale/en/LC_MESSAGES/
(10.91 KiB) Downloaded 483 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

#71 Post by esmourguit »

Bonjour,
Here the /usr/sbin/petget localized file.
Thank you to test it (Puppy 4.2).
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
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#72 Post by MU »

esmourguit,
it has several errors.
You can see them by typing:
export LANG=en_US.utf8
petget
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 73: installed: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 74: you: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 89: package,: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 92: to: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 93: So,: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 96: Updating: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 101: to: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 102: Example:: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 103: If: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 104: package: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 115: click: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 116: PET: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 117: syntax error near unexpected token `('
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 117: `it is unofficial and you will need to download (from an 'unofficial' site)'
In line 71 for example, there misses the closing ".

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/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

#73 Post by esmourguit »

Bonjour,

I removed the quotes in .mo files. Added the " line 71.
For the rest i don't understand. The program seems to work.
# petget
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 86: The package: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 144: There is a formatting error in: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 171: Loc-dependencycheck=dependency check: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 173: Loc-dependencycheck1=Choose a package that you want to check its dependenc ies,\nthat is, that it has all required libraries and dependent\npackages installed: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 179: These dependencies required by: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 183: It seems that all the dependencies required for this package are installed : command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 191: The: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 209: There was an error expanding package: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 257:
ERROR: file: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 265: The: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 86: The package: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 144: There is a formatting error in: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 171: Loc-dependencycheck=dependency check: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 173: Loc-dependencycheck1=Choose a package that you want to check its dependenc ies,\nthat is, that it has all required libraries and dependent\npackages installed: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 179: These dependencies required by: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 183: It seems that all the dependencies required for this package are installed : command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 191: The: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 209: There was an error expanding package: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 257:
ERROR: file: command not found
/usr/share/locale/en/LC_MESSAGES/petget.mo: line 265: The: command not found
RETVAL=19
/usr/sbin/petget: line 973: unexpected EOF while looking for matching `]'
/usr/sbin/petget: line 1852: syntax error: unexpected end of fil
Modified lines:
816 ${${Loc_INSTALL PACKAGE}} to ${${Loc_INSTALLPACKAGE}}
818 ${Loc_ABORT INSTALL} to ${Loc_ABORTINSTALL}
892 ${Loc_dependency check} to ${Loc_dependencycheck} and {Loc_dependency check1} to ${Loc_dependencycheck1}
New Localized petget-sbin_Loc-2009-03-11.tar.gz
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
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#74 Post by esmourguit »

Bonjour,
In order to localize the Menu, here is the directory /usr/share/applications.
In this folder you will find the files that make up the menu.
I integrated the ability to display the menu in French by the variable
Name[fr]=Application_Name_n_French
To locate in Spanish for example, simply create a line
Name[es]=Name_of_the_application_in_Spanish.
For all those interested and for other languages the method is the same.
So please, you have to download this package first, add the localization and send back to forum to make another guy can continue with his own localization. But warn when you begin the work for not anybody else begin on an package with only the first 2 locales (example : WARNING beginning of Spanish localization by Johndoe on "date"). That is to say that we must add its own localisation only when previous has finished.
Not sure what I write is clear to understand.;)


@Whodo
I would like to point out that two of these files contain lots of text unnecessary and take much space :
Xarchiver 3936 Bytes
Transmission 5975 Bytes

Cordialement ;)
Attachments
Rep-Applications-Loc.tar.gz
(22.04 KiB) Downloaded 980 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
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#75 Post by droope »

Sorry, i think I don't understand :? I'll download the file anyways.

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]

Post Reply