Translations

6 views
Skip to first unread message

Pere Negre

unread,
Jul 27, 2010, 5:54:09 AM7/27/10
to python-whiteboard
Just looked at the translation issue.

I've written a script called "generate_trans.sh" that search in the
source files (and .py and .ui) for the strings and creates .ts files
(in the trans/ directory)

Then, using qt4 linguist, it's just a matter to open these files,
write down the translations to the appropiate language, and then save
the result as a .qm file (using the "release" option in the qtlinguist
menu). That is more or less easy.

Then, the application needs to load these .qm files. It's rather
simple: create a QTranslator object, load the file, and attach the
object to the app object.

Where can I put the .qm files? It is right to put them with the source
files (in the stuff/ directory)? I guess that would work... but I
don't know if it's the right thing.

The language selection (the loading of the .qm file) is to be done at
the beginning of the program (when the app object is created). So,
should I look at the locale settings before deciding what .qm file to
load? I'm thinking that in the configuration menu we could place an
option to select manually the language of the application, or let the
app auto-detect. What do you think?

Pere Negre

unread,
Jul 27, 2010, 6:30:51 AM7/27/10
to python-whiteboard
I see that some qt applications (like designer, linguist, etc...) put
the .qm files in /usr/share/qt4/translations

I guess I should put them there too.

--
Pere

Pere Negre

unread,
Jul 27, 2010, 9:25:06 AM7/27/10
to python-whiteboard
Added makefile

make languages <- compile .ts files into .qm files
make install DESTDIR=/destinationdir <- installs all files in the
DESTDIR directory
make clean <- deletes .pyc and .qm files

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 10:17:48 AM7/27/10
to python-w...@googlegroups.com
Il giorno Tue, 27 Jul 2010 12:30:51 +0200
Pere Negre <pere....@gmail.com> ha scritto:

> I see that some qt applications (like designer, linguist, etc...) put
> the .qm files in /usr/share/qt4/translations
>
> I guess I should put them there too.
>

I pere I have written the translation file in italian
I attach the two linguist-qt files

As soon as possible I'll test your recent changes
and test the translation also
(In some lines the linguist editor trunk some phrase the italian
is longer then English I do not know if at runtime will be the same
problem or not)

Anyway I ask you if it possible commit these files

An other issue have you taken a decision about a simple build system
for the tool a stupid makefile or qmake to install the files
can be very useful and could manage the build of the source package
and deb also

Bye

---

italian.qm
italian.ts

Pere Negre

unread,
Jul 27, 2010, 11:04:02 AM7/27/10
to python-w...@googlegroups.com
> I pere I have written the translation file in italian
> I attach the two linguist-qt files

Many thanks, Pietro!

I've included the .ts file in the repository (the .qm is generated by
the makefile)

> As soon as possible I'll test your recent changes
> and test the translation also
> (In some lines the linguist editor trunk some phrase the italian
> is longer then English I do not know if at runtime will be the same
> problem or not)

I've taken a look at the translation and it looks very good.

> An other issue have you taken a decision about a simple build system
> for the tool a stupid makefile or qmake to install the files
> can be very useful and could manage the build of the source package
> and deb also

Now, to make the .deb package, simply run "make deb"

If you want to test the translation in your computer, check the locale
setting (it should be "it" or "it_it" in italian). The program checks
this and loads the appropiate file.

If you have debian or ubuntu, it should work simply by making the .deb
and installing it. If you run the app from the command-line without
installing it, it won't find the translation files.

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 12:17:14 PM7/27/10
to python-w...@googlegroups.com
Il giorno Tue, 27 Jul 2010 17:04:02 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> > I pere I have written the translation file in italian


> > I attach the two linguist-qt files
>
> Many thanks, Pietro!
>
> I've included the .ts file in the repository (the .qm is generated by
> the makefile)
>
> > As soon as possible I'll test your recent changes
> > and test the translation also
> > (In some lines the linguist editor trunk some phrase the italian
> > is longer then English I do not know if at runtime will be the same
> > problem or not)
>
> I've taken a look at the translation and it looks very good.
>

I am italian...



