Author Topic: Translation in other languages  (Read 2525 times)

0 Members and 1 Guest are viewing this topic.

Translation in other languages
Would it be possible to simplify the translation in other languages? Because now FreeSpace 2 uses two tables
strings.tbl and tstrings.tbl to translate FreeSpace in the other languages and it is very hard to translate mods into other languages.

 

Offline Inquisitor

Translation in other languages
There is someone who's actively working on a japanese port, but they have not come "into the fold" as it were. Not sure if they are attacking the TBL's directly or possibly working on a mechanism that can be apploed to other ports.
No signature.

 
Translation in other languages
The problem is that if somone makes a new modification or campaign and adds something to the ship/weapons database, it is not possible to translate it into German or other languages.

It is possible to translate the mission files that come with a campaign directly, but that it is not so useful.

Both tables are working the same way:

#English
0, "The main FreeSpace 2 campaign."
.
.
.
#end

#German
0, "Der Hauptfeldzug von FreeSpace 2"
.
.
.
#end


But the number of strings is limited by localize.cpp in the FreeSpace Source Code and so a translater must always change this number. Is it possible to change it?

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Translation in other languages
In response to the previous post, in order to translate a user-made mission or campaign, you would first need to change all the XSTR("...", -1) to use a unique value (other than -1), then add the translated text to the tstrings.tbl table (making sure you don't blow the upper limit on the table size...)

Ideally, all of the text strings in a mission would have XSTRs which could be translated into any language.  But when FRED generates any XSTRs they all have an ID of -1.

It would be nice to extend it so that any text strings in user-generated missions (as well as ship/weapon descriptions) have a unique identifier that could be used for translation purposes.

Currently, as we probably all know, there are two tables for international text:
  • strings.tbl which has 1570 strings in English, German and some French (the French translation was apparently never completed.)  These strings are extracted from the Freespace2 source files.  I am assuming there is/was a script that pulled anything matching "XSTR" in the source and generated this file.  Then it was edited before release to add a few extra strings that slipped through.  It is mostly UI labels, messages and errors.  This file won't need to change unless we add new strings to the source code, or release a new language.
  • tstring.tbl has 3421 strings in English and German.  These strings were extracted from the missions and from the tables (cutscenes, medals, messages, rank, ships, Species, tips, traitor, and weapons).  This file would be need have any translations of mods or user-generated missions
One way we could (maybe) do it would be to reserve ranges of values for the XSTRs in tstrings.tbl:
  • 0-4096 reserved (for [V])
  • xxxx-yyyy for weapons
  • xxxx-yyyy for ships
  • xxxx-yyyy for other tables
  • xxxx-yyyy for mission and campaign strings
That way the string being generated by mission designers wouldn't collide with those used by ship & weapons modders.

Also, the number of strings and number of languages is (I think) hardcoded somewhere, it would be nice to relax this somewhat and allow an arbitrary number of strings and languages.  This would of course require source code changes, both to Freespace and to FRED.

... just some random thoughts, open for feedback
your source code slave