How can I translate this program?

54 views
Skip to first unread message

Roi Xordo

unread,
Oct 15, 2009, 4:59:14 AM10/15/09
to sofastatistics
How can I translate this program?
Is this possible?
I would like to traslate it to galician language.
Regards!

pyGrant

unread,
Oct 15, 2009, 5:40:12 AM10/15/09
to sofastatistics
Hi Roi,

That's a great idea. The code for SOFA Statistics is hosted on
Launchpad and there is apparently a proper way of doing this. I will
need to look at that soon and let you know what the options are. Here
are some references:

https://help.launchpad.net/Translations/YourProject/ImportPolicy
https://launchpad.net/+tour/translation

If you want to get started while I am making the required changes,
feel free to post some translations here. When everything is set up
we can transfer those into the main project.

Here are a few sample strings to get started with:

"Welcome to SOFA. Hover the mouse over the buttons on the left to see
what you can do."

"Enter data into a fresh dataset or select an existing one to edit or
add data to."

"Run statistical tests on your data - e.g. a Chi Square to see if
there is a relationship between age group and gender."

Quite a large proportion of the site visits for http://www.sofastatistics.com
are from countries where English is not the main language so it will
be very interesting to see where this goes.


All the best, Grant

Chris Gale

unread,
Oct 15, 2009, 4:40:12 PM10/15/09
to sofasta...@googlegroups.com
I think there is a lot of work done by canonical and the gnome group about translation in general and you may be able to use those libraries.
 
Chris

2009/10/15 Roi Xordo <ifre...@gmail.com>



--
Christopher Gale
Dunedin, New Zealand

Indalecio Freiría Santos

unread,
Oct 16, 2009, 6:08:49 AM10/16/09
to sofasta...@googlegroups.com
Hi all,
I were looking at the source code and i found that it is not internazionalitated. It would be a good idea that SOFA consider implement gettext in the code source.
I don't anything about python, but in this page i found good information about gettetx:
http://docs.python.org/library/gettext.html
Perhaps you could take a look at this document.

BTW, the translations of these strings to galician would look like this::

"Benvido a SOFA, Poña o rato sobre os botons da esquerda para ver que pode facer."

"Insira datos nun conxunto de datos baleiro ou escolle un xa existente para editalo ou
agregarlle datos ."

"Executar estatísticas de proba sobre os datos - por exemplo, un Chi Square para ver se
existe unha relación entre o grupo de idade e xénero."

Regards.

2009/10/15 pyGrant <gr...@p-s.co.nz>

pyGrant

unread,
Oct 16, 2009, 3:56:27 PM10/16/09
to sofastatistics
Hi Indalecio,

Agreed. Here is what I'm looking at currently as I prepare to make
that next step:

https://help.launchpad.net/Translations/YourProject/ImportPolicy
https://launchpad.net/+tour/translation
http://www.gnu.org/software/gettext/manual/gettext.html
https://help.launchpad.net/Translations/ImportingFromBazaarBranches

Does anyone know of an internationalised python application I could
look at the source code of? Preferably one that is simple and does a
good job of it ;-).

All the best, Grant

On Oct 16, 11:08 pm, Indalecio Freiría Santos <ifrei...@gmail.com>
wrote:

Indalecio Freiría Santos

unread,
Oct 19, 2009, 5:51:56 AM10/19/09
to sofasta...@googlegroups.com
Hi Grant,
I think that a good example of  an internationalised python application could be Mailman.
http://www.gnu.org/software/mailman/index.html

Regards

2009/10/16 pyGrant <gr...@p-s.co.nz>

pyGrant

unread,
Oct 19, 2009, 6:17:55 AM10/19/09
to sofastatistics
Hi Indalecio,

Thanks for that. I have just had a look at some of the source code on
the mailman Launchpad site. That is quite a project!

Since I posted my request I have been offered some help by other
members of the NZ Python User Group. For the next few days I will be
focusing on the resources I can get direct help with. In particular,
I am looking at the code of http://www.tubecaster.org/. The
developer, Wayne Koorts, is a member of the group, so I will be able
to interact about some very specific issues.

I shall also be looking very closely at this site for guidance on
internationalisation of my wxPython code: http://wiki.wxpython.org/Internationalization

I think I will put out one release very soon to flush out all the
other changes I have made (mainly interface improvements esp for
notebook use) and then try another release soon afterwards which is
purely focused on i18n.

All the best, Grant

On Oct 19, 10:51 pm, Indalecio Freiría Santos <ifrei...@gmail.com>
wrote:
> Hi Grant,
> I think that a good example of  an internationalised python application
> could be Mailman.http://www.gnu.org/software/mailman/index.html

pyGrant

unread,
Oct 20, 2009, 10:22:16 PM10/20/09
to sofastatistics
I have just released 0.8.10 so I can now focus more freely on
internationalisation.

