HelpUsTranslate: Difference between revisions

From The Last Starwiki
Jump to navigation Jump to search
John (talk | contribs)
Add YouTube video link for Translation Editor
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Thank you for Coming To This Page! ==
As I am sure you have noticed by now, the translations are very much a work-in-progress and we need your help to improve and perfect them. Your help will be much appreciated!
=== Getting your translation fixes or contributions included in the next Alpha ===
If you would like to get your fixes or perhaps even a new language included in the next Alpha, please talk to John on @jknotten on the Discord and he will be happy to help.
=== Discord ===
For help please visit the '''#mods''' channel on [https://www.introversion.co.uk/last-starship/discord Discord].
== Overflowing Text and Missing Translations ==
If you spot any overflowing text or places where the game is still using hard-coded English strings, please file a bug report (if one doesn't exist already) on the
* [https://bugs.introversion.co.uk bug tracker].
A screenshot with some kind of callout or highlight of the particular area would be a very useful.
== Mistakes in existing Translations ==
== Mistakes in existing Translations ==
If you notice a translation error, please let us know about it on the [http://bugs.introversion.co.uk bug tracker] (bugs.introversion.co.uk).  
If you notice a translation error, please let us know about it on the  
 
* [https://github.com/Introversion-Software/LastStarshipIssues/issues/new?template=localisation-feedback.yml bug tracker (localisation bug entry form)] (bugs.introversion.co.uk).
 
Remember to include:
 
* which language,
* the incorrect phrase and the
* correct translation.
* a screenshot, if possible.
 
If the translation is good, but the rendering on screen is bad, a [https://bugs.introversion.co.uk general bug report] would be very welcome.
 
== Inconsistency in Translation ==
If you notice an inconsistency in translation please let us know. For example, if an object type is translated in one way but then referred to in a different way.


Remember to let us know which language, the incorrect phrase and the correct translation. A screenshot would be really helpful.
Or if a ship name is translated in different ways.
 
Or other inconsistency.
 
* [https://github.com/Introversion-Software/LastStarshipIssues/issues/new?template=localisation-feedback.yml bug tracker (localisation bug entry form)] (bugs.introversion.co.uk).


== Translation Tools (Available from Alpha 14) ==
== Translation Tools (Available from Alpha 14) ==
Line 8: Line 41:


=== Translator Assist ===
=== Translator Assist ===
In preferences.txt ( On Windows, <code>%APPLOCALDATA%\Introversion\LastStarship\preferences.txt</code> and <code>~/Library/Application Support/LastStarship/preferences.txt</code> on Mac OS X ) there is a preference called <code>TranslatorAssist</code> .  
In preferences.txt there is a preference called <code>TranslatorAssist</code>. {{Data directories|preferences.txt}}
[[File:Translation Editor.png|thumb|In-game Translation Editor]]
[[File:Image.png|thumb]]
[[File:Image.png|thumb]]
[[File:LanguageKeys.png|thumb]]
[[File:LanguageKeys.png|thumb]]
Line 15: Line 49:
* Pressing <code>Alt</code> 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 <code>Alt</code> is released, reloading the language.
* Pressing <code>Alt</code> 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 <code>Alt</code> is released, reloading the language.
* Pressing <code>Ctrl</code> will display the name of the key instead of the actual translated phrase (or English fallback).
* Pressing <code>Ctrl</code> will display the name of the key instead of the actual translated phrase (or English fallback).
* Pessing <code>F8</code> will bring up the in-game translation editor. See below.


=== Contributing Translations ===
=== Translation Editor In Game ===
If you enable '''Translator Assist''' you will be able to press <code>F8</code>  to bring up the in game editor. You can search for the key you would like to change and make the change directly, which should be visible in game immediately.
 
Once you have finished making your changes press the <code>Browse</code> button to bring up the File Explorer on the language folder, where you can find <code>language.csv</code>. This is the file that contains your changes and that you should share with Introversion (e.g. talk to @Totengeist or @jknotten on the Discord)
 
See this video tutorial:
 
{{#ev:youtube|https://www.youtube.com/watch?v=BzXZjIeZjDc}}
 
=== Editing Language.CSV directly ===
In the same directory as preferences.txt, you will find a folder called <code>language</code>  
In the same directory as preferences.txt, you will find a folder called <code>language</code>  


Line 37: Line 81:


You can copy just the lines that you want to change from <code>original.csv</code> into <code>language.csv</code>, or you can copy all the whole contents of <code>original.csv</code>.  
You can copy just the lines that you want to change from <code>original.csv</code> into <code>language.csv</code>, or you can copy all the whole contents of <code>original.csv</code>.  
=== Characters don't appear properly ===
[[File:SpreadsheetTextImportScreen.png|thumb]]
If you are opening '''language.csv''' with a spreadsheet application like LibreOffice Calc or Microsoft Excel, you may see a ''Text Import'' screen. Please ensure that the ''Character set'' is set to Unicode (UTF-8), or you may see some characters not display properly.


=== Format of language.csv ===
=== Format of language.csv ===
Line 55: Line 103:


'''translation''': the translation itself.
'''translation''': the translation itself.
=== Double Quotes "" ===
Note that because language.csv is a comma-separated value text file, if there are any commas present in the English or the Translation, then the value should be surrounded by double quotes "".
For example, if the English was:
Hello, John.
Then in the language.csv file, it should have "" around it:
"Hello, John."
This is so that the game can tell which commas separate fields of the translation table and which are part of the text itself. Note that the enclosing double quotes ("") will be ignored by the game and won't render on the screen.


=== Markers in the text ===
=== 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.  
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
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.
- 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.
 
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 ====


=== Example: Fixing an incorrect translation in French ===
Key bindings are of the form {ToggleMap}. As with markers, if a keybinding appears in the English, it should also appear in the Translation.


=== Let's say for example that I want to change the key language_system ===
=== Other Issues ===
The fonts used in the game don't have every character from every language. Get in touch (see below) and we will try to accommodate you in the next alpha if we can.


=== Example: Starting a new Portuguese translation ===
Some parts of the game still have hardcoded English strings. Please let us know in the bug tracker.

Latest revision as of 05:09, 14 January 2026

Thank you for Coming To This Page![edit | edit source]

As I am sure you have noticed by now, the translations are very much a work-in-progress and we need your help to improve and perfect them. Your help will be much appreciated!

Getting your translation fixes or contributions included in the next Alpha[edit | edit source]

If you would like to get your fixes or perhaps even a new language included in the next Alpha, please talk to John on @jknotten on the Discord and he will be happy to help.

Discord[edit | edit source]

For help please visit the #mods channel on Discord.

Overflowing Text and Missing Translations[edit | edit source]

If you spot any overflowing text or places where the game is still using hard-coded English strings, please file a bug report (if one doesn't exist already) on the

A screenshot with some kind of callout or highlight of the particular area would be a very useful.

Mistakes in existing Translations[edit | edit source]

If you notice a translation error, please let us know about it on the

Remember to include:

  • which language,
  • the incorrect phrase and the
  • correct translation.
  • a screenshot, if possible.

If the translation is good, but the rendering on screen is bad, a general bug report would be very welcome.

Inconsistency in Translation[edit | edit source]

If you notice an inconsistency in translation please let us know. For example, if an object type is translated in one way but then referred to in a different way.

Or if a ship name is translated in different ways.

Or other inconsistency.

Translation Tools (Available from Alpha 14)[edit | edit source]

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[edit | edit source]

In preferences.txt there is a preference called TranslatorAssist.

Windows: %LOCALAPPDATA%\Introversion\LastStarship\preferences.txt
Mac: ~/Library/Application\ Support/LastStarship/preferences.txt
Linux/SteamDeck: ~/.local/share/Steam/steamapps/compatdata/1857080/pfx/drive_c/users/steamuser/AppData/Local/Introversion/LastStarship/preferences.txt

In-game Translation Editor

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).
  • Pessing F8 will bring up the in-game translation editor. See below.

Translation Editor In Game[edit | edit source]

If you enable Translator Assist you will be able to press F8 to bring up the in game editor. You can search for the key you would like to change and make the change directly, which should be visible in game immediately.

Once you have finished making your changes press the Browse button to bring up the File Explorer on the language folder, where you can find language.csv. This is the file that contains your changes and that you should share with Introversion (e.g. talk to @Totengeist or @jknotten on the Discord)

See this video tutorial:

Editing Language.CSV directly[edit | edit source]

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.

Characters don't appear properly[edit | edit source]

If you are opening language.csv with a spreadsheet application like LibreOffice Calc or Microsoft Excel, you may see a Text Import screen. Please ensure that the Character set is set to Unicode (UTF-8), or you may see some characters not display properly.

Format of language.csv[edit | edit source]

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.

Double Quotes ""[edit | edit source]

Note that because language.csv is a comma-separated value text file, if there are any commas present in the English or the Translation, then the value should be surrounded by double quotes "".

For example, if the English was:

Hello, John.

Then in the language.csv file, it should have "" around it:

"Hello, John."

This is so that the game can tell which commas separate fields of the translation table and which are part of the text itself. Note that the enclosing double quotes ("") will be ignored by the game and won't render on the screen.

Markers in the text[edit | edit source]

Programmatic Placeholders[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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

Other Issues[edit | edit source]

The fonts used in the game don't have every character from every language. Get in touch (see below) and we will try to accommodate you in the next alpha if we can.

Some parts of the game still have hardcoded English strings. Please let us know in the bug tracker.