> > An other issue have you taken a decision about a simple build system
> > for the tool a stupid makefile or qmake to install the files
> > can be very useful and could manage the build of the source package
> > and deb also
>
> Now, to make the .deb package, simply run "make deb"
>
> If you want to test the translation in your computer, check the locale
> setting (it should be "it" or "it_it" in italian). The program checks
> this and loads the appropiate file.
>
> If you have debian or ubuntu, it should work simply by making the .deb
> and installing it. If you run the app from the command-line without
> installing it, it won't find the translation files.
>

I have done a little fix in the translation

The interface cut the labels in some point see python-whiteboard1 in
attachment
You can see that there are an english phrase "All Devices" that is not
in the translation file.
This might be translated in italian as "Tutte le periferiche"

There are also a problem in the zone configuration (I suggest to ask
the tab in this way)
See python-whiteboard1
The default string in the curtain button are empty I thing that this
problem derive to the fact that the signfile python-whiteboard_0.6.dsc

I have a problem to build the deb package the builder say that the gpg
key is missing

======================================================================
gpg: skipped "pnegre <pere....@gmail.com>": la chiave segreta non è
disponibile gpg: [stdin]: clearsign failed: la chiave segreta non è
disponibile

dpkg-genchanges >../python-whiteboard_0.6_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is
included) dpkg-buildpackage: warning: Failed to sign .dsc and .changes
file make: *** [deb] Errore 1
italian is longer as string
=========================================================================

I have try with the debuild program also and I have a similar error


Thanks a lot

--

pywhiteboard_it.ts

al...@paranoici.org

unread,
Jul 27, 2010, 12:47:55 PM7/27/10
to python-w...@googlegroups.com
Sorry I have forgotten to attach the screenshoot

You can set the italian lang in a shell
with this command

export LANG=it_IT.UTF-8

Cheers bye

pywhiteboard_it.ts
python-whiteboard1.png
python-whiteboard2png

Pere Negre

unread,
Jul 27, 2010, 4:54:05 PM7/27/10
to python-w...@googlegroups.com
I've patched the code and zone selection works again (regardless of language).

Fixed the "gpg key not found" issue when making the deb package.

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 5:40:21 PM7/27/10
to python-w...@googlegroups.com
On Tue, 27 Jul 2010 22:54:05 +0200, Pere Negre <pere....@gmail.com>
wrote:

> I've patched the code and zone selection works again (regardless of
> language).
>
> Fixed the "gpg key not found" issue when making the deb package.

The only problem is that in the option menu the string are cut

you migth read "Attiva il cursore dopo la calibrazione"
and "calibrazione a tutto schermo"

See the attachment

All the other stuff works fine

Thanks af all

Schermata.png

Pere Negre

unread,
Jul 27, 2010, 5:42:37 PM7/27/10
to python-w...@googlegroups.com
On Tue, Jul 27, 2010 at 11:40 PM, <al...@paranoici.org> wrote:
> The only problem is that in the option menu the string are cut

Yes, yes. I saw that just now. Sorry. Sometimes I read too fast.

Fixed. Check version 0.8

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 5:51:50 PM7/27/10
to python-w...@googlegroups.com
On Tue, 27 Jul 2010 22:54:05 +0200, Pere Negre <pere....@gmail.com>
wrote:
> I've patched the code and zone selection works again (regardless of
> language).
>
> Fixed the "gpg key not found" issue when making the deb package.

hi I attach the new italian translation with some improvement

Can you commit this?

Bye

pywhiteboard_it.ts

Pere Negre

unread,
Jul 27, 2010, 5:59:37 PM7/27/10
to python-w...@googlegroups.com
On Tue, Jul 27, 2010 at 11:51 PM, <al...@paranoici.org> wrote:
> hi I attach the new italian translation with some improvement
>
> Can you commit this?

Done. Many thanks for your interest and work. Hope to repay you by
testing ardesia soon.

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 7:56:58 PM7/27/10
to python-w...@googlegroups.com

On Tue, 27 Jul 2010 23:59:37 +0200, Pere Negre <pere....@gmail.com>
wrote:

Soory I have done a review of file marking the closed translation

Can you put in the README the requirement to run make

Might be:
sudo apt-get install libqt4-dev qt4-dev-tools

and the requirement to make the deb, might be:

sudo apt-get install build-essential fakeroot dpkg-dev

