Notes to Translators of KTurtle
© 2003-2016 Cies Breijs
KTurtle is distributed under the terms of the GNU General Public License (GPL), Version 2.
NOTE: This document describes how to translate KTurtle with a version >= 0.8, otherwise known as the version that comes with KDE4. For translating the older KDE3 versions of KTurtle please see this page, yet keep in mind that the translation work you do on a KDE3 version of KTurtle will not work for the KDE4 version.
KTurtle is an educational programming environment for kids. The most appealing feature of KTurtle is that the programming language used is translated to the native language of the programmer. So the programming commands, the programming examples, the error messages, the GUI, the manual... everything is translated. This way the programmer can program in his/her native language, and this enables one to learn how to program before understanding English!
This means translations are very important to KTurtle... so you are very important to KTurtle!
Before you start translating KTurtle I invite you to take a short look at KTurtle. It is part of kde-edu. Once you started KTurtle you can open an example (File -> Examples) and Run (File -> Run) it. In the Settings menu you find a language chooser, there you can select the script language of the KTurtle programming environment. An other nice feature is the context help you get if you hit F2; just place your cursor on a programming command and hit F2.
You probably got to this page by following a link in a POT-file generated from the KTurtle source. Good!
Next you will find the instructions for the 3 important cases of strings that need a special treatment:
As mentioned earier in this document: the programming language used in KTurtle is translated to the native language of the programmer... Translating the programming language itself is what you do by translating strings marked as a COMMAND.
To translate the commands please keep the following things in mind:
- You are translating for possibly very young people: stick to very basic language.
- COMMANDS can only contain letters and underscores, so no spaces, no numbers, no special charaters like punctuation, etc.
- Try to keep it consistent! If some commands have a similar meaning, they should have similar look. So turnleft and turnright should not become turnleft and aimright.
- Consistency (again). If you, for instance, decide to use underscores in the translations of your commands then use them consistently for all commands.
- Commands must be unique, or the program will crash!
- Be careful with the ArgumentSeparator (a comma in en_US), and the DecimalSeparator (a dot in en_US). In your language the comma might be used as DecimalSeparator, in that case you can use a semicolon ';' as ArgumentSeparator -- but you don't have to! If you think it is acceptable to use the dot as DecimalSeparator please do so: in programming languages the dot is usually used as DecimalSeparator it might be good to learn this right from the start.
- Choose wise, choose to last: people will learn these commands to make little programs, so only change something if you have a good reason to do so. The KTurtle programming language (TurtleScript) is loosely based on the 'Logo' programming language. Logo is also often translated to the programmers native language; you can search the internet for Logo translations in your language -- in Google type: 'Logo programming language_name' -- this could help you a bit.
In KTurtle some commands have an alias. This alias is just an abbreviation of the command. This is because some commands of the very small command set are used very often, so in order to have quicker results one could use the aliases for these often used commands.
For instance the forward, backward and the turnleft, turnright commands. They are used very often, so in en_US they are aliased to respectively: fw, bw and tl, tr.
Some things to keep in mind when you translate command aliases:
- Just like commands, aliases can only contain letters and underscores. But please avoid the use of underscores in aliases.
- Try to keep it consistent! Try to choose the same letter for the same part of different COMMAND. For instance commands starting with turn (like: turnright) always have aliases that start with t (like: tr).
- Aliases must be unique, and cannot be the same as a COMMAND, or the program will crash!
The example names are the names of the examples you find in File -> Examples. Please translate them into something simple, yet appealing for kids.
You should probably start KTurtle and open (File -> Examples) and Run (File -> Run) all examples once, to know what they look like, so you have a better idea of what you are translating the name of.
The translation of the code in these examples is generated by KTurtle at runtime from the translated commands.
After you finished translating KTurtle please have a look if everything worked. A good way to do this is to execute all examples, by File -> Examples and then File -> Run. If an example gives strange results you can switch the language to English (en_US) in Settings -> Script Language and see if it produces different results, if so please file a bug report. If the examples run fine you are quite sure you have succeeded.
Thanks for translating KTurtle!
Translating the strings is a big deal for KTurtle. But to make the program really shine is to translate the documentation as well. This is because KTurtle has a built-in command help funtion: put your cursor on a 'word' (command, number, variable, string, etc) in the editor and press F2... You will be presented with help on this particular topic!
NOTE: At the moment of writing this 'F2' feature is not yet fully implemented.
It is quite likely that not every thing is clear, or that there are mistakes, or that for your language you need more configurability, or that it just does not. Please let us know!
You can always file a bug report at bugs.kde.org against the version of KTurtle you are translating, we will definitely have a look at it. With your feedback we will be able to improve the translation system and KTurtle in general.
You can also seek contact directly with the core developers/ maintainers of KTurtle. Cies Breijs's email is: cies -at- kde -dot- nl, and Mauricio Piacentini can be reached at piacentini at kde dot org.
Author: Cies Breijs
Last update: 2014-07-29