On Oct 19, 11:17 pm, pyGrant <gr...@p-s.co.nz> wrote:
> Hi Indalecio,
>
> Thanks for that.  I have just had a look at some of the source code on
> the mailman Launchpad site.  That is quite a project!
>
> Since I posted my request I have been offered some help by other
> members of the NZ Python User Group.  For the next few days I will be
> focusing on the resources I can get direct help with.  In particular,
> I am looking at the code ofhttp://www.tubecaster.org/.  The

pyGrant

unread,
Oct 22, 2009, 6:59:30 AM10/22/09
to sofastatistics
Nearly completed making all the changes necessary to produce a
complete *.pot file.

Indalecio Freiría Santos

unread,
Oct 22, 2009, 7:50:48 AM10/22/09
to sofasta...@googlegroups.com
It's great to hear that!!

Good job.

2009/10/22 pyGrant <gr...@p-s.co.nz>

pyGrant

unread,
Oct 22, 2009, 5:49:59 PM10/22/09
to sofastatistics
Hi,

I have added the sofa_gl_ES.po and sofa.pot files to the Translation
section of Launchpad and progress can be tracked here:
https://translations.launchpad.net/sofastatistics/0.8/+imports

Indalecio - are you using the deb or the Windows packages? Once we
have a completed po file for Galician I would be keen to test it
separately from any public releases. Would you be willing to test it
and give feedback?

All the best, Grant

On Oct 23, 12:50 am, Indalecio Freiría Santos <ifrei...@gmail.com>

Indalecio Freiría Santos

unread,
Oct 26, 2009, 9:50:10 AM10/26/09
to sofasta...@googlegroups.com
Oops, I thougth I had already answered this mail.

It would be great to test this new internationalized release of sofa.
I use the .deb version.

Now i am going to download this gl_ES.po, and translate it. I will
send it to you as soon as i finish.

Sorry for the delay in answering...


2009/10/22 pyGrant <gr...@p-s.co.nz>

Indalecio Freiría Santos

unread,
Oct 29, 2009, 3:42:08 AM10/29/09
to sofasta...@googlegroups.com
Hi again,
I just finished translating an "alpha" version of tis file gl_ES.po.
In a "normal" case, I now would be testing the translation with the
program (i mean, compile that .po, run the program and see if
everything is what and where i thought while translating). So...

Could you send me an internationalized version of SOFA? I'll run it,
try it, and send you some feedback.

(BTW: I had some problems installing Sofa - and its dependencies - on
Ubuntu 64bits. I am not sure wether it was some SOFA-related problem,
or something on my computer - I use this machine for testing, and
installed there lots of things, perhaps something i had installed is
conflicting, or whatever- . Have any of you had problems in such a
environment? I mean, if it is something "Sofa-dependencies-related", I
would like to know, and so i could stop looking for what is wrong,
hehehe)

Regards
sofa_gl_ES.po

pyGrant

unread,
Oct 29, 2009, 5:11:11 PM10/29/09
to sofastatistics
Stunning! And thanks for that.

I might have a try myself before sending you the first
internationalised version. Just in case there are any rough edges.

Re: 64-bit issues, others have been able to successfully install SOFA
Statistics on 64-bit systems but there may sometimes be issues with
the special wxWebKit package (for HTML rendering) that is currently
required. There could be problems, for example, if a user has already
installed an application with a dependency on a particular version of
curl or wxgtk. I am not entirely surprised to hear there were some
issues but I am hoping those will go once the proper release of
wxWebKit becomes available.

Back in touch soon.

On Oct 29, 8:42 pm, Indalecio Freiría Santos <ifrei...@gmail.com>
wrote:
>  sofa_gl_ES.po
> 54KViewDownload

Grant Paton-Simpson

unread,
Oct 29, 2009, 7:17:03 PM10/29/09
to sofasta...@googlegroups.com
Hi Indalecio,

Nearly there (see attached image).

One question. Is Galician your default language on your Ubuntu set up?
If it is, I will send a package which will automatically displays the
default language (or fall back to English). If not, I can send a
version which defaults to Galician.


All the best, Grant

early_galician.jpg

Indalecio Freiría Santos

unread,
Oct 30, 2009, 4:46:41 AM10/30/09
to sofasta...@googlegroups.com
Hi Grant,

My default language on my Ubuntu is set to  Galician.

BTW, the string "Default project so users can get started without having to understand projects ;-) .  NB read only." is not internationalized, this string is in file: "SOFA_Default_Project.proj" . Galician translation will be "Proxecto predeterminado para que os usuarios poidan comezar sen ter que coñecer os proxectos ;-)"

Thanks for all

2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz>

Grant Paton-Simpson

unread,
Oct 30, 2009, 4:30:17 PM10/30/09
to sofasta...@googlegroups.com
Hi Indalecio,

Indalecio Freiría Santos wrote:
> Hi Grant,
>
> My default language on my Ubuntu is set to Galician.

Excellent. In that case, I will send a deb package to you soon which
automatically displays the default language (fingers crossed ;-)).


>
> BTW, the string "Default project so users can get started without
> having to understand projects ;-) . NB read only." is not
> internationalized, this string is in file: "SOFA_Default_Project.proj"
> . Galician translation will be "Proxecto predeterminado para que os
> usuarios poidan comezar sen ter que coñecer os proxectos ;-)"

