Subject: [Thuban-list] Brazilian Portuguese file for Thuban

From: Frank Koormann <[email-masked]>
Date: Tue, 3 Feb 2004 20:19:20 +0100

Dear all,

I just uploaded to the CVS the po file for the sixth translation of
Thuban: Brazilian Portuguese, contributed by Eduardo Patto Kanegae.
To those who are familiar with Brazilian Portuguese - feel free to 
test and comment the translation.

Thanks Eduardo!

        Frank

-- 
Frank Koormann                             <[email-masked]>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Tue, 03 Feb 2004 17:53:25 -0200

you and all Thuban team are welcome, Frank.

Now I'm trying to build Thuban 1 on a SuSE 9 Pro using:

$ python setup.py build 2>&1 | tee build-python.log

and my build-python.log says:
===========
sh: line 1: wx-config: command not found
"wx-config --cflags " failed
running build
running build_py
running build_ext
building 'Lib.wxproj' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64 
-DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0 
-fPIC -Wall -fPIC -Ilibraries/shapelib -I/usr/local/include 
-Ilibraries/pyshapelib/ -I/usr/include/python2.3 -c 
libraries/thuban/wxproj.cpp -o 
build/temp.linux-i686-2.3/libraries/thuban/wxproj.o
In file included from /usr/include/python2.3/Python.h:8,
from libraries/thuban/wxproj.cpp:16:
/usr/include/python2.3/pyconfig.h:844:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from /usr/include/stdlib.h:25,
from libraries/thuban/wxproj.cpp:13:
/usr/include/features.h:131:1: warning: this is the location of the 
previous definition
libraries/thuban/wxproj.cpp:31:19: wx/wx.h: No such file or directory
libraries/thuban/wxproj.cpp:188: error: syntax error before `*' token
libraries/thuban/wxproj.cpp:195: error: `num_vertices' was not declared 
in this scope
libraries/thuban/wxproj.cpp:195: error: `num_parts' was not declared in 
this scope
libraries/thuban/wxproj.cpp:196: error: syntax error before `*' token
libraries/thuban/wxproj.cpp:203: error: `num_vertices' was not declared 
in this scope
libraries/thuban/wxproj.cpp:203: error: parse error before `;' token
libraries/thuban/wxproj.cpp:203: error: syntax error before `++' token
libraries/thuban/wxproj.cpp:207: error: `x' was not declared in this scope
libraries/thuban/wxproj.cpp:207: error: `y' was not declared in this scope
libraries/thuban/wxproj.cpp:207: error: `forward' was not declared in 
this scope
libraries/thuban/wxproj.cpp:207: error: `inverse' was not declared in 
this scope
libraries/thuban/wxproj.cpp:208: error: `scalex' was not declared in 
this scope
libraries/thuban/wxproj.cpp:208: error: `scaley' was not declared in 
this scope
libraries/thuban/wxproj.cpp:208: error: `offx' was not declared in this 
scope
libraries/thuban/wxproj.cpp:208: error: `offy' was not declared in this 
scope
libraries/thuban/wxproj.cpp:209: error: `xs' was not declared in this scope
libraries/thuban/wxproj.cpp:209: error: `i' was not declared in this scope
libraries/thuban/wxproj.cpp:209: error: `ys' was not declared in this scope
libraries/thuban/wxproj.cpp:209: error: `i' was not declared in this scope
libraries/thuban/wxproj.cpp:209: error: ISO C++ forbids declaration of 
`project_point' with no type
libraries/thuban/wxproj.cpp:209: error: `int project_point' redeclared 
as different kind of symbol
libraries/thuban/wxproj.cpp:135: error: previous declaration of `void 
project_point(double*, double*, PJ*, PJ*, double, double, double, 
double, double, double)'
libraries/thuban/wxproj.cpp:209: error: initializer list being treated 
as compound expression
libraries/thuban/wxproj.cpp:210: error: `i' was not declared in this scope
libraries/thuban/wxproj.cpp:210: error: syntax error before `.' token
libraries/thuban/wxproj.cpp:211: error: `i' was not declared in this scope
libraries/thuban/wxproj.cpp:211: error: syntax error before `.' token
libraries/thuban/wxproj.cpp:221: error: syntax error before `>' token
libraries/thuban/wxproj.cpp:221: error: syntax error before `--' token
libraries/thuban/wxproj.cpp:242: error: syntax error before `*' token
libraries/thuban/wxproj.cpp: In function `PyObject* 
draw_polygon_init(PyObject*, PyObject*)':
libraries/thuban/wxproj.cpp:292: error: 'struct s_draw_info' has no 
member named 'dc'
libraries/thuban/wxproj.cpp:292: error: `wxDC' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:292: error: (Each undeclared identifier is 
reported only once for each function it appears in.)
libraries/thuban/wxproj.cpp:292: error: parse error before `)' token
libraries/thuban/wxproj.cpp:293: error: 'struct s_draw_info' has no 
member named 'dc'
libraries/thuban/wxproj.cpp: In function `PyObject* 
draw_polygon_shape(PyObject*, PyObject*)':
libraries/thuban/wxproj.cpp:333: error: `wxPoint' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:333: error: `points' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:334: error: `wxPen' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:334: error: `pen' undeclared (first use this 
function)
libraries/thuban/wxproj.cpp:335: error: `wxBrush' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:335: error: `brush' undeclared (first use 
this function)
libraries/thuban/wxproj.cpp:337: error: `dc' undeclared (first use this 
function)
libraries/thuban/wxproj.cpp:354: error: parse error before `)' token
libraries/thuban/wxproj.cpp:369: error: parse error before `)' token
libraries/thuban/wxproj.cpp:391: error: `project_points' undeclared 
(first use this function)
libraries/thuban/wxproj.cpp:392: error: 'struct s_draw_info' has no 
member named 'dc'
libraries/thuban/wxproj.cpp:397: error: `wxTRANSPARENT_BRUSH' undeclared 
(first use this function)
libraries/thuban/wxproj.cpp:399: error: `wxTRANSPARENT_PEN' undeclared 
(first use this function)
libraries/thuban/wxproj.cpp:407: error: 'struct s_draw_info' has no 
member named 'dc'
libraries/thuban/wxproj.cpp:408: error: 'struct s_draw_info' has no 
member named 'dc'
libraries/thuban/wxproj.cpp: In function `PyObject* 
point_in_polygon_shape(PyObject*, PyObject*)':
libraries/thuban/wxproj.cpp:532: error: `project_points' undeclared 
(first use this function)
libraries/thuban/wxproj.cpp: In function `PyObject* 
shape_centroid(PyObject*, PyObject*)':
libraries/thuban/wxproj.cpp:653: error: `project_point' cannot be used 
as a function
libraries/thuban/wxproj.cpp:659: error: `project_point' cannot be used 
as a function
libraries/thuban/wxproj.cpp: At top level:
libraries/thuban/wxproj.cpp:65: warning: `void* get_pointer(PyObject*)' 
defined but not used
libraries/thuban/wxproj.cpp:135: warning: `void project_point(double*, 
double*, PJ*, PJ*, double, double, double, double, double, double)' 
defined but not used
error: command 'gcc' failed with exit status 1
===========

there's so many errors that I don't know where to start.

the other question is: how to build Python using a specific "po" file? ( 
for testing the Portuguese strings I made)

thanks in advance.

-- 
Eduardo Patto Kanegae
+Homepage:http://www.consultoria.eti.br   ( BRASIL )
*Fo'rum ptMapServer - http://www.consultoria.eti.br/mapserverptforum/ - "UMN MapServer discussions for Portuguese speakers"
*ClickBrasil - http://www.consultoria.eti.br/clickbrasil/  - "Maps of Brazil"
***************************************
***Fim da Mensagem / End of Message ***
***************************************

---

From: Bernhard Reiter <[email-masked]>
Date: Tue, 3 Feb 2004 21:08:03 +0100

> and my build-python.log says:

Do you have wxPython installed?
Is is the right version?

---

From: Frank Koormann <[email-masked]>
Date: Wed, 4 Feb 2004 15:40:44 +0100

> for testing the Portuguese strings I made)

Given you have installed Brazilian Portuguese locales with your
GNU/Linux installation something like 

        LC_ALL=pt_BR python thuban.py

should do it.

Best regards,

        Frank

---

From: Bernhard Herzog <[email-masked]>
Date: Wed, 04 Feb 2004 16:11:36 +0100

> Do you have wxPython installed?

This looks more like missing wxWindows development files.  In most
GNU/LInux distributions develoment files are in separate -dev packages,
so you'll have to install the appropriate -dev package for your
wxWindows package

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

---

From: "Eduardo Patto Kanegae" <[email-masked]>
Date: Wed, 4 Feb 2004 13:39:11 -0200

On Wed, 04 Feb 2004 16:11:36 +0100, Bernhard Herzog <[email-masked]> escreveu:

> De: Bernhard Herzog <[email-masked]>
> Data: Wed, 04 Feb 2004 16:11:36 +0100
> Para: [email-masked]
> Assunto: Re: [Thuban-list] Thuban build error
> 

I´ve just download wxPython packages and I´m gonna test it again.

> so you'll have to install the appropriate -dev package for your

you mean even having wxPython package installed I do need to install wxWindows package?

> _______________________________________________
> Thuban-list mailing list
> [email-masked]
> https://intevation.de/mailman/listinfo/thuban-list
> 
> 
>

---

From: Bernhard Herzog <[email-masked]>
Date: Wed, 04 Feb 2004 17:07:54 +0100

> you mean even having wxPython package installed I do need to install

Depends on how it's packaged.  I don't know how SUSE handles this.
Normally, if the wxPython package you installed requires wxWindows the
wxWindows package will be installed automatically too or installation
fails with a message indicating that wxWindows has to be installed
before wxPython can be installed.  What happens exactly depends on how
you install (rpm at commandline or Yast or whatever).  Anyway, if
wxPython installed cleanly then you most likely already have wxWindows
installed too.  What you may not have installed yet is the wxWindows
devel package.  It's probably called wxGTK-devel or something similar.

   Bernhard

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Wed, 04 Feb 2004 18:14:36 -0200

ok. now my compilations seems to be ok ( i installed wxGTK and wxPython 
and its devel packs too) - at least
gave me no errors.

but, when I try

python thuban.py LC_ALL=pt_BR

or

I receive:

*Gtk-WARNING ** : cannot open display:*

-- 
Eduardo Patto Kanegae
+Homepage:http://www.consultoria.eti.br   ( BRASIL )
+Perfil:http://www.consultoria.eti.br/ptbr/epk.php
*Fórum ptMapServer - http://www.consultoria.eti.br/mapserverptforum/ - "Discussões relacionadas ao MapServer"
*ClickBrasil - http://www.consultoria.eti.br/clickbrasil/  - "Mapas do Brasil com dados censitários"
***************************************
***Fim da Mensagem / End of Message ***
***************************************

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Wed, 04 Feb 2004 18:14:18 -0200

but, when I try

or

I receive:

---

From: Bernhard Reiter <[email-masked]>
Date: Wed, 4 Feb 2004 21:40:36 +0100

> and its devel packs too) - at least

Good.

> *Gtk-WARNING ** : cannot open display:*

You have probably tried that on a command line.
Probably as root?

Try it as user when X11 is started.

Background: 
The system needs the variable DISPLAY to be set
so it can open its windows.
Usually when you open a terminal application from within X11,
echo $DISPLAY 
will show you that everything is alright.
Changing the user to "root" will reset that variable.

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Wed, 04 Feb 2004 19:10:55 -0200

>You have probably tried that on a command line.
Yes.

>Changing the user to "root" will reset that variable.
this is a very good tip...I won't forget this for next compilations.

I'm getting near...near...

now when I run: LC_ALL=pt_BR python /usr/local/Thuban-1.0.0/thuban.py
(or even without LC_ALL option)
I got:
//
Traceback (most recent call last):
  File "/usr/local/Thuban-1.0.0/thuban.py", line 20, in ?
    import Thuban.UI.main
  File "/usr/local/Thuban-1.0.0/Thuban/UI/main.py", line 18, in ?
    from application import ThubanApplication
  File "/usr/local/Thuban-1.0.0/Thuban/UI/application.py", line 26, in ?
    from Thuban.Model.session import create_empty_session
  File "/usr/local/Thuban-1.0.0/Thuban/Model/session.py", line 25, in ?
    from data import ShapefileStore
  File "/usr/local/Thuban-1.0.0/Thuban/Model/data.py", line 23, in ?
    import transientdb
  File "/usr/local/Thuban-1.0.0/Thuban/Model/transientdb.py", line 21, in ?
    from sqlite import connect
ImportError: No module named sqlite
//

thanks

Eduardo Patto Kanegae

>  
>
>------------------------------------------------------------------------
>

--

---

From: Bernhard Herzog <[email-masked]>
Date: Thu, 05 Feb 2004 14:04:08 +0100

> ImportError: No module named sqlite

You hve to install sqlite (http://sqlite.org/) and pysqlite
(http://pysqlite.sourceforge.net/).  I don't know whether SUSE Linux
already has packages for those.

    Bernhard

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Thu, 05 Feb 2004 13:45:50 -0200

ok. I've instaled these packs and it works partialy.

when I try:

eduardopk@localhost:~> python /usr/local/Thuban-1.0.0/thuban.py

thuban's screen appears

but when I try

eduardopk@localhost:~> python /usr/local/Thuban-1.0.0/thuban.py
LC_ALL=pt_BR I got the error in the attached file( sorry for the
attached, I couldn't copy the text from the thuban erro window)

and when I try to load a shp layer, thuban closes leaving this message
at the console:

No thubanstart module available

Segmentation fault.

Eduardo

Bernhard Herzog escreveu:

Bernhard

---

From: Bernhard Reiter <[email-masked]>
Date: Thu, 5 Feb 2004 16:52:21 +0100

>    attached, I couldn't copy the text from the thuban erro window)

You have to set the locale variable before running thuban.
Like
	LC_ALL=pt_BR python /usr/local/Thuban-1.0.0/thuban.py

or before that in the shell:
	export  LC_ALL=pt_BR

---

From: Frank Koormann <[email-masked]>
Date: Thu, 5 Feb 2004 17:06:08 +0100

Hi,

>    eduardopk@localhost:~> python /usr/local/Thuban-1.0.0/thuban.py

OK. Menus are still English?

>    LC_ALL=pt_BR I got the error in the attached file( sorry for the attached,
>    I couldn't copy the text from the thuban erro window)

Parts of this message seems already to be Portuguese. What are your
settings for LC_ALL or LANG respectively?

Nearby, I just uploaded a fixed version of the Portuguese translation,
there was a bug in the error message format string.

Regards,

        Frank

---

From: Bernhard Herzog <[email-masked]>
Date: Thu, 05 Feb 2004 17:06:41 +0100

Eduardo Patto Kanegae <[email-masked]> writes:

> and when I try to load a shp layer, thuban closes leaving this message at
> the console:

That (the segfault) is usually the result of a binary incompatibility
between Thuban's wxproj.so module and your wxWindows library.  Most
likely the headerfiles used when compiling Thuban don't match the
wxWindows library.  Make sure that the wxgtk-devel package and the wxgtk
package you use have exactly the same version number and are both built
for your linux distribution (if they come with the distribution that
would be best, of course).

   Bernhard

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Thu, 05 Feb 2004 14:16:28 -0200

OK. I tried the 'export' command

and menus keep in English.

but, I 'll download the fixed pt_BR translated file and check wx 
instalations as suggested by Bernard.

thanks

Eduardo

---

From: Frank Koormann <[email-masked]>
Date: Thu, 5 Feb 2004 17:24:22 +0100

Eduardo,

> instalations as suggested by Bernard.

what are your default settings for LC_ALL or LANG? Please open a new
shell and issue 
        echo $LC_ALL 
etc.
to check.

Best regards,

        Frank

---

From: Bernhard Herzog <[email-masked]>
Date: Thu, 05 Feb 2004 17:28:02 +0100

> what are your default settings for LC_ALL or LANG? Please open a new

Also: do you have a file Resources/Locale/pt_BR/LC_MESSAGES/thuban.mo in
the thuban directory?  If not create it by running "make mo" in the po/
subdirectory.

  Bernhard

---

From: Eduardo Patto Kanegae <[email-masked]>
Date: Thu, 05 Feb 2004 19:03:44 -0200

OK. voa-la!!!

now all menus in Portuguese.

I've just edited my old pt_BR and set the proper charset(ISO-8859-1)
and then make mo

and it works.

now I'm gonna download lastest cvs version( including the fixed pt_BR
made by Frank)

and later I back you for feedback.

thanks

Eduardo

Eduardo,

Bernhard