• 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

@Homo eructus: can you translate the following?
"Well? Where is your friend? If you have any friends, that is."
"He's... hic... somewhere around here. Don't go... hic... anywhere. We'll be right back... hic... to kick your... hic..."
"He's afraid of you... hic... But I'm not. And I don't need... hic... any friends to beat you senseless!"
I'm writing a new dialog file for soldiers who have insulted your tavern friend, and if you decline to fight and then talk to the soldier again, those are the lines for the second and subsequent conversations. The first use for the new file will be for a soldier that can appear in Havana or Port au Prince, where I added tavern inhabitants to allow you to gamble there and now need to allow the same inhabitants to drink. I'll probably add the same lines to the end of "Pirate Soldier_dialog.h" for the characters in Nevis Pirate Settlement and Bonaire Pirate Fort. (The rest of the new file is a straight copy of lines from one of the other soldier dialog files, so the Spanish version can be copied from the same file which you've already translated.)
 
@Homo eructus: can you translate the following?I'm writing a new dialog file for soldiers who have insulted your tavern friend, and if you decline to fight and then talk to the soldier again, those are the lines for the second and subsequent conversations. The first use for the new file will be for a soldier that can appear in Havana or Port au Prince, where I added tavern inhabitants to allow you to gamble there and now need to allow the same inhabitants to drink. I'll probably add the same lines to the end of "Pirate Soldier_dialog.h" for the characters in Nevis Pirate Settlement and Bonaire Pirate Fort. (The rest of the new file is a straight copy of lines from one of the other soldier dialog files, so the Spanish version can be copied from the same file which you've already translated.)
Here
"¿Y bien? ¿Dónde está tu amigo? Si es que tienes amigos, claro."
"Está... hip... por aquí, en alguna parte. No te muevas... hip... de donde estás. Volveremos enseguida... hip... a patearte el... hip..."
"Te tiene miedo... hip... Pero yo no. ¡Y no necesito... hip... a ningún amigo para darte una paliza!"
 
A very small update of sorts from the last days of August, adding a few unstranslated locations and logit strings to Woodes Rogers. Some of them already had the translation code and only needed to be added to interface_strings. There are more strigns like that but I only played through the initial island so I didn't add anything past that, as to not bloat the file with new strings without making sure the strings are used and tested.
 

Attachments

  • Woodes rogers locations.zip
    263.8 KB · Views: 124
Thanks! :onya

The Spanish version of "common.ini" replaces a lot of exclamation marks with full stops in the gambling text. This is presumably because "gamble.c" does not provide for the Spanish inverted exclamation and question marks. At least, not yet. I've been doing some work on "gamble.c" to change all "DLG_TEXT" references to "XI_ConvertString" and copying all the relevant text from "Habitue_dialog.h" to "common.ini" (both English and Spanish, using your updated "Habitue_dialog.h" for the latter). And I've added definitions for variables "prefix1" and "prefix2", which in Spanish are "¡" and "¿" respectively, and in other languages are blank. That means it should be possible to put "prefix1" or "prefix2" before any assembled string which involves an exclamation mark or question mark, so that Spanish players will see the relevant mark and anyone else won't see anything.

Attached are my proposed updated version of "gamble.c" and the Spanish version of "common.ini" - see if you can put the prefixes where they're needed to make games look right in Spanish. Otherwise I'll have a go at it, though of course my Spanish is not as good as yours!

About "Woodes Rogers" locations: you've added "TranslateString" to "QuestLocations.c", specifically the labels for "Log-house" and "Pirate's Cave". No other location labels have "TranslateString", either in "QuestLocations.c" or in other location files, so presumably labels are already translated later when they're displayed. Unless those two specific locations show up in English when you play the game, I'd be inclined to leave out "TranslateString".
 

Attachments

  • gamble.c
    115.2 KB · Views: 124
  • common.ini
    83.1 KB · Views: 139
Last edited:
About "Woodes Rogers" locations: you've added "TranslateString" to "QuestLocations.c", specifically the labels for "Log-house" and "Pirate's Cave". No other location labels have "TranslateString", either in "QuestLocations.c" or in other location files, so presumably labels are already translated later when they're displayed. Unless those two specific locations show up in English when you play the game, I'd be inclined to leave out "TranslateString".
Yes, those locations in particular were in English when I played while others were translated (as I said, I only tested the very first segment of the sotoryline, when the player is marooned on the island). I looked for other instances of log-house nad pirate cave and those were the only ones to appear.

The problem with the exclamation marks is that some of those strings start already with an excalmation mark belonging to the previous sentence so depending on the order in which they are assembled, the same sentence may or may not show up with an exclamation mark, and so I can't place a fixed opening exclamation mark because it's kind of random whether many sentences will have a closing exclamation mark, depending on which other string happens to be next in that particular combination. These days, I don't have the time to try and sort that out. You're welcome to try and I could check out the results afterwards, but it may be less of a headache to leave the full stops. It wouldn't be unusual for many of those lines to be read like more dispassionate statements rather than full on exclamations anyway.
 
Last edited:
I tried setting language to Spanish, then started "Woodes Rogers". I've copied your version of "interface_strings.txt" into my installation, but not the new version of "QuestLocations.c". Both "Log-house" and "Pirate's Cave" were translated for the icons leading to the locations:
loghouse.jpg pirate_cave.jpg

But not when trying to save game. This is normal - by comparison, San Juan port does the same:
port_label.jpg port_save.jpg

There were a couple of other problems, though. For one thing, I don't have Spanish versions of any of the "Woodes Rogers" dialog files. Either I missed a collection of files or you never uploaded them; either way, if you have translated any of the storyline dialog files, could you upload them again, please?

Also:
build_raft.jpg
The phrase "Hmm, with some more logs maybe I could build a raft here." is not included in "interface_strings.txt". It's in "StartStoryline.c", and at least two other phrases in there are missing from "interface_strings.txt" as well. I was able to add those properly myself. One is "Fort Waxholm", and as "Fort Moultrie" isn't translated, I guessed that "Fort Waxholm" doesn't need to be translated either. The other is "Kitchen" - there are translations for a couple of specific kitchens such as "Rogers' kitchen", which translate it as "Cocina", so I added that. If you can translate "Hmm, with some more logs maybe I could build a raft here", I'll add it to "interface_strings.txt" in place of the dummy version which you see in the screenshot. :D Then I'll upload a version of the file with all the new phrases added.
 
I guessed that "Fort Waxholm" doesn't need to be translated either
No it's a name and a real fort just outside Stockholm.
There's a tale about one of the russian Tsars. He laughed only twice in his life. One when his mother in law died and second when he saw Fort Waxholm.
 
No it's a name and a real fort just outside Stockholm.
There's a tale about one of the russian Tsars. He laughed only twice in his life. One when his mother in law died and second when he saw Fort Waxholm.
What a story!
Sounds like a nice guy, he does. :wp
 
I tried setting language to Spanish, then started "Woodes Rogers". I've copied your version of "interface_strings.txt" into my installation, but not the new version of "QuestLocations.c". Both "Log-house" and "Pirate's Cave" were translated for the icons leading to the locations:
View attachment 39389 View attachment 39388

But not when trying to save game. This is normal - by comparison, San Juan port does the same:
View attachment 39390 View attachment 39391
They definitely weren't translated before. But the strings must have been stored somewhere else with the translation code already added if they only needed the updated interface-strings to show up in Spanish and not the QuestLocations file, which was the only match for my search. Good to know.
There were a couple of other problems, though. For one thing, I don't have Spanish versions of any of the "Woodes Rogers" dialog files. Either I missed a collection of files or you never uploaded them; either way, if you have translated any of the storyline dialog files, could you upload them again, please?
No problem there. I never started translating those.
Also:
View attachment 39392
The phrase "Hmm, with some more logs maybe I could build a raft here." is not included in "interface_strings.txt". It's in "StartStoryline.c", and at least two other phrases in there are missing from "interface_strings.txt" as well. I was able to add those properly myself. One is "Fort Waxholm", and as "Fort Moultrie" isn't translated, I guessed that "Fort Waxholm" doesn't need to be translated either. The other is "Kitchen" - there are translations for a couple of specific kitchens such as "Rogers' kitchen", which translate it as "Cocina", so I added that. If you can translate "Hmm, with some more logs maybe I could build a raft here", I'll add it to "interface_strings.txt" in place of the dummy version which you see in the screenshot. :D Then I'll upload a version of the file with all the new phrases added.
"Hum, con unos cuantos troncos más, quizás podría construir una balsa."
 
They definitely weren't translated before. But the strings must have been stored somewhere else with the translation code already added if they only needed the updated interface-strings to show up in Spanish and not the QuestLocations file, which was the only match for my search. Good to know.
It depends on which function is being used for the translation. If "interface_strings.txt" is being used then it's probably "TranslateString" because "XI_ConvertString" only looks at "common.ini". "TranslateString" searches several files and if it can't find the text it's looking for in any of them, it returns the original text. That's why I saw "Hmm, with some more logs maybe I could build a raft here" in English and why you saw the place names in English before they were added.

"QuestLocations.c" is certainly where "log-house" and "Pirate's Cave" are defined, along with other locations specific to the story. None of the others, including "Swamp Wreck", use "TranslateString" on their labels, so they should all behave the same.

No problem there. I never started translating those.
Fair enough, you'll probably do it in your own time - I was just concerned in case I'd missed something!

"Hum, con unos cuantos troncos más, quizás podría construir una balsa."
Thanks! As promised, here's Spanish "interface_strings.txt" with the new phrases added.
 

Attachments

  • interface_strings.txt
    124.1 KB · Views: 132
A couple of UI strings from perks.c translated (added to common.ini under the already present "perks" section) and a stray full stop removed form AbilityDescribe that prevented the description of one ability from showing.

Now, that should do it
 

Attachments

  • perks.zip
    55.3 KB · Views: 102
Last edited:
In Enc_Officer_Dialog.c there's this bit
Code:
// KK -->
        string ssel = GetSymbol(Dialog.CurrentNode, 4) + GetSymbol(Dialog.CurrentNode, 5);
        int cc;
        int sel_nation = sti(ssel);
        string tstr = XI_ConvertString(GetNationDescByType(sel_nation));
        HoistFlag(sel_nation);
        if (sel_nation == PERSONAL_NATION) tstr = "your";
        d.Text = DLG_TEXT[48] + tstr + DLG_TEXT[49];
// <-- KK

for this line, refering to the personal colors as opposed to the national ones that are handled via external files and already translated:
"Very well, I'll tell the crew to hoist ",
" colors.",

What would be the best way to make it so that it can be translated? maybe replace "your" in the file for a call to the "personal" string from common.c?
 
In another part of "Enc_Officer_Dialog.c" is this:
Code:
       case "flag10":
           PChar.nation = PERSONAL_NATION;
           d.Text = DLG_TEXT[48] + XI_ConvertString("4"+GetNationDescByType(PERSONAL_NATION)) + DLG_TEXT[49];
           Link.l1 = DLG_TEXT[50];
           Link.l1.go = "Exit";
       break;
I'm not sure that's going to work. 'GetNationDescByType' first checks function 'InvalidNation' to see if it has been asked to describe anything other than a regular nation. For PERSONAL_NATION, 'InvalidNation' returns "personal", so that's what 'GetNationDescByType' returns. Therefore that line in "flag10" is going to try to look up "4personal".

There's a section of "common.ini" with "4" plus various nations. I'd be inclined to add "4personal" and translate it as "your", or possibly "your own". Then use it in the code which you found:
Code:
if (sel_nation == PERSONAL_NATION) tstr = XI_ConvertString("4personal");
That should mean your officer will say "Very well, I'll tell the crew to hoist your own colors" which to me sounds better than "Very well, I'll tell the crew to hoist personal colors".

(I'll need to try telling my officer to change flag because I'm not sure the command to hoist Personal flag is going to work properly...)
 
Thanks, I did that.

There's new dialog in the officer's file for dividing the plunder, but I don't see the options ingme to test them. Are they not implemented yet?

Well, some of the lines are almost the same as the loanshark's, so I can test them by proxy at least.
 
Last edited:
The quartermaster can divide plunder, but only on board ship and only when you're moored. He does not have the option to start a new expedition, which delays you a couple of months and repairs your ships for free; only the loanshark still does that.

Moor the ship, go to your quarterdeck and find the quartermaster. Talk to him and choose "About the ship and crew...", then "It's time to spread a little cheer among the men and divide the plunder, Mister InsertNameHere." ("Mister" may be something different depending on your nation and whether the quartermaster is actually a quartermistress.)

And of course, none of this will happen unless you've signed articles so that you are paying by dividing plunder.
 
Ah, I suspected it was a quartermaster thing, but wasn't sure because all the other options seem to be available to all officers.
 
I've spent the afternoon translating the berthing interface, which was only partially done. And I think I have discovered a bug in the process. When you have a ship laid up and want to swap it for your current active ship, leaving your current ship in shore leave, the confirmation screen that pops up is the other way round, It says that the ship that was laid up is in shore leave and that the ship you want to put in shore leave is going to be laid up. It doesn't affect the result, you still get what you selected, I guess it's just a bad connection somewhere in kam_shipberthing_windows.c or another related file that fires the wrong confirmation strings but my brain is too fried right now to try and figure it out.

And, unrelated, but curious nonetheless, precisely one string from that case ("You have selected to lay up the") utterly refused to work with interface_strings, so I had to put it in common.ini, where it worked fine, while the rest, who behaved correctly, went into interface_strings. They all work correctly as far as a I can tell.

The common.ini also includes the 4personal string for the officer flag dialog, which I will upload next together with the loanshark and a couple of others

Edit: added a couple of missing brackets in kam_shipberthing_windows.c
 

Attachments

  • berthing.zip
    133.7 KB · Views: 107
Last edited:
Back
Top