Cheers bye


Pere Negre

unread,
Jul 27, 2010, 8:22:11 PM7/27/10
to python-w...@googlegroups.com
On Wed, Jul 28, 2010 at 1:56 AM, <al...@paranoici.org> wrote:
> Can you put in the README the requirement to run make

Done!

--
Pere

Pere Negre

unread,
Jul 28, 2010, 11:57:37 AM7/28/10
to python-w...@googlegroups.com
Added catalan translation. Thanks Pau Cabot!

--
Pere

al...@paranoici.org

unread,
Jul 27, 2010, 6:07:24 PM7/27/10
to python-w...@googlegroups.com

On Tue, 27 Jul 2010 23:42:37 +0200, Pere Negre <pere....@gmail.com>
wrote:

It is work fine

I have a question for you but the preferences where are store
Does exist a configuration file?? Where is it??

al...@paranoici.org

unread,
Jul 27, 2010, 6:11:39 PM7/27/10
to python-w...@googlegroups.com

On Tue, 27 Jul 2010 23:59:37 +0200, Pere Negre <pere....@gmail.com>
wrote:

Thanks a lot.

What is your native language?

Bye

al...@paranoici.org

unread,
Jul 27, 2010, 6:50:58 PM7/27/10
to python-w...@googlegroups.com
On Tue, 27 Jul 2010 23:59:37 +0200, Pere Negre <pere....@gmail.com>
wrote:

Sorry I have done some other fix
and even enlarge a text box

I have only a point about this stuff I believe that enlarge
the browser width to have the git command on one line
and the project uri in an other one
can give a better look&feel to the interface

pywhiteboard_it.ts
mainwindow.ui

Pere Negre

unread,
Jul 28, 2010, 4:58:35 PM7/28/10
to python-w...@googlegroups.com
On Wed, Jul 28, 2010 at 12:11 AM, <al...@paranoici.org> wrote:
> What is your native language?

Catalan

--
Pere

Pere Negre

unread,
Jul 28, 2010, 5:00:08 PM7/28/10
to python-whiteboard
On 28 Jul, 00:07, <al...@paranoici.org> wrote:
> I have a question for you but the preferences where are store
> Does exist a configuration file?? Where is it??

~/.config/pywhiteboard/pywhiteboard.conf

Pere Negre

unread,
Jul 28, 2010, 5:13:14 PM7/28/10
to python-w...@googlegroups.com
2010/7/28 <al...@paranoici.org>:

> I have only a point about this stuff I believe that enlarge
> the browser width to have the git command on one line
> and the project uri in an other one
> can give a better look&feel to the interface

Sorry for the late reply, Pietro.

Commited your changes to the "r1" branch. See my other message.

Thanks for your work.

--
Pere

alpha

unread,
Aug 7, 2010, 9:57:14 AM8/7/10
to python-w...@googlegroups.com
Il giorno Wed, 28 Jul 2010 14:00:08 -0700 (PDT)

Pere Negre <pere....@gmail.com> ha scritto:

> On 28 Jul, 00:07, <al...@paranoici.org> wrote:

I I have update the translation
but I don't know why but I am not able
to see the "Advanced" item

Anyway this world id in the third configuration tab
and the italian translation is Opzioni Avanzate (Advanced Option)

I put the new translation file in attachment

pywhiteboard_it.ts
pywhiteboard_it.qm

Pere Negre

unread,
Aug 7, 2010, 8:22:25 PM8/7/10
to python-w...@googlegroups.com
On Sat, Aug 7, 2010 at 3:57 PM, alpha <al...@paranoici.org> wrote:
> I I have update the translation
> but I don't know why but I am not able
> to see the "Advanced" item

Just execute

./generate_trans

in the python-whiteboard main directory. This will update the .ts
files in trans/ to include all the phrases in the code and the .ui
files.

--
Pere

alpha

unread,
Aug 8, 2010, 11:59:09 AM8/8/10
to python-w...@googlegroups.com
Il giorno Sun, 8 Aug 2010 02:22:25 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> On Sat, Aug 7, 2010 at 3:57 PM, alpha <al...@paranoici.org> wrote:

I have tried but it has some problem
I have not pylupdate4 ab the I change the sctipt to use
pylupdate but this is the error trace