Actually there are a handful of strings that have slipped through. I
will have to regenerate the pot, po, and mo files later. For the
specific string you have mentioned, I have added some code so that a
translated string will be displayed, rather than the source notes as
stored in the file, if the project is the default one.

But let's deal with the gaps a little later. At this point, I would
like to make sure you successfully see everything working. Does the
application even detect your locale successfully at all? Do you know
any Windows users (with Galician as the default of course) who could
check it on that OS as well?

The remaining issues will be:

- updating a complete po file
- shortening long labels/adding line breaks where necessary for layout.
E.g. in English I might change Information to Info or Configuration to
Config. NB if that is too hard in some cases, please let me know. I
may need to tweak layout a little bit.
- anything we've missed, esp on Windows ;-)

We are very close to a multilingual SOFA Statistics. Thank you very
much for your assistance. Of course, you will be formerly credited with
the translation on the SOFA Statistics site once we are finished.


All the best, Grant
>
> Thanks for all
>
> 2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>

> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>>

Grant Paton-Simpson

unread,
Oct 30, 2009, 6:08:23 PM10/30/09
to sofasta...@googlegroups.com
Hi Indalecio,

I have made a fresh deb package for you (0.8.10.5). Good luck!


All the best, Grant


Indalecio Freiría Santos wrote:
> Hi Grant,
>
> My default language on my Ubuntu is set to Galician.
>
> BTW, the string "Default project so users can get started without
> having to understand projects ;-) . NB read only." is not
> internationalized, this string is in file: "SOFA_Default_Project.proj"
> . Galician translation will be "Proxecto predeterminado para que os
> usuarios poidan comezar sen ter que coñecer os proxectos ;-)"
>
> Thanks for all
>

> 2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>

> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>>

sofa_0.8.10.5-1_all.deb

Indalecio Freiría Santos

unread,
Nov 2, 2009, 9:20:31 AM11/2/09
to sofasta...@googlegroups.com


2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz>


Hi Indalecio,


Indalecio Freiría Santos wrote:
Hi Grant,

My default language on my Ubuntu is set to  Galician.
Excellent.  In that case, I will send a deb package to you soon which automatically displays the default language (fingers crossed ;-)).


BTW, the string "Default project so users can get started without having to understand projects ;-) .  NB read only." is not internationalized, this string is in file: "SOFA_Default_Project.proj" . Galician translation will be "Proxecto predeterminado para que os usuarios poidan comezar sen ter que coñecer os proxectos ;-)"
Actually there are a handful of strings that have slipped through.  I will have to regenerate the pot, po, and mo files later.  For the specific string you have mentioned, I have added some code so that a translated string will be displayed, rather than the source notes as stored in the file, if the project is the default one.

But let's deal with the gaps a little later.  At this point, I would like to make sure you successfully see everything working.  Does the application even detect your locale successfully at all?  Do you know any Windows users (with Galician as the default of course) who could check it on that OS as well?

Yes, galician was detected and displayed well.
Yes, I can get in touch with someone who can test windows package (if you send it to me I would manage to find someone to test it)

 

The remaining issues will be:

- updating a complete po file
- shortening long labels/adding line breaks where necessary for layout.  E.g. in English I might change Information to Info or Configuration to Config.  NB if that is too hard in some cases, please let me know.  I may need to tweak layout a little bit.

I think that the best solution would be making labels resizeable. If we think in languages writen rigth-to-left, for example, perhaps this could be the only solution... Do you think you will be able to do this?
 

pyGrant

unread,
Nov 2, 2009, 2:26:29 PM11/2/09
to sofastatistics
Hi Indalecio,

Excellent. I'll put a Windows package together as soon as I can.

Re: label sizes, I generally agree about the benefits of fluid vs
fixed design (esp for web design). But the SOFA Statistics main menu
(the Start form) is a little different from the rest of the SOFA
Statistics interface. In particular, I want to keep the buttons to a
fixed width. I'll resize the whole form so as to allow a bit more
width in key places without risking the aesthetics of the relative
proportions.


All the best, Grant

On Nov 3, 3:20 am, Indalecio Freiría Santos <ifrei...@gmail.com>
wrote:

Grant Paton-Simpson

unread,
Nov 3, 2009, 8:05:47 AM11/3/09
to sofasta...@googlegroups.com
Hi Indalecio,

