Mistakes in existing Translations

If you notice a translation error, please let us know about it on the bug tracker (bugs.introversion.co.uk).

Remember to let us know which language, the incorrect phrase and the correct translation. A screenshot would be really helpful.

Translation Tools (Available from Alpha 14)

If you would like to look a further under the hood, and maybe contribute your own fixes or translations, it can be useful to enable the translator tools.

Translator Assist

In preferences.txt ( On Windows, %APPLOCALDATA%\Introversion\LastStarship\preferences.txt and ~/Library/Application Support/LastStarship/preferences.txt on Mac OS X ) there is a preference called TranslatorAssist .

 
 

If you set this true, it will enable two hot keys in the game:

  • Pressing Alt will display the English text instead of the currently loaded language. Actually this is implemented by temporarily loading the English language strings and then, when Alt is released, reloading the language.
  • Pressing Ctrl will display the name of the key instead of the actual translated phrase (or English fallback).

Contributing Translations

In the same directory as preferences.txt, you will find a folder called language

It contains sub-directories for each language currently supported by the game.

  • preferences.txt
  • language
    • french
      • original.csv
    • german
      • original.csv
    • spanish
      • original.csv

You will see that in each language directory there is a file called original.csv . These are the original translations bundled with the game.

DO NOT EDIT original.csv, because the game will overwrite them at every start.

Instead start a new file called language.csv

You can copy just the lines that you want to change from original.csv into language.csv, or you can copy all the whole contents of original.csv.

Format of language.csv

Language.csv is a Comma-Separated-Value text file in UTF-8 encoding. It must start with a header row which indicates columns for state, key, svn, english, translation.

state: NEW, MODIFIED, PREVIOUS, CURRENT, OBSOLETE

  • NEW, it means that the string was recently added to the game and there is no translation for it yet.
  • MODIFIED means that the English string was changed since the last time it was translated and maybe the translation needs to be updated too.
  • PREVIOUS indicates the previous translation (or translations). These are typically for reference, and you should supply a translation for the MODIFIED key instead.
  • CURRENT indicates the current translation for a particular string.
  • OBSOLETE indicates old translations. These have been superceded by new translations. They are for reference only and should typically not be changed.

key: the language key (e.g. newmainmenu_newgame)

svn: the source code revision number (Subversion Revision) when this key's english was last updated. This is a kind of version number of the key. You can have several rows with the same key and the game should use the translation with the highest svn number. You should leave this value unmodified so that it is clear which version of the key the translation corresponds to.

english: the English text corresponding to the key.

translation: the translation itself.

Markers in the text

Programmatic Placeholders

Some strings have markers in them. We use these to programmatically add information to strings while the game is running. They are an asterisk followed by a single letter (e.g. *X). These markers must be kept as an asterisk followed by the given letter, but can be placed anywhere in the string.

For example, *X might be the number of fuel containers on your ship, or it might be a monetary value. If it is not clear, please ask for more context.

There are some markers that are special:

  • S*X - a star system (e.g. NG11).
  • $*X - an amount of money. The game uses the format_currency key to format it accordingly.
  • L*X - the name of a star ship (e.g. PROCYON).
  • R*X -the name of an object type in game (e.g. Fuel, Crew, Docking Port).

Escaped characters, e.g. \n

Some strings contain newline markers (written as \n) which should be left in appropriate places. They are used to start a new line and/or paragraphs.

Key Bindings

Key bindings are of the form {ToggleMap}. As with markers, if a keybinding appears in the English, it should also appear in the Translation.

Example: Fixing an incorrect translation in French

Let's say for example that I want to change the key language_system

Example: Starting a new Portuguese translation