• 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!

WIP Spanish translation

Coming right up, @Grey Roger . The #scargo# string in the governor's dialog for the smuggling quest is not translated, probably needs the translation code in the .c file.
 

Attachments

  • Smuggler Agent_dialog.h
    8 KB · Views: 134
  • governor.h
    13.2 KB · Views: 121
  • blaze_dialog.h
    27.9 KB · Views: 131
  • common.ini
    81.3 KB · Views: 136
  • interface_strings.txt
    123.5 KB · Views: 143
Last edited:
There were some outdated files in the main questbook, some missing lines from recently updated quests and the like. There's probably more in the different storyline questbooks, but here's the main one.
 

Attachments

  • QUESTBOOK.zip
    18.3 KB · Views: 126
And a quick one before I log off for the day, updated a few of the character intros from RESOURCE\INI\TEXTS\SPANISH\Storyline
 

Attachments

  • storyline_strings.txt
    30.7 KB · Views: 154
Running some comparisons...

In the "PROGRAM.zip" from Tuesday, "PROGRAM\Storyline\FreePlay\DIALOGS\SPANISH\Abel Barco_dialog.h" says "Supongo que trabajas para la esposa del señor Suárez...", which means he's asking if you work for the wife of Señor Suárez. You haven't heard the name "Suárez" at this point, you've only met the wife, who is about to be renamed Elvira Carranza as women don't take their husbands' names. ;) So it's probably best to leave him asking if you work for Señora Carranza.

In the new "QUESTBOOK.zip", "governor_smuggling.txt" has this for line t7:
Code:
El gobernador #sgovernor# quiere que le devuelva las #smoney# unidades de #scargo# que me dio...
That should be #samount#, not #smoney#. Both "amount" and "cargo" are preprocessed variables set in "PROGRAM\QUESTS\quests_side.c". And indeed, in "governor.h", "cargo" and "amount" are preprocessed variables set in "governor.c".

Thanks for all your work so far! The new files (with corrections as above) will be going into the update. :onya
 
In the new "QUESTBOOK.zip", "governor_smuggling.txt" has this for line t7:
Code:
El gobernador #sgovernor# quiere que le devuelva las #smoney# unidades de #scargo# que me dio...
That should be #samount#, not #smoney#. Both "amount" and "cargo" are preprocessed variables set in "PROGRAM\QUESTS\quests_side.c". And indeed, in "governor.h", "cargo" and "amount" are preprocessed variables set in "governor.c".
I changed it to #smoney# because it was like that in the English file, so that may need changing aswell.

Nevermind, now I see I mixed up the lines
 
Maria's letter to Hornblower was missing from the Spanish books folder, so I added it and made some small corrections to others
 

Attachments

  • BOOKS.zip
    5.1 KB · Views: 121
This should be all the dialogs, questbooks and other texts needed for both the Gambler and Agent trophy quests, and a few files for the Engineer quest. You've already translated most of them, but the whole lot is in here for completion.
 

Attachments

  • new_quests.zip
    174.3 KB · Views: 115