I have made a fresh Windows package for 0.8.10.9
(http://www.sofastatistics.com/misc/sofa-0.8.10.9_python-2.6_for_win.zip).
It has been tested, but not as thoroughly as a proper release. There
was a bit of a delay as I dealt with some Windows-specific bugs to do with:
- new line support in project files,
- the need to initialise wx.App before referring to anything from the wx
module,
- and the absence of line breaks in checkbox labels.
I also resized the main form to better cater to longer strings (when
translated out of English).

If everything works OK with your Windows testing, the next and final
step will be to produce a fresh pot file, and a fresh sofa_gl_ES.po
file. The starting po file will be mostly complete but a few additions
and minor changes are needed.

I will then release 0.8.11.

Grant Paton-Simpson

unread,
Nov 4, 2009, 5:11:30 PM11/4/09
to sofasta...@googlegroups.com
Hi Indalecio,

There are only 6 small additions in the revised (and attached)
sofa_gl_ES.po file to bring it completely up-to-date with what will be
0.8.11:

lines 171, 464, 504, 1068, 1351, and 1414


All the best, Grant

sofa_gl_ES.po

Indalecio Freiría Santos

unread,
Nov 5, 2009, 4:36:58 AM11/5/09
to sofasta...@googlegroups.com
Hi Grant,

I attach the updated sofa_gl_ES.po

Also, I tested the windows version, and unfortunately its seems not to work.

Regards.


2009/11/4 Grant Paton-Simpson <gr...@p-s.co.nz>
sofa_gl_ES.po

pyGrant

unread,
Nov 5, 2009, 4:45:27 AM11/5/09
to sofastatistics
Hi Indalecio,

Thanks for the translation.

Sad to hear about the problems. What didn't work? If you look at "C:
\Documents and Settings\username\sofa\internal" there is a file called
output.txt (If in Vista or Windows 7 it will be "C:\Users ..."). Does
that have any error messages you could pass on?

I have found a couple of bugs affecting table reporting and stats
reporting. Was it about this area of functionality or did it even
affect opening the default database table?

Thanks for your testing - even though it was not the desired
outcome ;-).


All the best, Grant


On Nov 5, 10:36 pm, Indalecio Freiría Santos <ifrei...@gmail.com>
wrote:
>  sofa_gl_ES.po
> 55KViewDownload

Indalecio Freiría Santos

unread,
Nov 5, 2009, 7:31:36 AM11/5/09
to sofasta...@googlegroups.com
Hi Grant,

Maybe I just misstated, the program works, the only problem is that it is not shown in Galician.

BTW, I glanced at the output.txt file and saw the following message:

Traceback (most recent call last):
  File "C:\Program Files\sofa\start.pyw", line 369, in OnPaint
    my_globals.SOFA_DEFAULT_DB))
pysqlite2._sqlite.OperationalError: unable to open database file

One clarification, the galician "version" of Windows is merely a language pack, maybe the problem could be there?.
How does gettext check on windows which language to use? I am not the biggest expert in Microsoft windows, to say the truth... ;)

Regards




2009/11/5 pyGrant <gr...@p-s.co.nz>

Grant Paton-Simpson

unread,
Nov 5, 2009, 2:03:58 PM11/5/09
to sofasta...@googlegroups.com
Hi Indalecio,

Very relieved to hear that. I'll look into that error message in a
couple of days. I have a presentation on SOFA Statistics to deliver at
the Kiwi PyCon this weekend :-).

BTW The code that failed was:

# make default db if not already there
connSqlite = sqlite.connect(os.path.join(LOCAL_PATH,

my_globals.INTERNAL_FOLDER,

my_globals.SOFA_DEFAULT_DB))
connSqlite.close()

I suspect this will be one of the easier bugs to fix.

I can test the Galician version in Windows when I get back - both on my
standard, working virtualbox installation, and my clean virtualbox
installation.


All the best, Grant

Indalecio Freiría Santos wrote:
> Hi Grant,
>

> Maybe I just misstated, the program works, the only problem is that it
> is not shown in Galician.
>
> BTW, I glanced at the output.txt file and saw the following message:
>
> Traceback (most recent call last):
> File "C:\Program Files\sofa\start.pyw", line 369, in OnPaint
> my_globals.SOFA_DEFAULT_DB))
> pysqlite2._sqlite.OperationalError: unable to open database file
>
> One clarification, the galician "version" of Windows is merely a
> language pack, maybe the problem could be there?.
> How does gettext check on windows which language to use? I am not the
> biggest expert in Microsoft windows, to say the truth... ;)
>
> Regards
>
>
>
>

> 2009/11/5 pyGrant <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>


>
>
> Hi Indalecio,
>
> Thanks for the translation.
>
> Sad to hear about the problems. What didn't work? If you look at "C:
> \Documents and Settings\username\sofa\internal" there is a file called
> output.txt (If in Vista or Windows 7 it will be "C:\Users ..."). Does
> that have any error messages you could pass on?
>
> I have found a couple of bugs affecting table reporting and stats
> reporting. Was it about this area of functionality or did it even
> affect opening the default database table?
>
> Thanks for your testing - even though it was not the desired
> outcome ;-).
>
>
> All the best, Grant
>
>
> On Nov 5, 10:36 pm, Indalecio Freiría Santos <ifrei...@gmail.com

> <mailto:ifrei...@gmail.com>>


> wrote:
> > Hi Grant,
> >
> > I attach the updated sofa_gl_ES.po
> >
> > Also, I tested the windows version, and unfortunately its seems
> not to work.
> >
> > Regards.
> >
> > 2009/11/4 Grant Paton-Simpson <gr...@p-s.co.nz

> <mailto:gr...@p-s.co.nz>>

> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>>


> > >>> wrote:
> >
> > >>>> 2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz

> <mailto:gr...@p-s.co.nz>>

> <mailto:gr...@p-s.co.nz> <mailto:

> <mailto:ifrei...@gmail.com <mailto:ifrei...@gmail.com>>>

pyGrant

unread,
Nov 8, 2009, 9:01:10 PM11/8/09
to sofastatistics
Hi Indalecio,

I was unable to repeat the error that you experienced. Did it stop
you opening the test data? If not, we can probably overlook it for
the time being.

Re: language settings: I have selected Galician for my regional/
language settings in XP but everything still seems to be in English.
The keyboard is now different but none of the actual Windows XP text
is in Galician.

If I change start.py so it is:

test_lang = True

on line 5, I see the strings you gave me but the text is not quite
right (e.g. táboa is shown as t, then a capital A with a squiggle on
top, then an i, then boa).

I also get a Pythonw warning "Locale 'Galician' not supported by OS".

Anybody out there know what XP is meant to function like in Galician?
Any help or expertise is very much welcomed. My system seems to be
English with Galician language support. If I can't figure this out
properly I'll release 0.8.11 as is with a mention that Galician
support is currently only available in Ubuntu.

BTW everything works very well in Ubuntu. Perhaps Windows isn't ready
for the Desktop ;-).


All the best, Grant

Indalecio Freiría Santos

unread,
Nov 9, 2009, 10:59:35 AM11/9/09
to sofasta...@googlegroups.com

Hi Grant,

I think this could be a problem relative with UTF vs ISO-8859. Do you know wether windows can work with UTF8?
I'm sorry for not being able to help you more...

BTW, I send you to the updated Galician translation  of sofa, reviewed by a linguist!

Regards.


2009/11/9 pyGrant <gr...@p-s.co.nz>
sofa_gl_ES.po

Grant Paton-Simpson

unread,
Nov 9, 2009, 2:37:41 PM11/9/09
to sofasta...@googlegroups.com
Hi Indalecio,

Thanks for the new po file. That will be the basis for the next version.

I will need to do some more research on Python i18n on Windows.

BTW you now get an acknowledgement under the "Speaking your language"
section of the SOFA Statistics features page
(http://www.sofastatistics.com/features.php). Thanks you so much for
getting things started and following through on it.


All the best, Grant


Indalecio Freiría Santos wrote:
>
> Hi Grant,
>

> I think this could be a problem relative with UTF vs ISO-8859. Do you
> know wether windows can work with UTF8?
> I'm sorry for not being able to help you more...
>
> BTW, I send you to the updated Galician translation of sofa, reviewed
> by a linguist!
>
> Regards.
>
>

> 2009/11/9 pyGrant <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>


>
>
> Hi Indalecio,
>
> I was unable to repeat the error that you experienced. Did it stop
> you opening the test data? If not, we can probably overlook it for
> the time being.
>
> Re: language settings: I have selected Galician for my regional/
> language settings in XP but everything still seems to be in English.
> The keyboard is now different but none of the actual Windows XP text
> is in Galician.
>
> If I change start.py so it is:
>
> test_lang = True
>
> on line 5, I see the strings you gave me but the text is not quite
> right (e.g. táboa is shown as t, then a capital A with a squiggle on
> top, then an i, then boa).
>
> I also get a Pythonw warning "Locale 'Galician' not supported by OS".
>
> Anybody out there know what XP is meant to function like in Galician?
> Any help or expertise is very much welcomed. My system seems to be
> English with Galician language support. If I can't figure this out
> properly I'll release 0.8.11 as is with a mention that Galician
> support is currently only available in Ubuntu.
>
> BTW everything works very well in Ubuntu. Perhaps Windows isn't ready
> for the Desktop ;-).
>
>
> All the best, Grant
>
> On Nov 6, 8:03 am, Grant Paton-Simpson <gr...@p-s.co.nz

> <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>>
> >
> > > Hi Indalecio,
> >

> > > Thanks for the translation.
> >
> > > Sad to hear about the problems. What didn't work? If you
> look at "C:
> > > \Documents and Settings\username\sofa\internal" there is a
> file called
> > > output.txt (If in Vista or Windows 7 it will be "C:\Users
> ..."). Does
> > > that have any error messages you could pass on?
> >
> > > I have found a couple of bugs affecting table reporting
> and stats
> > > reporting. Was it about this area of functionality or did
> it even
> > > affect opening the default database table?
> >
> > > Thanks for your testing - even though it was not the desired
> > > outcome ;-).
> >
> > > All the best, Grant
> >
> > > On Nov 5, 10:36 pm, Indalecio Freiría Santos
> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>

> > > <mailto:ifrei...@gmail.com <mailto:ifrei...@gmail.com>>>
> > > wrote:
> > > > Hi Grant,
> >
> > > > I attach the updated sofa_gl_ES.po
> >
> > > > Also, I tested the windows version, and unfortunately
> its seems
> > > not to work.
> >
> > > > Regards.
> >
> > > > 2009/11/4 Grant Paton-Simpson <gr...@p-s.co.nz
> <mailto:gr...@p-s.co.nz>

