• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

PTBR Translation

Hey, just my two cents here: I would always recommend Deepl over Google translate as the translations are much more accurate and "normal" sounding, but I really love that you are doing this translation/localization!
 
@Peter Norton: if you can upload your files within the next day or two, they can go into the next update. Don't worry if the translation is incomplete - the mod already includes a very incomplete Polish translation, and the next update is going to include an incomplete French translation.
 
@Peter Norton: if you can upload your files within the next day or two, they can go into the next update. Don't worry if the translation is incomplete - the mod already includes a very incomplete Polish translation, and the next update is going to include an incomplete French translation.
I only saw your message today. In fact, the translation is not complete due to lack of proofreading and there are some phrases that were embedded in scripts, I didn't translate this part because it is very annoying to have to pick up phrases one by one, with my spreadsheet resource I can translate in less than 30 seconds and with some integrity tests. 1 story line remains to be translated, +- 100 files. I was also unable to integrate my translation into the game options, I use a script to replace the English language.
 
Upload your files anyway. I'll see if I can get the Portuguese translation to fit into the game - I can't read Portuguese but I can at least check that it appears.

As I said, it doesn't matter if the translation is incomplete; at the very least, when it is in place and can be seen, others can continue the translating. The Spanish and Russian translations, currently the most complete, were originally done by automated scripts and then improved by later translators.
 
No, sidestepping is normally disabled. Edit "PROGRAM\InternalSettings.h". Find this line:
Code:
#define SIDESTEP_ENABLED                0        // BOOL - 0 (default) = off, 1 = on: you can use sidestep during the game (NOTE: No collision detection!)
Change the 0 to 1. Note the comment - "No collision detection!" You can sidestep through walls. You can also sidestep onto areas where you can not normally walk, then you will need to sidestep back again before you can move normally.
 
I've run into a problem with the translation. I've changed the following files:
. PROGRAM\globals.c
. PROGRAM\MAXIMUS_functions.c
. PROGRAM\utils.c
. PROGRAM\INTERFACE\option_screen.c
. PROGRAM\INTERFACE\option_sl.c
to make the game recognise Portuguese. It can be selected in the "Options" menu - and then the game continues in English. Adding a few trace statements in "option_sl.c" shows that the problem may be in the game engine:
Code:
    SetInterfaceLanguage(sti(optref.gameoption.langinterface));
    string slname = GetInterfaceLanguageName(GetInterfaceLanguage());
trace("SetCurentOptions: optref.gameoption.langinterface = " + optref.gameoption.langinterface);
    if (FindLocalLanguage(slname)) {
trace("SetCurentOptions: trying to set language to '" + slname + "'");
        LanguageSetLanguage(slname);
    } else {
trace("SetCurentOptions: failed to set '" + slname + "', reverting to English");
        LanguageSetLanguage("English");
        iLangInterface = ILANG_ENG;
        optref.gameoption.langinterface = iLangInterface;
        //SaveMainOptions(optref);
    }
That produces the following output in "compile.log":
Code:
SetCurentOptions: optref.gameoption.langinterface = 7
SetCurentOptions: trying to set language to 'Portuguese'
SetCurentOptions: Current language is 'English'
The game has detected that I switched to Portuguese - "globals.c" defines ILANG_PTBR as 7. It finds the Portuguese translation ('FindLocalLanguage' simply checks that "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" exists, which it does). If the game can't find the chosen language then it switches to English by default, but that's not happening because there is no line "SetCurentOptions: failed to set 'Portuguese', reverting to English" in "compile.log". So it tries to use 'LanguageSetLanguage' to switch language to Portuguese, but the language is actually set to English.

This is in Build 14. Perhaps it will work in Build 15.

Attached is a zip with all the changed files.
 

Attachments

  • PROGRAM.zip
    99.6 KB · Views: 23
I've run into a problem with the translation. I've changed the following files:
. PROGRAM\globals.c
. PROGRAM\MAXIMUS_functions.c
. PROGRAM\utils.c
. PROGRAM\INTERFACE\option_screen.c
. PROGRAM\INTERFACE\option_sl.c
to make the game recognise Portuguese. It can be selected in the "Options" menu - and then the game continues in English. Adding a few trace statements in "option_sl.c" shows that the problem may be in the game engine:
Code:
    SetInterfaceLanguage(sti(optref.gameoption.langinterface));
    string slname = GetInterfaceLanguageName(GetInterfaceLanguage());
