The International Simutrans Forum

 

Author Topic: Translation fallback chain?  (Read 3527 times)

0 Members and 1 Guest are viewing this topic.

Offline sanna

  • *
  • Posts: 234
Translation fallback chain?
« on: May 30, 2009, 10:53:32 AM »
I am sorry if this is not the right forum for this topic, it is more related to how translations are handled in simutrans in general than the SimuTranslator tool specifically...

I am looking for information on how to know which translated string will be used in the game. I have tried to search the wikis (both English and German) for the information I seek, but have so far been unable to find it. This of course does not mean that it is not there, and if it is there, I would be most pleased with a link directing me to it.

It seems to me that there is a fall back chain of which translation is used, such that strings defined in pak64 (and that should be identical in pak) do not need to be defined in the pakset files, but the translation from the pak64 xx.tab is used. Strings defined in the pak xx.tab files clearly override any such "inherited" strings. Now I am uncertain whether this is is a hard coded fall back, or if it is related to the information found in the headers of the xx.tab.

Looking at the raw xx.tab texts used in simutrans they all start with a header such as (pak.german):
Code: [Select]
################################################################################
#                                                                              #
#                Simutrans Scenario Specific Translation File                  #
#                             Scenario: pak.german                             #
#                             Language: sv Svenska                             #
#                             Encoding: ISO-8859-1                             #
#                            Font : Prop-Latin1.bdf                            #
#                           Date Created: 26.05 2009                           #
#                                                                              #
#                                   authors:                                   #
#                              Frank Penz - FrankP                             #
#                      note: Administrator SimuTranslator                      #
#                           Michael Persson - Mippzon                          #
#                                    note:                                     #
#                          Susanna Björverud - Susanna                         #
#                                    note:                                     #
#                             Paul Color - color42                             #
#                                    note:                                     #
#                          Markus Pristovsek - prissi                          #
#              note: Administrator Base texts / pak64 / pak.japan              #
#                                                                              #
################################################################################

I guess my question is really if the note: Administrator Base texts / pak64 / pak.japan end part of the header is an indication of which translation files that will be used when playing the pakset; i.e., in the case mentioned, translations made in xx.tab files for base texts, pak64 and pak.japan will be used (if present - I have no pak.japan, and its absence does not seem to cause any problems). More specifically, if I am looking to make a translation for a given pak complete, and I still see untranslated strings in game, is it a sufficient course of action to scan these listed paks as well, or is it rather a question of the SimuTranslator translation files for these strings being outdated? Since the line in questions starts with note: I presume that a possible fallback chain is not defined from the xx.tab header, but I was wondering if this was a reliable source of information for a fallback chain (if indeed such a fallback chain exists...)

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Translation fallback chain?
« Reply #1 on: May 30, 2009, 10:59:40 AM »
I once had a talk with Prissi, and such a fallback chain is indeed there. I think it's hardcoded. I use it in pakHajo.Evolution translation files to override some base texts.

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Translation fallback chain?
« Reply #2 on: May 30, 2009, 12:57:51 PM »
There is one translation "list" that is loaded in order:
1) game texts
2) pak texts
...so the pak can overwrite texts from game engine translations.

Offline sanna

  • *
  • Posts: 234
Re: Translation fallback chain?
« Reply #3 on: May 30, 2009, 01:53:12 PM »
There is one translation "list" that is loaded in order:
1) game texts
2) pak texts
...so the pak can overwrite texts from game engine translations.
And does the 1) game texts include only the base texts, or also the texts from pak64 ?

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Translation fallback chain?
« Reply #4 on: May 30, 2009, 02:07:48 PM »
Only base. Pak64 is just another pak.