• 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

Thanks for those, @Homo eructus! :onya

"book_exorcist.txt" is Latin, so does not need to be translated. Are you happy with "piratebook.txt" and "skillbook3.txt" as they are?
 
Yes, those have been left untouched since I translated them back in the day. I double-checked them for errors and found none, so I didn't include them.
 
Here's TEXTS/SPANISH/Storyline/GoldBug

I guess I'll do the Gold Bug dialogs next, now that I'm in the mood for Poe. This storyline is rather tricky to translate, given the linguistic nature of the main plot device.
 

Attachments

  • GoldBug.zip
    33 KB · Views: 85
This storyline is rather tricky to translate, given the linguistic nature of the main plot device.
Yes I see, I tried to use Poe's text as much as possible. Or do you mean the cipher - that has to stay in english I'm afraid.
 
The cipher is taken care of. I just transcribe it in English as it is and then add the translation of the whole message. But some finer points (like the identification of "glass" with "spyglass" which doesn't work in Spanish) will need some extra explanation. I've seen several Spanish versions of Poe's story that deal with these issues in different ways and I'm not sure I'm entirely convinced by all of them. But I have my own ideas about it.
 
The swedish translation I have keeps the cipher in english but translates the whole message too.
 
I've found some quirks with the character_names.

First, the characters named siumply "citizen" still appear in English despite being changed in the file, so I guess there's other instance of "citizen" somewhere that takes precedence and has no translation code.
EDIT: Nevermind about this one, I somehow left "citizen" untrnslated in the MAIN character_names file and that seems to overwrite the ones for the storylines. Fixed on my end. I've translated it for "Residente" instead of "ciudadano" as residente fits both male and female.

Related to that but with a somewhat opposite effect, "street merchant" I translated like this in the character_names file:
Code:
Street{Mercader}
Merchant{callejero}
Switching the order so the adjective is behind as it should commonly be in Spanish

But in common.ini there's this string:
Code:
string = Merchant,"Mercader"
which is mostly for the merchant background profession, but overwrites whatever you put in place of "Merchant" in character_names, resulting in the street merchants being called "Mercader Mercader" in Spanish.

I can't think of a way to fix it that wouldn't involve changes in the base strings proably spanning several files. The easy fix could be to just translate the "Street" in "Street Merchant" as a blank space so they are called simply " Mercader".
 
Last edited:
I've found some quirks with the character_names.

First, the characters named siumply "citizen" still appear in English despite being changed in the file, so I guess there's other instance of "citizen" somewhere that takes precedence and has no translation code.

The function being used is "TranslateString", defined in "PROGRAM\Dialog_func.c". It checks translation files in this order:
  • common.ini
  • characters_names.txt (general version, then storyline-specific version)
  • ItemsDescribe.txt (general version, then storyline-specific version)
  • GoodsDescribe.txt
So, "citizen" is not in "common.ini" but it is in "characters_names.txt", some of which has not yet been translated - including "citizen".

Related to that but with a somewhat opposite effect, "street merchant" I translated like this in the character_names file:
Code:
Street{Mercader}
Merchant{callejero}
Switching the order so the adjective is behind as it should commonly be in Spanish

But in common.ini there's this string:
Code:
string = Merchant,"Mercader"
which is mostly for the merchant background profession, but overwrites whatever you put in place of "Merchant" in character_names, resulting in the street merchants being called "Mercader Mercader" in Spanish.

I can't think of a way to fix it that wouldn't involve changes in the base strings proably spanning several files. The easy fix could be to just translate the "Street" in "Street Merchant" as a blank space so they are called simply " Mercader".
This is to be expected due to the way that "TranslateString" works. "common.ini" is checked first.

All street traders are defined in "PROGRAM\Characters\init\StreetMerchants.c", not in individual island character files. So it would be possible to change all of them to have last name "Merchant1", for example, and then translate that to "callejero". The main snag then is if someone wants to translate "street" for a different purpose and it ends up being translated as "Mercader". The same applies if you translate "street" as " ".

One possibility might be to change the street traders so that, instead of first and last names being defined separately, they have this:
Code:
ch.name = TranslateString("Street","Merchant");
At the end of the definition of "TranslateString" in "PROGRAM\Dialog_func.c" is this:
Code:
    switch(LanguageGetLanguage())
   {
       case "Russian":
           resultString = rStr2 + tmpData + rStr1;
       break;
       case "Polish":
           resultString = rStr2 + tmpData + rStr1;
       break;
       resultString = rStr1 + tmpData + rStr2;//default for English
   }
"TranslateString" takes two strings and if they're both not blank, it translates them both and puts a space between them. This little piece of code swaps them in Russian and Polish. You could add a similar case for Spanish. What I'm not sure is whether "Street Merchant" should be similarly reversed in Russian and Polish. (@Maximus, @konradk - any comments?)

Another solution would be to go through all the traders in "StreetMerchants.c" and give them proper names instead of the generic "Street Merchant". :D You'd then need to put all those names into "characters_names.txt" - both English and Spanish. Some traders already have proper names, including Patric Cardone because he's the main character in a side quest, but also several others who have no special quest purpose.
 
One possibility might be to change the street traders so that, instead of first and last names being defined separately, they have this:
Code:
ch.name = TranslateString("Street","Merchant");
This seems to me the most cost-effective and flexible option, that way it wouldn't intrude in any further uses of Merchant or Street as separate words.

But if I've understood it correctly, shouldn't it be in a single string like this, so the words are not checked separately? (and consequently, "Street Merchant" as a single string in all the character_names files too?)
Code:
ch.name = TranslateString("","Street Merchant");
 
Last edited:
Hmm, I was doing some experiments with htis and it seems to work in freeplay, but it looks like the names of street merchants in Gold Bug and other storylines are defined by the respective quest_reaction.c files, not by the general street_merchants.c file, so it would have to be changed in those too, which is the kind of extensive changes that start to snowball and led me to over-extend myself last time, so I'm wary.
 
But if I've understood it correctly, shouldn't it be in a single string like this, so the words are not checked separately? (and consequently, "Street Merchant" as a single string in all the character_names files too?)
Code:
ch.name = TranslateString("","Street Merchant");
No, "TranslateString" takes two string arguments. That's why "StreetMerchants.c" defines most of their names like this:
Code:
   ch.name = TranslateString("","Street");
   ch.lastname = TranslateString("","Merchant");
If either argument is blank, it simply translates the one which is not blank. If both arguments are not blank, e.g.:
Code:
ch.name = TranslateString("Street","Merchant");
then it translates both parts and puts them together, in reverse order if the chosen language is Russian or Polish.

Having said that, what "TranslateString" does in detail at each stage is this:
Code:
   resultString = SpellString(GetStorylinePath(FindCurrentStoryline()), "characters_names.txt", &str1, &str2, joinString);
   if (resultString != "") return resultString;
   if (rStr1 == "") rStr1 = str1;
   if (rStr2 == "") rStr2 = str2;
"joinString" is set earlier in the function to be both parts joined together, with a space between if neither part is blank. "SpellString" is another function, also defined in "Dialog_func.c", which does the actual translating using the translation file provided - in this example, it's told to use the storyline-specific version of "characters_names.txt". It passes back translated versions of "str1" and "str2", and also tries to translate "joinString". If the translation of "joinString" was successful then "TranslateString" simply returns that.

What this means is that if "StreetMerchants.c" says:
Code:
ch.name = TranslateString("Street","Merchant");
and "characters_names.txt" contains a translation of "Street Merchant", then "TranslateString" should return the translation of the combined string as if it had been a single string originally.

Try it. Edit "StreetMerchants.c" and change "Muelle_Street_merchant_1" to use this:
Code:
   ch.name = TranslateString("Street","Merchant");
   ch.lastname = "";
Then add a line in "characters_names.txt":
Code:
Street Merchant{Mercader callejero}
"Muelle_Street_merchant_1" is the one in the port area of San Juan. Start a FreePlay game as a Spanish character so that you start in San Juan, find the street merchant in the port, and see if his "name" appears correctly.
 
Hmm, I was doing some experiments with htis and it seems to work in freeplay, but it looks like the names of street merchants in Gold Bug and other storylines are defined by the respective quest_reaction.c files, not by the general street_merchants.c file, so it would have to be changed in those too, which is the kind of extensive changes that start to snowball and led me to over-extend myself last time, so I'm wary.
"Gold Bug" is the work of @Jack Rackham, so it would be for him to fix the story's character definition file if we do this. Or I could easily enough fix it if he doesn't mind. They're defined in "PROGRAM\Storyline\GoldBug\Characters\init\TempQuest.c", not in "quests_reaction.c".

Which other storylines have their own street merchants?
 
Try it. Edit "StreetMerchants.c" and change "Muelle_Street_merchant_1" to use this:
Code:
   ch.name = TranslateString("Street","Merchant");
   ch.lastname = "";
Then add a line in "characters_names.txt":
Code:
Street Merchant{Mercader callejero}
"Muelle_Street_merchant_1" is the one in the port area of San Juan. Start a FreePlay game as a Spanish character so that you start in San Juan, find the street merchant in the port, and see if his "name" appears correctly.
It works. Should I do the rest of them and upload the file?

"Gold Bug" is the work of @Jack Rackham, so it would be for him to fix the story's character definition file if we do this. Or I could easily enough fix it if he doesn't mind. They're defined in "PROGRAM\Storyline\GoldBug\Characters\init\TempQuest.c", not in "quests_reaction.c".

Which other storylines have their own street merchants?

Yes, I meant TempQuest.c. Brain fart.

A quick search for "ch.old.name "Street";" shows street merchant characters defined in PROGRAM\Storyline\Bartolomeu\characters\init\Story.c and PROGRAM\Storyline\Assassin\characters\init\Story.c
 
Last edited:
@Bartolomeu o Portugues: have you any objection to me changing the "Street Merchant" character names in Vera Cruz to fit in with this translation?

@Homo eructus: by all means change the street merchants in "StreetMerchants.c" and upload it, along with an updated "characters_names.txt".
 
Here it is.

There are other "names" scattered about that could be potentially troublesome for the same reason (Shipyard Owner, Harbour Master, etc.), but I'd rather deal with them as they come up, if they do. I was supposed to be translating dialogs, damn it!:rofl
 

Attachments

  • characters_names.txt
    22 KB · Views: 96
  • characters_namesGOLDBUG.txt
    2.3 KB · Views: 91
  • StreetMerchants.c
    44.1 KB · Views: 94
Is it normal that the items that don't have a description display this, or should it be completely blank?
Sin título.jpg
 
I just checked and it also happens in the English version. I think I know what the problem is. Those items (I think all of them part of the final treasure of The Gold Bug) are missing the line itmdescr_ in the ItemsDescribe file, they have just the name and nothing else

Code:
itmname_treasure4       {Elephant}

Whereas other items that don't have a description either, do have the line for it, only left blank. Those display properly a blank space

Code:
itmname_Poes_clothes        {Clothes}
itmdescr_Poes_clothes
{
  
}
Sin título.jpg
 
Is it normal that the items that don't have a description display this, or should it be completely blank?
Not normal but intentional as the elephant can't be picked up.

Whereas other items that don't have a description either, do have the line for it, only left blank. Those display properly a blank space
That's by purpose too.
 
Back
Top