trace("SetCurentOptions: optref.gameoption.langinterface = " + optref.gameoption.langinterface);
    if (FindLocalLanguage(slname)) {
trace("SetCurentOptions: trying to set language to '" + slname + "'");
        LanguageSetLanguage(slname);
    } else {
trace("SetCurentOptions: failed to set '" + slname + "', reverting to English");
        LanguageSetLanguage("English");
        iLangInterface = ILANG_ENG;
        optref.gameoption.langinterface = iLangInterface;
        //SaveMainOptions(optref);
    }
That produces the following output in "compile.log":
Code:
SetCurentOptions: optref.gameoption.langinterface = 7
SetCurentOptions: trying to set language to 'Portuguese'
SetCurentOptions: Current language is 'English'
The game has detected that I switched to Portuguese - "globals.c" defines ILANG_PTBR as 7. It finds the Portuguese translation ('FindLocalLanguage' simply checks that "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" exists, which it does). If the game can't find the chosen language then it switches to English by default, but that's not happening because there is no line "SetCurentOptions: failed to set 'Portuguese', reverting to English" in "compile.log". So it tries to use 'LanguageSetLanguage' to switch language to Portuguese, but the language is actually set to English.

This is in Build 14. Perhaps it will work in Build 15.

Attached is a zip with all the changed files.
I applied your files to my installation, the language change worked but the title "Portuguese" did not appear.
Where you read "Settings" the correct one would be "Settings" but the character is not displayed. Probably at some points in the translation I forgot to remove the "õ" so it will be a mistake in the translation, I hope they correct it little by little as you mentioned.
I installed the game on a WXPSP3 VM and couldn't get it to work on W10.
 

Attachments

  • 1706557460454.png
    1706557460454.png
    421.6 KB · Views: 21
I can't get PTOTC to work on win10 64, so I put it on a WPX32 VM, but it doesn't run very well.
I managed to install the BNH on the W10 64, I think I'm going to abandon the POTC and translate the BNH. Is it possible to take advantage of POTC dialogues?
 
I can't get PTOTC to work on win10 64, so I put it on a WPX32 VM, but it doesn't run very well.
I managed to install the BNH on the W10 64, I think I'm going to abandon the POTC and translate the BNH. Is it possible to take advantage of POTC dialogues?
In BNH, all files must be in utf-8 format.
 
I can't find the file for this dialog, can anyone tell me the file?



Forget it, I found the file.
My scripts don't work properly for all translation files and sometimes some get corrupted.
 

Attachments

  • 1707859358894.png
    1707859358894.png
    1.4 MB · Views: 21
Last edited:
No BNH, todos os arquivos devem estar no formato utf-8.

You mentioned doing the translation for BNH, here I checked the file sizes in English for BNH with those for NH so as the sizes are the same I assume they are the same. So I copied my translation to BNH. As you mentioned that they must be in UTF8 format, I zipped the translation folder and told GPT to convert the ISO-8859-1 format to UTF8 by sending the zipfile and it apparently worked.

Hey Gray Roger, do you want to include the language in BNH??
Remembering that there is no translation review, there may be one or two buggy files and sentences out of context.
In BNH, all files must be in utf-8 format.
You mentioned doing the translation for BNH, here I checked the file sizes in English for BNH with those for NH so as the sizes are the same I assume they are the same. So I copied my translation to BNH. As you mentioned that they must be in UTF8 format, I zipped the translation folder and told GPT to convert the ISO-8859-1 format to UTF8 by sending the zipfile and it apparently worked.

Hey Gray Roger, do you want to include the language in BNH??
Remembering that there is no translation review, there may be one or two buggy files and sentences out of context.
 
Hey Gray Roger, do you want to include the language in BNH??
Remembering that there is no translation review, there may be one or two buggy files and sentences out of context.
I haven't been able to get the translation to work in NH and I haven't been able to get BNH to work at all yet. So I don't have any updates specifically for BNH. But if you upload your latest files, I can add them to my general update folder so that anyone who does have BNH can try them.
 
Follow files.
There are some corrections in relation to the previous translation.
In the previous translation all files were in ANSI, in this zipfile they are all in UFT8.

As my knowledge about the working characteristics of scripts is scarce, I just replaced the English language files with Portuguese ones, I use a script to rename the English-Portuguese/Portuguese-English folders
 

Attachments

  • PORTUGUESE.zip
    3.1 MB · Views: 15
As my knowledge about the working characteristics of scripts is scarce, I just replaced the English language files with Portuguese ones, I use a script to rename the English-Portuguese/Portuguese-English folders
Unfortunately, as that would ruin the English game, it can't go into any update unless someone else can figure out how to get it to work as a separate language.
 
