• 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

@Grey Roger , have you considered this? I shortened a couple of titles, but there are some still overlapping the date even in English
By the way, would it be possible to nudge the title a little to the right in the ship's log? Even some of the longer English titles get mashed wih the date.
View attachment 42174
But it's more noticeable with a lot of the Spanish ones
View attachment 42175
I think this is about as long as titles get so there's still space to the right, even if some are a little bit longer than this.
 
Hmm, I just found an error that I hadn't seen before. One of the tavern news logs is completely blank, both in the tavern interface and in the log itself. I can't tell which one it is.
1684859321496.png

1684858020092.png


error.log points to Charles Windem_dialog.h, but that's weird because the problem isn't with the dialog itself and even the string that triggers the news is handled through the common dialog file for tavernkeepers.
Code:
RUNTIME ERROR - file: seadogs.c; line: 740
Save - ARef to non existing attributes branch
RUNTIME ERROR - file: seadogs.c; line: 740
Save - ARef to non existing attributes branch
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 133 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 134 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 135 [size:133]
COMPILE ERROR - file: DIALOGS\Spanish\Charles Windem_dialog.h; line: 1
invalid index 136 [size:133]
 
Fixing "Charles Windem_dialog.h" turns out to be very easy. The first line is 'string DLG_TEXT[133] = {'. That should be 'string DLG_TEXT[137] = {'.

As for the blank log, the last entry in "Towntable.c" is:
Code:
        case RANDOM_TOWN_EVENT_GOODECO:   // There are usually no news telling that a city performed well, it happens unnoticed.
            logTitle ="";
            AdjustTownEconomy(ctown, 1);
        break;
Then, after the event selection, the log is written:
Code:
    WriteNewLogEntry(PreprocessText(logTitle), PreprocessText(logEntry), "General", false);
The original line is slightly different:
Code:
    if(logTitle != "") WriteNewLogEntry(logTitle, logEntry, "General", false);
The blank line is probably the result of that condition being left out. The attached version puts it back.
 

Attachments

  • Towntable.c
    65.2 KB · Views: 51
A last* bit of UI: "You unlocked perk:" from Book.c

*unless I find more while playing, that thing I haven't been able to do properly in the last few years (that's the curse of the modder:modding:p)
 

Attachments

  • interface_strings.txt
    140.1 KB · Views: 45
  • Book.c
    6.3 KB · Views: 50
Try this version of "interface_strings.txt". It has a set of new locations starting at line 1175, directly after 'Plantation{Plantación}', mostly for the "Hornblower" storyline. Also present in this version are a couple of lines for "Woodes Rogers", minor variations of lines already present so I was able to simply copy the translations (lines 1530 and 1534).
 

Attachments

  • interface_strings.txt
    140.7 KB · Views: 62
Btw, I've started experiencing a weird crash on startup out of nowhere. No errors or anything. And I only had edited dialogs.

Nevermind. Deleting the options file was the right answer. It immediately works again.
 
Last edited:
I figured the dialogs I finished yesteday and a couple of fixes more can make for yet another upload. I'm fairly sure some of the longer standard storyline dialogs (like danielle_dialog.h or researcher_dialog.h) will have some problems that I will only find after testing them (I've only tested up till the fight with the 'Oiseau').

Other than that, fixed some general dialogs, a string in interface_strings.txt that didn't match the .c file ("This officer can command ships up to class"), a strlower added to the morale report switch, and a couple of RESOURCE files with wrong encoding
 

Attachments

  • SPAfileMay24.zip
    234.7 KB · Views: 57
I figured the dialogs I finished yesteday and a couple of fixes more can make for yet another upload. I'm fairly sure some of the longer standard storyline dialogs (like danielle_dialog.h or researcher_dialog.h) will have some problems that I will only find after testing them (I've only tested up till the fight with the 'Oiseau').

Other than that, fixed some general dialogs, a string in interface_strings.txt that didn't match the .c file ("This officer can command ships up to class"), a strlower added to the morale report switch, and a couple of RESOURCE files with wrong encoding
Comparing those showed that there's a mistake in both "Faust Gasquet_dialog.c" and English "Faust Gasquet_dialog.h" - the former is setting up preprocessed variable "#ssir#", the latter uses it, and it doesn't need to be there because the code for that line adds a 'GetMyAddressForm' command to insert the title without needing the variable. I'll correct those to match the new Spanish version.

