Warning: Can't synchronize with the repository (Unsupported version control system "svn". Check that the Python support libraries for "svn" are correctly installed.)

Translating to your own language is pretty easy and intuitive for python coders. But here's a little guide for those not familiar with the programming language.

Add a new language

  1. Make sure you have the latest version of PyCaptain, by Downloading from SVN
  2. You must first choose the short name for the language. For this tutorial we'll use fr for French.
  3. Copy the file __template.py, and name it fr.py.
  4. Open the new file in a text editor and fill the variables as follows:
    1. In class Fr( Language ):, put instead of Fr the short name capitalized.
    2. In name = "fr", put instead of fr the short name lowered.
    3. In title = u"Français", put instead of Français the full language name.
    4. In author = u"Author", put instead of Author your own name. If modifying someone else's file, you can write multiple names.
    5. Modify the lines following, self.texts = {, where on the left is the english (and original) version and on the right your translation.
    6. Keep an eye on the terminal while executing the game, it will notify you if any string isn't translated. You can add it to the list in the same way: "English string": u"Your language equivalent",
  5. Once you've done all or most of the translation (it's normal if you didn't catch every single string in the first version). Send a copy to translation@… or upload it on the forum at http://forum.xymus.net/.

Notes

The difference between "" strings and u"" string is the encoding. u"" strings, actually unicode strings, are for languages with non-english characters such as é, ß, etc. It will be needed by most of the translation.