Unfortunately, as that would ruin the English game, it can't go into any update unless someone else can figure out how to get it to work as a separate language.
The zipfile only contains the translated files, I have not attached any scripts, whether or not to use the translation depends on each person.
The way I do it seems to work well, so when I have patience I will study the scripts copying the characteristics of English doing something like English2 then just change to PTBR
 
I already tried adding Portuguese to the scripts. Attached is a zip file of the program files which I changed, not including any translations themselves.

"PROGRAM\INTERFACE\option_sl.c" contains a few 'trace' statements in function "SetCurentOptions":
Code:
    SetInterfaceLanguage(sti(optref.gameoption.langinterface));
    string slname = GetInterfaceLanguageName(GetInterfaceLanguage());
trace("SetCurentOptions: optref.gameoption.langinterface = " + optref.gameoption.langinterface);
    if (FindLocalLanguage(slname)) {
trace("SetCurentOptions: trying to set language to '" + slname + "'");
        LanguageSetLanguage(slname);
    } else {
trace("SetCurentOptions: failed to set '" + slname + "', reverting to English");
        LanguageSetLanguage("English");
        iLangInterface = ILANG_ENG;
        optref.gameoption.langinterface = iLangInterface;
        //SaveMainOptions(optref);
    }
trace("SetCurentOptions: Current language is '" + LanguageGetLanguage() + "'");
The result in "compile.log":
Code:
SetCurentOptions: optref.gameoption.langinterface = 7
SetCurentOptions: trying to set language to 'Portuguese'
SetCurentOptions: Current language is 'English'
The fact that the line "SetCurentOptions: trying to set language to 'Portuguese'" appears proves that the game hasn't failed due to being unable to recognise that there is a Portuguese language. It gets to the line 'LanguageSetLanguage(slname);' and the 'trace' shows that "slname" is "Portuguese". But after that, the final 'trace' shows that the language is English.

My guess is that this is a B14 engine limitation. Try those files in BNH with its new engine. But be sure to make copies of all these files before you replace them with the ones from the zip file!
PROGRAM\Dialog_func.c
PROGRAM\globals.c
PROGRAM\MAXIMUS_Functions.c
PROGRAM\utils.c
PROGRAM\INTERFACE\option_screen.c
PROGRAM\INTERFACE\option_sl.c
 

Attachments

  • compile.log
    6.8 KB · Views: 12
  • Portuguese scripts.zip
    99.6 KB · Views: 15
I already tried adding Portuguese to the scripts. Attached is a zip file of the program files which I changed, not including any translations themselves.

"PROGRAM\INTERFACE\option_sl.c" contains a few 'trace' statements in function "SetCurentOptions":
Code:
    SetInterfaceLanguage(sti(optref.gameoption.langinterface));
    string slname = GetInterfaceLanguageName(GetInterfaceLanguage());
trace("SetCurentOptions: optref.gameoption.langinterface = " + optref.gameoption.langinterface);
    if (FindLocalLanguage(slname)) {
trace("SetCurentOptions: trying to set language to '" + slname + "'");
        LanguageSetLanguage(slname);
    } else {
trace("SetCurentOptions: failed to set '" + slname + "', reverting to English");
        LanguageSetLanguage("English");
        iLangInterface = ILANG_ENG;
        optref.gameoption.langinterface = iLangInterface;
        //SaveMainOptions(optref);
    }
trace("SetCurentOptions: Current language is '" + LanguageGetLanguage() + "'");
The result in "compile.log":
Code:
SetCurentOptions: optref.gameoption.langinterface = 7
SetCurentOptions: trying to set language to 'Portuguese'
SetCurentOptions: Current language is 'English'
The fact that the line "SetCurentOptions: trying to set language to 'Portuguese'" appears proves that the game hasn't failed due to being unable to recognise that there is a Portuguese language. It gets to the line 'LanguageSetLanguage(slname);' and the 'trace' shows that "slname" is "Portuguese". But after that, the final 'trace' shows that the language is English.

My guess is that this is a B14 engine limitation. Try those files in BNH with its new engine. But be sure to make copies of all these files before you replace them with the ones from the zip file!
PROGRAM\Dialog_func.c
PROGRAM\globals.c
PROGRAM\MAXIMUS_Functions.c
PROGRAM\utils.c
PROGRAM\INTERFACE\option_screen.c
PROGRAM\INTERFACE\option_sl.c
If it doesn't work, patience, if that's the case, I'll provide my rename script to my fellow countrymen.
 
Back
Top