pylupdate warning: File 'stuff/calibration2.ui' does not look like a
project file pylupdate warning: File 'stuff/configuration.ui' does not
look like a project file pylupdate warning: File 'stuff/mainwindow.ui'
does not look like a project file pylupdate warning: File
'stuff/pbar.ui' does not look like a project file pylupdate warning:
File 'stuff/calibration.py' does not look like a project file pylupdate
warning: File 'stuff/configuration.py' does not look like a project
file pylupdate warning: File 'stuff/cursor.py' does not look like a
project file pylupdate warning: File 'stuff/pywhiteboard.py' does not
look like a project file pylupdate warning: File 'stuff/threads.py'
does not look like a project file pylupdate warning: File
'stuff/wiimote.py' does not look like a project file pylupdate error:
Cannot open project file '-ts': No such file or directory

In any case can youi commit the italian file

Bye

alpha

unread,
Aug 8, 2010, 12:35:41 PM8/8/10
to python-w...@googlegroups.com
Il giorno Sun, 8 Aug 2010 02:22:25 +0200
Pere Negre <pere....@gmail.com> ha scritto:

> On Sat, Aug 7, 2010 at 3:57 PM, alpha <al...@paranoici.org> wrote:

I send you the updated italian translation


pywhiteboard_it.ts
pywhiteboard_it.qm

alpha

unread,
Aug 8, 2010, 12:45:32 PM8/8/10
to python-w...@googlegroups.com
Il giorno Sun, 8 Aug 2010 02:22:25 +0200
Pere Negre <pere....@gmail.com> ha scritto:

> On Sat, Aug 7, 2010 at 3:57 PM, alpha <al...@paranoici.org> wrote:

I have fixed two other italian item,
At the startup if I put Cancel the cancelling
item as noy a translation and doesn't is inside
the transaltion file

Thanks bye

pywhiteboard_it.ts
pywhiteboard_it.qm

alpha

unread,
Aug 8, 2010, 6:24:41 PM8/8/10
to python-w...@googlegroups.com
Il giorno Sun, 8 Aug 2010 02:22:25 +0200
Pere Negre <pere....@gmail.com> ha scritto:

> On Sat, Aug 7, 2010 at 3:57 PM, alpha <al...@paranoici.org> wrote:

Hi,
I have update the italian translation
completing the new phrases

Bye

pywhiteboard_it.ts
pywhiteboard_it.qm

Pere Negre

unread,
Aug 8, 2010, 7:00:36 PM8/8/10
to python-w...@googlegroups.com
Commited your file.

--
Pere

al...@paranoici.org

unread,
Aug 10, 2010, 4:20:43 AM8/10/10
to python-w...@googlegroups.com
Il giorno Mon, 9 Aug 2010 01:00:36 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> Commited your file.
>

I attach the integrated italian translation


Bye

--

pywhiteboard_it.qm
pywhiteboard_it.ts

Pere Negre

unread,
Aug 10, 2010, 4:26:27 AM8/10/10
to python-w...@googlegroups.com
On Tue, Aug 10, 2010 at 10:20 AM, al...@paranoici.org
<al...@paranoici.org> wrote:
> I attach the integrated italian translation

Commited.

--
Pere

al...@paranoici.org

unread,
Aug 10, 2010, 9:32:16 AM8/10/10
to python-w...@googlegroups.com
Il giorno Tue, 10 Aug 2010 10:26:27 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> On Tue, Aug 10, 2010 at 10:20 AM, al...@paranoici.org

I send you the updated translation;
I have twice little issue on this topic

I have not traslated the gpl in italian language
because for the italian law it will be invalid if translated

I don't know if this is an international law or not,
anyway if the license has a legal value only in english
can be the case to don't include it in the translation

You can see in Schermata-3 attachment that Address and Comment
are not translated (I have not found these items in the linguist file)

Bye


--

pywhiteboard_it.qm
pywhiteboard_it.ts
Schermata-3.png

Pere Negre

unread,
Aug 10, 2010, 9:55:18 AM8/10/10
to python-w...@googlegroups.com
On Tue, Aug 10, 2010 at 3:32 PM, al...@paranoici.org
<al...@paranoici.org> wrote:
> I send you the updated translation;
> I have twice little issue on this topic
>
> I have not traslated the gpl in italian language
> because for the italian law it will be invalid if translated