> > > <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>>
> >
> > > > > Hi Indalecio,
> >

> > > <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>> <mailto:
> > > > >>>>>> gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>
> <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>>>

pyGrant

unread,
Nov 10, 2009, 12:54:23 AM11/10/09
to sofastatistics
Hi Indalecio,

What happens if you edit (in Windows) C:\Program Files\sofa\start.pyw
so that line 5 becomes:

test_lang = True

Does it show:
a) English?
b) mangled Galician?
c) correct Galician?


All the best, Grant

On Nov 6, 1:31 am, Indalecio Freiría Santos <ifrei...@gmail.com>

Indalecio Freiría Santos

unread,
Nov 10, 2009, 4:57:48 AM11/10/09
to sofasta...@googlegroups.com
Hi Grant,

First of all, thanks for acknowledgement, but the fact that the program is internationalized is already an acknowledgement in itself.

If I edit C:\Program Files\sofa\start.pyw it shows correct galician, but the problem is in words with non-ascii symbols (the same that happen to you with "táboa").

Regards.


2009/11/10 pyGrant <gr...@p-s.co.nz>

Grant Paton-Simpson

unread,
Nov 10, 2009, 2:39:48 PM11/10/09
to sofasta...@googlegroups.com
Hi Indalecio,

We're getting somewhere. Did you also get a Pythonw warning "Locale
'Galician' not supported by OS"?

I'm not sure what a Windows XP system is meant to look like when it
support Galician. Are menus, buttons etc all in Galician, including
with the non-English characters e.g. í ? The fact that everything is
correct in Ubuntu without any changes in code suggests that the SOFA
Statistics code isn't entirely broken. Are there any Galician Windows
users (whether or not using SOFA Statistics) who could advise on what is
a normal Galician setup in Windows. Can you think of any Indalecio (not
so many down here in New Zealand ;-))? And does it have to be Galician
at installation or are the Control Panel>Regional/Language Settings
relevant? Etc.

I can get dates and currency in Windows XP to display in Galician with
some Control Panel settings but there is still the problem with
non-ascii characters. That seems to be the real issue.

The goal is to draft a simple how to, or at least an explanation of when
it will or won't work.


All the best, Grant


Indalecio Freiría Santos wrote:
> Hi Grant,
>

> First of all, thanks for acknowledgement, but the fact that the
> program is internationalized is already an acknowledgement in itself.
>
> If I edit C:\Program Files\sofa\start.pyw it shows correct galician,
> but the problem is in words with non-ascii symbols (the same that
> happen to you with "táboa").
>
> Regards.
>
>

> 2009/11/10 pyGrant <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>


>
>
> Hi Indalecio,
>
> What happens if you edit (in Windows) C:\Program Files\sofa\start.pyw
> so that line 5 becomes:
>
> test_lang = True
>
> Does it show:
> a) English?
> b) mangled Galician?
> c) correct Galician?
>
>
> All the best, Grant
>
> On Nov 6, 1:31 am, Indalecio Freiría Santos <ifrei...@gmail.com

> <mailto:ifrei...@gmail.com>>


> wrote:
> > Hi Grant,
> >
> > Maybe I just misstated, the program works, the only problem is
> that it is
> > not shown in Galician.
> >
> > BTW, I glanced at the output.txt file and saw the following message:
> >
> > Traceback (most recent call last):
> > File "C:\Program Files\sofa\start.pyw", line 369, in OnPaint
> > my_globals.SOFA_DEFAULT_DB))
> > pysqlite2._sqlite.OperationalError: unable to open database file
> >
> > One clarification, the galician "version" of Windows is merely a
> language
> > pack, maybe the problem could be there?.
> > How does gettext check on windows which language to use? I am
> not the
> > biggest expert in Microsoft windows, to say the truth... ;)
> >
> > Regards
> >

> > 2009/11/5 pyGrant <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>


> >
> >
> >
> > > Hi Indalecio,
> >
> > > Thanks for the translation.
> >
> > > Sad to hear about the problems. What didn't work? If you
> look at "C:
> > > \Documents and Settings\username\sofa\internal" there is a
> file called
> > > output.txt (If in Vista or Windows 7 it will be "C:\Users
> ..."). Does
> > > that have any error messages you could pass on?
> >
> > > I have found a couple of bugs affecting table reporting and stats
> > > reporting. Was it about this area of functionality or did it even
> > > affect opening the default database table?
> >
> > > Thanks for your testing - even though it was not the desired
> > > outcome ;-).
> >
> > > All the best, Grant
> >
> > > On Nov 5, 10:36 pm, Indalecio Freiría Santos

> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>>


> > > wrote:
> > > > Hi Grant,
> >
> > > > I attach the updated sofa_gl_ES.po
> >
> > > > Also, I tested the windows version, and unfortunately its
> seems not to
> > > work.
> >
> > > > Regards.
> >
> > > > 2009/11/4 Grant Paton-Simpson <gr...@p-s.co.nz

