Free and Open Source real time strategy game with a new take on micro-management

Translation guide

From Globulation2

Revision as of 20:58, 28 April 2006 by K776 (talk | contribs)
Jump to: navigation, search

This guide will explain you how the translations are done and help you to create a new/updated one in your language. You do not and will not need to know anything about programming to do a translation.

Warning: Although not compolsory, it is highly recommended that you use CVS text files instead of the ones found in releases, as two things may have happened. The one your going to translate may have already been updated. Or new labels have been added/edited, which means you'll have to update it again at a later date. Using CVS ensures an up to date translation.

Understanding the translation system

  • First of all you have to understand that in the data/ directory. There are many "texts.*.txt" files, two of them in particular are:
./data/texts.list.txt - this is only a list of all known translation files; the first file is the file of keywords
./data/texts.keys.txt - the file of keywords, it is not a translation, and should never be modified if you are not a developer
  • Then there is all the language translation files. They are in files called texts.LANGCODE.txt, where LANGCODE is a two letter respresentation of your language (for example, english is en, french is fr, german is de, spanish is es etc..). Now you have to see if the latest version of the game is not yet translated in your language or up to date. The status of each file can be found below. We try to list all current translations (19 as of April 2006); they are located each in a different file:
Note: These status's are based on the files in CVS, not on the files releases.
./data/texts.en.txt -- English -- Up to date, no help needed
./data/texts.de.txt -- Deutsch -- Up to date, no help needed
./data/texts.tr.txt -- Turkish -- Up to date, no help needed
./data/texts.es.txt -- Español -- Out of date, currently got someone working on it
./data/texts.fr.txt -- Français -- Out of date, no one working on it
./data/texts.cz.txt -- Česky -- Out of date, no one working on it
./data/texts.hu.txt -- Magyar -- Out of date, no one working on it
./data/texts.it.txt -- Italiano -- Out of date, no one working on it
./data/texts.pl.txt -- Polski -- Out of date, no one working on it
./data/texts.ro.txt -- Româneste -- Out of date, no one working on it
./data/texts.ru.txt -- Русский -- Out of date, no one working on it
./data/texts.sr.txt -- Српски -- Out of date, no one working on it
./data/texts.se.txt -- Swedish -- Out of date, no one working on it
./data/texts.si.txt -- Slovenščina -- Out of date, no one working on it
./data/texts.dk.txt -- Dansk -- Out of date, no one working on it
./data/texts.nl.txt -- Nederlands -- Out of date, no one working on it
./data/texts.ca.txt -- Català -- Out of date, no one working on it
./data/texts.sv.txt -- Svenska -- Out of date, no one working on it
./data/texts.pt.txt -- Português -- Out of date, no one working on it

Preparing for a translation

  • Most people download the latest "texts.en.txt" file from CVS and start from there. Its the one way to make sure everything is up to date because the english text file is always up to date. However, if you have trouble understanding english, and you can understand another langugae that has been translated, then you can download that file instead, although it is most likely not as up to date as the english text file.
  • To start, rename "texts.en.txt" into "texts.LANGCODE.txt", where LANGCODE is a two letter respresentation of your language (for example, english is en, french is fr, german is de, spanish is es etc..).


Starting a translation

  • First you have to find an text editor that supports the UTF-8 encoding system
If you use a linux-based operating system :
  • Try gedit; it works fine if you use the X; (gedit was originally designed for the GNOME and was tested by me to work well, but you may as well find many other editors designed for the desktop you are using right now)
  • Other editors in linux can edit text in UTF-8 format, but a simple ASCII text editor is not enough! So if you open the file with emacs, nano, nedit, or kwrite and you cannot see the special characters then don't edit the file as a simple ASCI text file
  • Don't try to use advanced editors like OpenOffice, it will not do the work at all!
In windows:
  • Notepad and Wordpad are probably not a good choice; Neither are Office or OpenOffice.
  • Or try jEdit, PSPad, etc.
  • Then, you must understand the structure of the file:
Every line is separated with the others by the ENTER character (new line)
You have many lines, they are two by two linked like this:
  • TYPE A lines: these lines look something like this: [code-name of the text]
  • TYPE B lines: these lines contain the translation of the text into one language. Even if there is no translation you have to press enter (leave the line empty)
The two last lines of the text are empty lines (two new-line characters)
  • Now you must understand that all TYPE A lines are only code-names; this means, first of all you should never try to change them, unless you are a developer; second, you should never translate what is inside, they are codes, DO NOT translate them.
  • Now please translate each TYPE B line into your language by replacing the text in English with the text in your language.

After completing your translation

  • After you have translated the file, you should first try to test it works well on the latest version of glob2. To do that, you must place your file into the data/ directory of the game, and then edit the file "data/texts.list.txt" and add at the end of the file the line "data/texts.LANG.txt"; PS: do not add this as first line or it will not work!
  • You can later launch glob2 as you usually do and test how well your translation looks...
  • Please read the Links to see how you can upload files to the ftp in the translation directory; please notify the developers on the forum and/or the mailing list; your translation will be integrated in the cvs and the next version of glob2 will include your translation.
Misc