But your zip has "danielle_dialog.c" in "PROGRAM\Storyline\standard", and a lot of Spanish "dialog.h" files in "PROGRAM\Storyline\standard\DIALOGS". Also, there's to be another correction. In cases "speak_danielle_in_lighthouse_prepare_to_search_rheims_3", "Danielle_immortal" and "Danielle_mortal", it sets "pronoun3" so:
Code:
            if (NPChar.sex == "woman") Preprocessor_AddQuestData("pronoun3", XI_ConvertString("her"));
            else Preprocessor_AddQuestData("pronoun3", XI_ConvertString("his"));
That was an earlier attempt to make a translatable possessive pronoun which would never have worked because "her" translates to objective, not possessive. I've since added a new function "GetMyPronounPossessive" to "PROGRAM\Dialog_func.c" to return "his1" or "her1" depending on gender, and these are then translated in "common.ini". So these dialog cases will now use "GetMyPronounPossessive". (I've still to figure out a way to cater to languages in which the possessive pronoun depends on the object rather than the subject, such as Spanish, but at least it's better than using the wrong pronoun entirely.)
 

Attachments

  • danielle_dialog.c
    60 KB · Views: 51
I'm fairly sure some of the longer standard storyline dialogs (like danielle_dialog.h or researcher_dialog.h) will have some problems
Sure enough, I finally found Danielle (Nathan in my game, as I'm playing as Danielle) and her file had a couple of missing/extra commas I didn't see. I really have a hard time spotting these on the file and no reloable way to search for them, so I have to copypaste sections of the English file and test the dialog ingame repeatedly to isolate where the mistake is, and it takes a while.

The others are small typos or a couple of lines out of order.
 

Attachments

  • Wilfred_dialog.h
    3.3 KB · Views: 46
  • danielle_dialog.h
    32.8 KB · Views: 39
  • Robert Christopher Silehard_dialog.h
    32.2 KB · Views: 46
  • Ewan Glover_dialog.h
    4.2 KB · Views: 38
The name of the Black Pearl in the standard storyline isn't translated. Is there a solution for that?
Have you a savegame from before you go to Martinique and see the Black Pearl? If so, try putting this into "console.c":
Code:
Characters[GetCharacterIndex("Barbossa")].Ship.Name = TranslateString("","Black Pearl");
Load the savegame, press F12, and you should see a message "Executed Console" - if not, either I made a typo or you did, and "error.log" should give a clue as to what it is. If you do get that message, sail to Martinique and the ship name should be translated - it's already included in "common.ini".

If that works, edit "PROGRAM\Storyline\standard\characters\init\Story.c". Find this line in Barbossa's definition:
Code:
ch.Ship.Name = "Black Pearl";
Change it to:
Code:
ch.Ship.Name = TranslateString("","Black Pearl");
That should fix it for future games.

And the opposite, an unwanted translation: Gordon Carpenter has become Gordon Carpintero
For some reason this character is defined in "PROGRAM\Characters\init\SideQuest.c", not in the storyline-specific character files. Find this line:
Code:
ch.lastname = TranslateString("", "Carpenter");
Change "Carpenter" to "Carpenter1". Then add a line for "Carpenter1" in "RESOURCE\INI\TEXTS\SPANISH\characters_names.txt" - if the character is in a general file then his name translation may as well be in the general "characters_names.txt" too. It will also need to go into the English file, and @AkrimalS will need to add it to the Russian file - it should be "Carpenter" in Cyrillic letters, not the Russian translation of "carpenter".
 
"Story.c" and "SideQuest.c" are read when you start a new game. Black Pearl is probably being translated only because of the line in "console.c". So, for Gordon Carpenter, try adding this to "console.c":
Code:
Characters[GetCharacterIndex("Gordon Carpenter")].lastname = TranslateString("", "Carpenter1");
If you have added "Carpenter1" to "characters_names.txt", if you press F12 and if the message "Executed Console" appears, then you should see him with his correct name.
 
Ah, ok, that makes sense

Confirmed
 

Attachments

  • Story.c
    72 KB · Views: 35
  • SideQuest.c
    207.6 KB · Views: 34
  • characters_names.txt
    23.2 KB · Views: 38
I've found yet more untranslated strings, in this case these from QUESTS\Quest_Messages.h

Code:
#define QUEST_MESSAGE1 "Mission Failed. Danielle is dead! GAME OVER."
#define QUEST_MESSAGE2 "The time for your delivery quest has expired."
#define QUEST_MESSAGE3 "You became TOO old to resist the curse of the Aztec gold..."
#define QUEST_MESSAGE4 "You found a silver treasure!"
#define QUEST_MESSAGE5 "Nigel Blythe is attacking the smuggler corvette!"
#define QUEST_MESSAGE6 "Nigel Blythe has left you!"
#define QUEST_MESSAGE7 "Captain, we've encountered the Black Pearl!"
#define QUEST_MESSAGE8 "Nice work, you've killed your teacher!"
#define QUEST_MESSAGE9 "Now you're on your own in this cruel world!"
#define QUEST_MESSAGE10 "To a pirate who has no mercy in his"
#define QUEST_MESSAGE11 "wicked heart we give a secret reward!"
#define QUEST_MESSAGE12 "Sorry, you have too many officers! Fire one or more of your officers and try again!"
#define QUEST_MESSAGE13 "Zaid gives you a very useful spyglass!"

When these messages are called to appear, they use this command
Code:
Log_SetStringToLog(QUEST_MESSAGE7);

I'm not sure how to translate them


Also, I just noticed Bullen Bay (in Curaçao) was not added to interface_strings, here it is
 

Attachments

  • interface_strings.txt
    140.8 KB · Views: 42
Last edited:
I've found yet more untranslated strings, in this case these from QUESTS\Quest_Messages.h

Code:
#define QUEST_MESSAGE1 "Mission Failed. Danielle is dead! GAME OVER."
#define QUEST_MESSAGE2 "The time for your delivery quest has expired."
#define QUEST_MESSAGE3 "You became TOO old to resist the curse of the Aztec gold..."
#define QUEST_MESSAGE4 "You found a silver treasure!"
#define QUEST_MESSAGE5 "Nigel Blythe is attacking the smuggler corvette!"
#define QUEST_MESSAGE6 "Nigel Blythe has left you!"
#define QUEST_MESSAGE7 "Captain, we've encountered the Black Pearl!"
#define QUEST_MESSAGE8 "Nice work, you've killed your teacher!"
#define QUEST_MESSAGE9 "Now you're on your own in this cruel world!"
#define QUEST_MESSAGE10 "To a pirate who has no mercy in his"
#define QUEST_MESSAGE11 "wicked heart we give a secret reward!"
#define QUEST_MESSAGE12 "Sorry, you have too many officers! Fire one or more of your officers and try again!"
#define QUEST_MESSAGE13 "Zaid gives you a very useful spyglass!"

When these messages are called to appear, they use this command
Code:
Log_SetStringToLog(QUEST_MESSAGE7);

I'm not sure how to translate them
They've already been translated. You'll find them in "RESOURCE\INI\TEXTS\SPANISH\globals.txt". The only problem is that nothing seems to refer to "globals.txt" - certainly 'TranslateString' doesn't. And everything else in "globals.txt" seems to be handled elsewhere - rumours are in "rumour_strings.txt" (general and storyline-specific files exist), locations are in "interface_strings.txt", everything else is in "common.ini". So I'd be inclined to copy the "QUEST_MESSAGE" lines into "common.ini", then anywhere you find them being used, add in 'XI_ConvertString', e.g.:
Code:
Log_SetStringToLog(XI_ConvertString(QUEST_MESSAGE7));

Also, I just noticed Bullen Bay (in Curaçao) was not added to interface_strings, here it is
Try this version. As well as "Bullen Bay", it also has "Boca de Yuman." and "Boca de Hubon." - the file already had "Boca de Yuman" and "Boca de Hubon" but some versions of the string have the added full stops which prevented them from being translated.
 

Attachments

  • interface_strings.txt
    140.8 KB · Views: 44
Back
Top