> <mailto:gr...@p-s.co.nz>>

> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>>


> > > > >>> wrote:
> >
> > > > >>>> 2009/10/30 Grant Paton-Simpson <gr...@p-s.co.nz

> <mailto:gr...@p-s.co.nz>>


> >
> > > > >>>>> Hi Indalecio,
> > > > >>>>> Indalecio Freiría Santos wrote:
> >
> > > > >>>>>> Hi Grant,
> > > > >>>>>> My default language on my Ubuntu is set to
> Galician.
> >
> > > > >>>>> Excellent. In that case, I will send a deb package to
> you soon
> > > which
> > > > >>>>> automatically displays the default language (fingers
> crossed ;-)).
> >
> > > > >>>>>> BTW, the string "Default project so users can get
> started without
> > > > >>>>>> having
> > > > >>>>>> to understand projects ;-) . NB read only." is not
> > > internationalized,
> > > > >>>>>> this
> > > > >>>>>> string is in file: "SOFA_Default_Project.proj" . Galician
> > > translation
> > > > >>>>>> will
> > > > >>>>>> be "Proxecto predeterminado para que os usuarios
> poidan comezar
> > > sen
> > > > >>>>>> ter que

> > > > >>>>>> cońecer os proxectos ;-)"

> <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz> <mailto:

> <mailto:ifrei...@gmail.com <mailto:ifrei...@gmail.com>>>

Indalecio Freiría Santos

unread,
Nov 17, 2009, 5:51:57 AM11/17/09
to sofasta...@googlegroups.com
Hi Grant,
I was researching how utf8 works in windows and found this:
http://codesnipers.com/?q=utf-8-versus-windows-unicode
I don't know if this can help.

Regards

2009/11/10 Grant Paton-Simpson <gr...@p-s.co.nz>

Grant Paton-Simpson

unread,
Nov 17, 2009, 4:53:14 PM11/17/09
to sofasta...@googlegroups.com
Hi Indalecio,

Thanks for that. It was interesting* but I think the quest will have to
continue. Do you have any answers to the questions below? Presumably
there will need to be someone you know who has Windows installed and
Galician working.


All the best, Grant

* I am more convinced than ever we need to back unicode and make this a
properly solved problem within 20 years.

Grant Paton-Simpson

unread,
Nov 17, 2009, 10:40:32 PM11/17/09
to sofasta...@googlegroups.com
Hi Indalecio,

I don't know where this is leading but at least I now know why the
particular faulty characters are appearing on Windows.

OK - I want to see está on the screen but instead see está (if this
email fails to display properly, the first esta should have an accent
over the a, and the second should have a capital A with a tilde and a
lower-case i).

Is there a connection between these two? Yes. If you open IDLE

>>> esta = "está"
>>> print esta
está
>>> esta
'est\xc3\xa1'
>>> print u'est\xc3\xa1'
está

As unicode, "está" ought to be u'\xe1' not u'est\xc3\xa1'.

>>> esta.decode("utf-8")
u'est\xe1'

So a raw byte string is being treated as if it is already a unicode
string without being actually decoded into unicode.

Why? No idea. It doesn't happen in Ubuntu. And I can't help wondering
if the problem would just go away if I wasn't getting the message
"Pythonw Warning – Locale 'Galician' not supported by OS.".

Grant Paton-Simpson

unread,
Nov 18, 2009, 5:47:01 AM11/18/09
to sofasta...@googlegroups.com
Hi Indalecio,

I think I know what is going on in Windows now. Let's just look at an
'a' with an accent.

>>> a = "á"

What is that in bytes (the 1s and 0s stored by the computer*)?
* my apologies if you are a programmer as well as a statistics user and
already know all this ;-)

>>> a
'\xc3\xa1'

Cool - it is represented as two bytes (i.e. á is a multibyte unicode
character).

