Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
My name is Fabien and I'm new to the developement of DrPython. First of all, sorry for my English, but it's not my mother tongue.
Secondly, I plan to translate DrPython (in French), so I would like to know if someone has already make translation in a python script. What is the best way to translate a python script ? gettext or another way ?
I've had a project wxpyatol, which I gave up.
You can download it, but i cannot promise, that this prog is still running with newer wxpython versions:
You can look at mainframe.py and guilanguage.py, how I solved that. Because it is longer time ago,
I cannot remember how it works exactly.
You can also look at:
What you need is also poedit http://sourceforge.net/projects/poedit/
(i used this one)
or some other po edit tool for editing/translating
for the po file, you can edit them directly with
For grabbing the strings:
I used a regexression to replace all strings in the form:
"text" to _("text"), than collect them, filter out
duplicates and store this in a database or text file.
so every few weeks, i compared them and updated
the collection file.
It is all in all a lot of work, and I'm disgusted to look back at this :)
As you can read this, you see, my mother language
is also not english ;)
I have some (technical) experience with translating python code, I used pygettext.py (to create the POT) and msgfmt.py (to convert the PO into MO). For translation I userd poEdit, it's a great tool. (From what I see at the screenshots, poTranslator ist definitely worth a try, but poEdit is quite mature).
This is very cool.
I am completely inexperienced with translation, so I will start looking at poedit and potranslator. There also look to be some interesting threads on wxpython-users.
Jean Luc Damnet
I had this project some months ago, left aside since I was committed to a large project in the meantime, but I could lend a hand if only to use the airport waiting times...
Drop me a line if and when you need me... (nous pouvons parler francais)
Ok, but for the moment I don't have too much time and so I don't have the time to learn howto use gettext.
But if someone is motivated to make that I can take the time to add i18n to drpython.
So to manage a bit:
What languages are we talking about?
Who is offering to write the translations for each language?
I can learn how to use gettext, and make this my priority in a bit. (I need to fix a few plugins first).
What else needs to be done?
In my case, I'm offering to translate DrPython into French.
Here are the issues:
1. Performance: DrPython stores menu items, etc in english. So the translations would have to occur here as well, if they were to occur in the menu.
Holy ... uh... Holy! Do I have this right? I'd need to replace EVERY string with _(" ")?
This would be a great deal of work.
Not so much if I just did menus, message dialogs, dialog titles, and the documentation. (and issue #1 turns out to be no issue at all). That could be done rather quickly I think. (Documentation would just be translating the html files, I could use gettext from drscrolledmessage dialog I think, so it would not be much work at all. The real work would be translating
all of the buttons and text controls and static text bits in the various dialogs).
So here is my question:
How important is this?
Is this likely to determine whether or not someone uses a programming editor? (I can see a strong argument for this if it is being used for a introductory programming course, and the students have enough english to struggle with anyway to learn programming, let alone browsing through documentation, the menu, etc).
Would doing just the documentation be worthwhile/enough?
In my case, the translation is not a must have, because I think that most of the word in DrPython are easy to understand (we see them in nearly every software). But I prefer when I can use a software in my mother tongue.
So I my mind, translation can be a goal for DrPython but not with the highest priority.
And as you say, I think that I will translate the documentation to start.
I think starting with the documentation is an excellent idea.