Translations

imaginee1 at gmx.net imaginee1 at gmx.net
Sun Feb 13 15:53:40 EST 2005


Hi everyone

I changed pydance a bit to make it easily translatable.
The idea is to keep the english phrases in the code,
so it stays readable, but encapsulate them with
> trlt("Some phrase")
trlt stands for translate.

The function trlt is found in a new file called language.py.
If a language constant (for now located in language.py)
is set to some different language than english and a
dictionary for that language exists, trlt("Some phrase")
translates "Some phrase" to the set language. Otherwise
"Some phrase" is returned with no changes.
I also wrote a german dictionary, which is my native tongue.

You can download my changed version here:
http://www.physik.tu-dresden.de/~hlubek/pydance.zip (13.6MB)
or a smaller version with just the *.py files:
http://www.physik.tu-dresden.de/~hlubek/pydance_small.zip (300kB)

Please have a look at it and tell my what you think.
I would be very happy if my changes make it to the real
version of pydance.

A few annotations:

The translation is not complete, since string expressions
are frequently used in dictionaries and then printed. I
didn't want to change the expressions in the dictionaries
to not break the code and don't know enough of pydance
internals to find the print expressions easily.
I also didn't translate the error statements which are
printed to stdout because I think everyone that compiles
pydance by hand knows enough english to understand them.


In gradescreen.py I changed:
"Press Escape/Confirm/Start" > "Press Enter/Start/Escape"
I think this is more clear, and it is equal to another sentence
somewhere.

Do you have an idea why umlauts don't work?
I have used the standard transcription but this doesn't look
very nice.

Best regards,
Nikolai

PS: I had a few troubles with my mail accounts on this list. 
I think tomorrow I can subscribe under my regular address 
nikolai.hlubek at mailbox.tu-dresden.de
It would be nice if you could CC any replies to this message 
to that address. 

-- 
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl



More information about the pyddr-discuss mailing list