Now let's decode these separate bytes into the main Microsoft encoding
of CP1252 (http://en.wikipedia.org/wiki/Windows-1252) one at a time and
see if it matches what Windows displays.

>>> print unicode('\xc3', "cp1252")
Ã
>>> print unicode('\xa1', "cp1252")
¡

Voilà! (Or should that be Voilà ! from a Microsoft point of view!).

I will look into saving the translation file encoded as CP1252. We
could be close to a solution.

Indalecio Freiría Santos

unread,
Nov 18, 2009, 6:53:02 AM11/18/09
to sofasta...@googlegroups.com
Hi Grant,
I think we just got to a point where I feel that I can not help you.
I have no idea of what character encoding Windows uses. Also, I don't
know python programming, so I really feel I can not help you in any
way.
I am very sorry about saying this... :-(

Regards

2009/11/18 Grant Paton-Simpson <gr...@p-s.co.nz>:

Grant Paton-Simpson

unread,
Nov 18, 2009, 3:03:28 PM11/18/09
to sofasta...@googlegroups.com
Hi Indalecio,

My apologies - I wasn't needing you to do anything to do with encoding
etc. The last email was largely for the record. Anyway, I think I have
almost solved the problem. I will post a couple of files as soon as I
can which will hopefully result in Galician working nicely in Windows.
Thanks for all your input so far.

Grant Paton-Simpson

unread,
Nov 24, 2009, 3:51:19 AM11/24/09
to sofasta...@googlegroups.com
Hi Indalecio,

Please find attached a revised sofa_gl_ES.po file with a few gaps. Are
you able to fill those? As you can see, I have been making SOFA
Statistics more informative whenever something goes wrong.

The gaps are:

line 173:

#: output_buttons.py:16
#, python-format
msgid "Add to%sreport"
msgstr ""

line 470:

#: dataselect.py:19
#, python-format
msgid "Data in \"%s\" Project"
msgstr ""

line 511

#: projects.py:38
msgid "Default project so users can get started without having to
understand projects. NB read only."
msgstr ""

line 584:

#: projects.py:64 projects.py:474 projselect.py:103
#, python-format
msgid "Error processing project file \"%s\"."
msgstr ""

#: projects.py:95
#, python-format
msgid "Error processing variable details file \"%s\"."
msgstr ""

line 1095

#: mann_whitney.py:13
msgid "Ranked"
msgstr ""

line 1280:

#: projects.py:59 projects.py:469 projselect.py:98
#, python-format
msgid "Syntax error in project file \"%s\"."
msgstr ""

#: projects.py:90
#, python-format
msgid "Syntax error in variable details file \"%s\"."
msgstr ""

line 1352:

#: output.py:164
#, python-format
msgid "The css file %s doesn't exist"
msgstr ""

line 1377:

#: dataselect.py:46 start.py:458 stats_select.py:533
#, python-format
msgid "Unable to connect to data as defined in project %s. Please check
your settings."
msgstr ""

line 1409:

#: db_grid.py:633
#, python-format
msgid "Unable to save change to database. %s"
msgstr ""


My apologies if any of these have already been defined. I did a lot of
experimenting trying (successfully) to get Galician to work on Windows
and a couple of things may have shaken loose.


Thanks in advance, Grant

P.S. It looks like I will soon be able to start on the 0.9 series but
more on that later :-).
sofa_gl_ES.po

Indalecio Freiría Santos

unread,
Nov 24, 2009, 6:52:35 AM11/24/09
to sofasta...@googlegroups.com
Hi Grant,
I updated galician translation.

Regards.

2009/11/24 Grant Paton-Simpson <gr...@p-s.co.nz>
sofa_gl_ES.po

Grant Paton-Simpson

unread,
Nov 24, 2009, 2:01:20 PM11/24/09
to sofasta...@googlegroups.com
Fantastic thanks.

Indalecio Freiría Santos wrote:
> Hi Grant,
> I updated galician translation.
>
> Regards.
>
> 2009/11/24 Grant Paton-Simpson <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>
> <mailto:gr...@p-s.co.nz>>:
> <mailto:gr...@p-s.co.nz>>
> <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>>
>
>
> Hi Indalecio,
>
> What happens if you edit (in Windows)
> C:\Program Files\sofa\start.pyw
> so that line 5 becomes:
>
> test_lang = True
>
> Does it show:
> a) English?
> b) mangled Galician?
> c) correct Galician?
>
>
> All the best, Grant
>
> On Nov 6, 1:31 am, Indalecio Freiría Santos
> <ifrei...@gmail.com <mailto:ifrei...@gmail.com>
> <mailto:gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>>>
> >
> >
> >
> > > Hi Indalecio,
> >
> > > Thanks for the translation.
> >
> > > Sad to hear about the problems. What
> didn't work? If you
> look at "C:
> > > \Documents and
> Settings\username\sofa\internal" there is a
> file called
> > > output.txt (If in Vista or Windows 7 it
> will be "C:\Users
> ..."). Does
> > > that have any error messages you could
> pass on?
> >
> > > I have found a couple of bugs affecting
> table reporting and stats
> > > reporting. Was it about this area of
> functionality or did it even
> > > affect opening the default database table?
> >
> > > Thanks for your testing - even though it
> was not the desired
> > > outcome ;-).
> >
> > > All the best, Grant
> >
> > > On Nov 5, 10:36 pm, Indalecio Freiría Santos
> <ifrei...@gmail.com
> <mailto:ifrei...@gmail.com>
> <mailto:ifrei...@gmail.com
> <mailto:ifrei...@gmail.com>>>
> > > wrote:
> > > > Hi Grant,
> >
> > > > I attach the updated sofa_gl_ES.po
> >
> > > > Also, I tested the windows version, and
> unfortunately its
> seems not to
> > > work.
> >
> > > > Regards.
> >
> > > > 2009/11/4 Grant Paton-Simpson
> <gr...@p-s.co.nz <mailto:gr...@p-s.co.nz>
> <mailto:gr...@p-s.co.nz
> <mailto:gr...@p-s.co.nz>>>
> >
> > > > > Hi Indalecio,
> >
> <mailto:gr...@p-s.co.nz>> <mailto:
Reply all
Reply to author
Forward
0 new messages