Pick one, talk to a citizen, quit the game, then see what "error.log" says. If it complains about "DLG_TEXT" then there's a problem with the "dialog.h" file. Otherwise "error.log" should give a line number in the "dialog.c" where it's found a problem, though in that case I'd expect the English version to give trouble as well. Either way, tell me which citizen caused the trouble and I'll have a look to try to find the problem. ("eleuthera citizen_dialog.h" might cause trouble because I added a few lines to the English version. One of the people sitting inside Governor's Harbour tavern uses the citizen dialog, so you can ask him for directions, including directions to the tavern. For amusement, I added some lines so that if you ask directions for the tavern from the guy sitting in the tavern, he tells you to go out of the door and then turn round.)
"Santigo citizen" is one of the culprits. The error log gives both DLG_TEXT and a line in the .c file. The English version works and at least I'm sure it's not a missing comma or quote mark, because I counted them
Code:
COMPILE ERROR - file: DIALOGS\Spanish\Santiago citizen_dialog.h; line: 1
Invalid array 'DLG_TEXT' initialization parameters list
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
invalid function argument
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Invalid Expression
COMPILE ERROR - file: dialogs\Santiago citizen_dialog.c; line: 36
Undeclared identifier: DLG_TEXT
Line 36 in Santiago citizen_dialog.c is
Code:
d.Text = RandPhrase(TimeGreeting() + DLG_TEXT[0] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[1], DLG_TEXT[2] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[3], DLG_TEXT[4] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[5], &Dialog, dialog.snd1, dialog.snd2, dialog.snd3);

Here's my .h file aswell, in case I missed something
 

Attachments

  • Santiago citizen_dialog.h
    10.5 KB · Views: 132
It's certainly a problem with "Santiago citizen_dialog.h". The first line of "error.log" complains about it. If the "dialog.h" file is wrong then array "DLG_TEXT" is not defined, which is what the last line of "error.log" says.

It's not a missing comma. It's one comma too many on line 106. Also, the declaration at the top of "Santiago citizen_dialog.h" was 'string DLG_TEXT[184] = {', whereas in the original English it's 'string DLG_TEXT[181] = {'. There are the same number of lines in both, so 181 is correct.

I've replaced "Habana" and "Port Royale" with "#sHavana#" and "#sRedmond#" on line 95. You can find all the preprocessed town and island variables defined in "PROGRAM\utils.c" and it's generally a good idea to use them instead of fixed names so that they'll appear correctly if towns and islands change names due to period (or if the player captures a town for himself and then renames it). Having said that, the only time Havana and Port Royale generally change names is in "Early Explorers", which makes that line nonsense anyway because the governor of Spanish Santiago de Cuba is not going to be frightened of an invasion from Spanish Villa de la Vega! Nevertheless, I've done the same to the English version of the file as well.
 

Attachments

  • Santiago citizen_dialog.h
    10.5 KB · Views: 130
Thanks. Commas will be the end of me. I had found and deleted one extra comma, but I combed the file twice and that one escaped me.

I could swear that my English file also stated 184 lines at the beginning but maybe it was me who changed it inadvertently mistaking it for a different file I had open.
 
Everything seems to work, except the line about the town's population
upload_2021-8-12_20-45-50.png
 
That's a problem with "Santiago citizen_dialog.c", which doesn't include the population count or the final part of the sentence. It does now!

There's also one small mistake in Spanish "Santiago citizen_dialog.h" because I replaced "Habana" with "#sHavana#", which meant the citizen told me that the governor works closely with the governor of La La Habana. xD I hadn't removed the "la" in front of "Habana". This is now corrected.
 

Attachments

  • Santiago citizen_dialog.c
    12 KB · Views: 140
  • Santiago citizen_dialog.h
    10.5 KB · Views: 132
Oh man, how was this poetic imagery NOT set up for translation? That cannot stand :rofl
Code:
                case "1":
                    Spanking = "polishin' the jewel";
                break;
                case "2":
                    Spanking = "swabbin' the foredeck";
                break;
                case "3":
                    Spanking = "beatin' Venus' Anvil";
                break;
                case "4":
                    Spanking = "spankin' the plank";
                break;
                case "5":
                    Spanking = "playin' the fiddle";
                break;
                case "6":
                    Spanking = "shakin' the ol' cod";
 
It looks like several other citizen dialog.c files lack the population count, same as Santiago's. I'm fixing them as I translate the dialogs. When I'm done with all the citizens, I'll upload them.
 
Oh man, how was this poetic imagery NOT set up for translation? That cannot stand :rofl
Code:
                case "1":
                    Spanking = "polishin' the jewel";
                break;
                case "2":
                    Spanking = "swabbin' the foredeck";
                break;
                case "3":
                    Spanking = "beatin' Venus' Anvil";
                break;
                case "4":
                    Spanking = "spankin' the plank";
                break;
                case "5":
                    Spanking = "playin' the fiddle";
                break;
                case "6":
                    Spanking = "shakin' the ol' cod";
Political correctness, thy name is NOT "pirate"! :rofl
 
Here are all the citizens, including the c. files of those who needed fixing the population count, and both common.ini with the #sOnanism# strings added (next to the swears) and a couple of other small fixes.

EDIT: A couple of last minute edits
 

Attachments

  • citizens.zip
    218.8 KB · Views: 114
Last edited:
Here are all the citizens, including the c. files of those who needed fixing the population count, and both common.ini with the #sOnanism# strings added (next to the swears) and a couple of other small fixes.
I'm sure @Grey Roger will see this and take care of it after he comes back from his vacation. :cheers
 
Still on holiday but looking in anyway...

@Homo eructus: could you take the onanism stuff back out of "common.ini"? There's a better way to handle hard-coded dialog text like that, which is to put it into the relevant "dialog.h" file - in this case, "Terry Snider_dialog.h". Then simply replace the hard-coded phrases in "Terry Snider_dialog.c" with "DLG_TEXT" references.

Also, could you translate "Habitue_dialog.h"? There are a lot of phrases in there related to gambling which don't appear in dialog with anyone in a tavern, they appear on screen during gambling games. They won't be in "Habitue_dialog.h" for much longer because one thing I want to do is copy the whole lot into "common.ini", then change the gambling code to use 'XI_ConvertString("gambling phrase")' instead of 'DLG_TEXT[wherever]'. Partly because any gambling currently dumps a message in "error.log" about 'DLG_TEXT' being declared twice, and partly for the benefit of characters who gamble but don't use "Habitue_dialog", such as soldiers when you gamble for smuggling information. But if the Spanish "Habitue_dialog.h" is corrected, I can simply copy the gambling phrases from "Habitue_dialog.h" into both English and Spanish "common.ini".
 
Last edited:
I'll see what I can do. It wasn't Terry Snider where I found it, it was the generic QC citizen. They share most of their lines.
 
Still on holiday but looking in anyway...

@Homo eructus: could you take the onanism stuff back out of "common.ini"? There's a better way to handle hard-coded dialog text like that, which is to put it into the relevant "dialog.h" file - in this case, "Terry Snider_dialog.h". Then simply replace the hard-coded phrases in "Terry Snider_dialog.c" with "DLG_TEXT" references.
To be honest, I absolutely don't know what I'm doing. I added the phrases at the end of QC citizen_dialog.h (so as not to have to change the reference numbers of all the lines if I were to add them in the middle of the file) and tried to add the references in the .c file like this. I'm sure it's not right, I'm just bumbling in the dark. So of course it doesn't work, but I don't have the first clue of how to do it right.
Code:
            string Spanking;
            switch(RandEuphemism){
                case "1":
                    Spanking = DLG_TEXT[129];
                break;
                case "2":
                    Spanking = DLG_TEXT[130];
                break;
                case "3":
                    Spanking = DLG_TEXT[131];
                break;
                case "4":
                    Spanking = DLG_TEXT[132];
                break;
                case "5":
                    Spanking = DLG_TEXT[133];
                break;
                case "6":
                    Spanking = DLG_TEXT[134];
                break;
 
Back
Top