I think GPL can stay in English. I see that normal apps doesn't
translate the license text.

> You can see in Schermata-3 attachment that Address and Comment
> are not translated (I have not found these items in the linguist file)

I forgot to encase the strings in "tr()". Now it's fixed. The texts
should appear now in the .ts file.

--
Pere

al...@paranoici.org

unread,
Aug 10, 2010, 10:14:35 AM8/10/10
to python-w...@googlegroups.com
Il giorno Tue, 10 Aug 2010 10:26:27 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> On Tue, Aug 10, 2010 at 10:20 AM, al...@paranoici.org

I have update some issue


--

pywhiteboard_it.qm
pywhiteboard_it.ts

al...@paranoici.org

unread,
Aug 10, 2010, 10:38:09 AM8/10/10
to python-w...@googlegroups.com
Il giorno Tue, 10 Aug 2010 15:55:18 +0200

Pere Negre <pere....@gmail.com> ha scritto:

> On Tue, Aug 10, 2010 at 3:32 PM, al...@paranoici.org

I send you the update translation

--

pywhiteboard_it.qm
pywhiteboard_it.ts

Pere Negre

unread,
Aug 10, 2010, 11:15:11 AM8/10/10
to python-w...@googlegroups.com
Commited.

al...@paranoici.org

unread,
Aug 26, 2010, 12:06:38 PM8/26/10
to python-w...@googlegroups.com
On Tue, 10 Aug 2010 17:15:11 +0200, Pere Negre <pere....@gmail.com>
wrote:
> Commited.

Hi, I send you the updated italian translation

Bye

pywhiteboard_it.ts

Pere Negre

unread,
Aug 27, 2010, 9:32:43 AM8/27/10
to python-w...@googlegroups.com
On Thu, Aug 26, 2010 at 6:06 PM, <al...@paranoici.org> wrote:
> Hi, I send you the updated italian translation

Updated.

--
Pere

al...@paranoici.org

unread,
Oct 2, 2011, 12:51:11 PM10/2/11
to python-w...@googlegroups.com
How are you?

I'm fine and I'm working a lot with Ardesia and WiildOs
and I continue to use your tool

I have noticed that the "Press 1+2 on your wiimote"
is not translated...

The phrase exist in file ts file but not in the qm
and it is not the only one file how is possible
update the qm file to have the missing phrases to translate

Can you update the readme in order to support the translation?

When you will fix the problem, I'll update the translation and I will
send you

Thanks bye

Pere Negre

unread,
Oct 2, 2011, 1:38:40 PM10/2/11
to python-w...@googlegroups.com
Hi Pietro!!

On Sun, Oct 2, 2011 at 6:51 PM, al...@paranoici.org <al...@paranoici.org> wrote:
How are you?

I'm fine and I'm working a lot with Ardesia and WiildOs
and I continue to use your tool

Good. I'm glad that it's useful to you after all this time.
 
I have noticed that the "Press 1+2 on your wiimote"
is not translated...

The phrase exist in file ts file but not in the qm
and it is not the only one file how is possible
update the qm file to have the missing phrases to translate

Make sure that you have the last version (check it with git). Update the .ts files in the /trans directory with linguist.

I've added some instructions in the README.

And by the way, in the school I work we have deployed (with mixed success) python-whiteboard. We are looking to teach the staff to use ardesia too. It's a great program.

Thanks for your work, as always.

--
Pere

al...@paranoici.org

unread,
Oct 3, 2011, 5:10:36 AM10/3/11
to python-w...@googlegroups.com
Hi Pere,
I'll send u the updated italian translation.
Thanks for the support

Can you include it in git?

Pietro Pilolli

On Sun, 2 Oct 2011 19:38:40 +0200, Pere Negre wrote:
> Hi Pietro!!
>

pywhiteboard_it.ts

Pere Negre

unread,
Oct 3, 2011, 11:49:16 AM10/3/11
to python-w...@googlegroups.com
Ok. It's in the git repo now. Thank you!
--
Pere
Reply all
Reply to author
Forward
0 new messages