• 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 Do you think you could add a preprocessed variant to the string for the priests addressing the player as "my child"? It should have gender variation in Spanish (hijo mío/hija mía) and probably in other langages too. Assuming the "child" string is only used in that istance and not for other more general uses of the word, which could complicate things.

Also, it could be useful to have a general preprocessor for the article so a "the" can become "el/la"according to what is needed. I'm thinking espcially about the Ardent storyline and the string for "son/daughter", which often should be preceded by an article in Spanish (or a pronoun but that woud be invariable in most cases). Back in the day I had a workoraound for it in which the string included the article "son= el hijo", "daughter= la hija" but that would only work for the questbook and not dialogues ("my son/daughter" would turn into "mi el hijo /mi la hija" instead of the correct "mi hijo/mi hija").
 
Priests: here's a new English "common.ini" with new lines for priests:
Code:
; Priests addressing you
string = "my son","my son"
string = "my daughter","my daughter"
string = "my child","my child"
You can add similar lines to the Spanish version. (For some reason, I always thought that "my daughter" sounds a bit wrong in English, so I set priests to say "my child" when addressing a female player character. So you can assume that "my child" is feminine as a priest addressing a male player character will say "my son".)

I'll need to look at Ardent's dialogs to see where "the" needs to be preprocessed, and possibly "my" as well.
 

Attachments

  • common.ini
    75.6 KB · Views: 93
Last edited:
I'll need to look at Ardent's dialogs to see where "the" needs to be preprocessed, and possibly "my" as well.
In Spanish "my" shouldn't be a problem as both genders can be shortened to "mi" when they precede the noun (mío/mía are only used after the noun or as equivalents of "mine"), but other languages could probably use the differentiation for future translation projects (I'm thinking French).

The of course both the article and the possessive have plural forms but those are much less common in the game and probably can be worked around without a special treatment.
 
I've noticed that in the Portuguese ranks the special character in Capitão and similar words is messed up (CapitÝo) even in the first part of the string, the one that is not translated. Example:
Code:
string = BarÝo,"BarÝo"
Should that part be corrected so it dispalys the correct spelling too?It would have to be corrected on the English version too, of course, if so. I'm guessing yes but just in case.

There's also the revised Spanish and Portuguese naval ranks that I researched back in the day to make them more accurate and should probably be updated in the English version aswell.
 
Last edited:
@Grey Roger Do you think you could add a preprocessed variant to the string for the priests addressing the player as "my child"? It should have gender variation in Spanish (hijo mío/hija mía) and probably in other langages too. Assuming the "child" string is only used in that istance and not for other more general uses of the word, which could complicate things.
In Spanish "my" shouldn't be a problem as both genders can be shortened to "mi" when they precede the noun (mío/mía are only used after the noun or as equivalents of "mine"), but other languages could probably use the differentiation for future translation projects (I'm thinking French).
We can worry about other languages if someone starts them. I pity the first person who tries to translate the game into German - it has big tables of pronouns depending on the gender of the person, the grammatical context, and the gender of the possessed object when it's a possessive pronoun!

However, I've already started on priests so I may as well finish. I've done a few, so as an example, here are the code file and updated Spanish text files for Father Bernard. Try putting them into place along with the updated "common.ini", then start a FreePlay game and go to Father Bernard. Then do it again, but this time as a female character.
 

Attachments

  • Father Bernard_dialog.c
    37 KB · Views: 124
  • Father Bernard_dialog.h
    14.8 KB · Views: 126
Yeah, I don't even have an up-to-date version of the mod in my computer at the moment, I was supposed to only be reviewing files but I got tnagled in the nuances of trnaslating again. Woe is me! I'll have to download the latest version.

Other thing I've noticed in common.ini, both the Spanish and English version. From about line 2214 onwards, it seems all the strings have an added space betwen the comma and the quote mark for the translated string, whereas no previous lines feature this space. Does it matter in any way? For comparison with the previous line
Code:
2212 string = Dusk,"Dusk"

2214 string = Min, "Min"
 
It's definitely worth downloading the current version, not least because that way you get the translated files which are already in the game.

Spaces outside the quote marks don't matter. They may make the line a bit easier to read but should have no effect on the game. I usually include them, as you'll find when you look at the pronouns section of the file which I uploaded here. The "his1" and "her1" lines which I added have the space, while the "his" and "hers" lines directly above them do not. If you're correcting text in that file, it's your choice whether or not you add the space.
 
And here are the updated files for Padre Domingues. Testing these is easier than testing Father Bernard's files. If you start a FreePlay game as a Spanish character who does not have a special setup, you begin in San Juan.
 

Attachments

  • padre Domingues_dialog.c
    16.9 KB · Views: 132
  • padre Domingues_dialog.h
    10.6 KB · Views: 119
Father Bernard returns a blank dialog box

This is the error log
Code:
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 31
invalid index -1 [size:1200]
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 31
invalid array index
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 31
Unknown data type
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 33
invalid index -1 [size:1200]
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 33
invalid array index
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 33
function 'GetModelIDFromListNumber' stack error
RUNTIME ERROR - file: interface\kam_selectmodel.c; line: 137
Unknown data type
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid function argument
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid syntax
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid function argument
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid syntax
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid function argument
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid syntax
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid function argument
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
Invalid Expression
COMPILE ERROR - file: dialogs\Father Bernard_dialog.c; line: 45
invalid syntax

Padre Domingues works fine, althoug he says the Spnaish equivalent of the strings for "son/child" rather than the ones for "MY son/MY child" as he does in English.

Oh, I see. I think the priest dialogs don't use the strings "my son/my child" from common.ini. They use "son/child" and then convert them to "my son/my child" through XI_ConvertString, so in the Spanish version they keep using directly the "son/child" strings. I guess?
 
Last edited:
Here's the Spanish common.ini reviewed, and the English common.ini with a few things added like the revised ranks for Spain and Portugal and some fixed Portuguese special characters in those same ranks.

And that's all from me for today. Sleepy-time.
 

Attachments

  • common.ini
    75.6 KB · Views: 107
  • commonSPA.ini
    79.3 KB · Views: 99
If I remember correctly, the Portuguese special characters need to be those peculiar ones in the text file, and are mapped to the correct characters by the game's font textures so that they appear correct on screen.

I've added some new functions to "PROGRAM\Dialog_func.c" and forgot about that when I uploaded "Father Bernard_dialog.c". One of them is "GetMyPronounPossessive". This is to deal with the mess of possessive pronouns. In English", "his" can either be used as in "This ship is his" or in "This is his ship". Worse, "her" can be either objective or possessive, e.g. "This is her ship" or "I'm going to steal that ship from her". "GetMyPronounPossessive" returns either "his1" or "her1" depending on the character's gender. Like the other pronoun functions in "Dialog_func.c", this needs to be passed through "XI_ConvertString", and that's why you might have noticed "his1" and "her1" in "common.ini". Also now in "Dialog_func.c", not related to translation but useful for quest writing, are "storedialog" and "restoredialog", previously in a file specifically for the "Ardent" storyline and now moved to "Dialog_func.c" for more general use.

The problem with priests saying "son" instead of "my son" happened in English when I tested them as well, and I couldn't figure out why. I set up an identical "XI_ConvertString" command in "console.c" to see what 'XI_ConvertString("my son")' produces, and it showed "my son". The only thing I could think of is that for some reason, the preprocessed variable "child" is confusing the game, so I changed it to "addr" and it worked. Some priest dialog files already used "addr", so I changed the rest from "child" to "addr". Others had several more preprocessor commands at specific parts of the dialog, now removed so that only the preprocessor command at the top will take effect in all dialogs with the priests.

Attached is a zip with all the modified priest dialogs, plus the updated "Dialog_func.c", plus the version of Ardent's "SL_utils.c" with the dialog functions removed because they're now in "Dialog_func.c". I'll leave you to fix the Spanish versions of the "dialog.h" files.
 

Attachments

  • priests.zip
    115.5 KB · Views: 114
If I remember correctly, the Portuguese special characters need to be those peculiar ones in the text file, and are mapped to the correct characters by the game's font textures so that they appear correct on screen.
Oh, you're completely right. My bad. I though it was the same case as the Spanish accents and special characters breaking when the file codification was changed.

Here they are fixed, hopefully I didn't miss any instance.
 

Attachments

  • common.ini
    75.6 KB · Views: 106
  • commonSPA.ini
    79.3 KB · Views: 98
I think yesterday I could change language on the fly even in the middle of a game, just press F1>options>Interface, etc. But now, with the new priests files, the game crashes when I try to siwtch language mid-game. It works if I change it from the start menu before loading a game, but not with a game going. There's no error log, just this system.log
Code:
Scanning modules\
Loading modules...
Loaded 0
Reset...
Initializing CORE...
Creating atoms space: 128
 done
initializing complete
Initializing DirectX 8
Techniques: 9 shaders compiled.
Techniques: 180 techniques compiled.
Techniques: compiled by 51801654 ticks.
BeginScene
The method call is invalid For example, a method's parameter may have an invalid value
BeginScene
The method call is invalid For example, a method's parameter may have an invalid value
The first time I tried, the log said that the ini files were of different sizes, but I fixed the extra line in one of them and it still crashes, with no mention of the ini file in the log this time, so that wasn't the only problem.

In addition, using #saddr# in the Spanish dialog.h files doesn't work , it doesn't display any words (I only tried with Padre Domingues though).

If it's going to be such a headache, it's alright if the priests say "hijo/hija" instead of "hijo mío/hija mía", it works either way.
 
Last edited:
And here are (again) the two common.ini, this time I think they're really fixed and the same numer of lines.
 

Attachments

  • common eng-spa.zip
    43.7 KB · Views: 134
I think yesterday I could change language on the fly even in the middle of a game, just press F1>options>Interface, etc. But now, with the new priests files, the game crashes when I try to siwtch language mid-game. It works if I change it from the start menu before loading a game, but not with a game going.
I'm not sure that switching language mid-game was ever reliable - perhaps you were lucky earlier. The line "The method call is invalid For example, a method's parameter may have an invalid value" in "system.log" appears routinely even when I'm not doing things to languages and does not crash the game.

The first time I tried, the log said that the ini files were of different sizes, but I fixed the extra line in one of them and it still crashes, with no mention of the ini file in the log this time, so that wasn't the only problem.
That shouldn't crash the game either. The Russian translation is a lot less complete than the Spanish, "system.log" complains about different size files there, and it still works - as far as the translation has been done, that is.
In addition, using #saddr# in the Spanish dialog.h files doesn't work , it doesn't display any words (I only tried with Padre Domingues though).
Can you upload your version of "Padre Domingues_dialog.h"? And any other priest "dialog.h" files you've completed. I'll have a look over the weekend and see if I can figure out what is wrong.
 
I'm not sure that switching language mid-game was ever reliable - perhaps you were lucky earlier. The line "The method call is invalid For example, a method's parameter may have an invalid value" in "system.log" appears routinely even when I'm not doing things to languages and does not crash the game.
Yes, I remember that being always a problem, that's why it was so weird to be able to change on the fly yesterday. Oh well, it was beautiful while it lasted.

Can you upload your version of "Padre Domingues_dialog.h"? And any other priest "dialog.h" files you've completed. I'll have a look over the weekend and see if I can figure out what is wrong.
I haven't completed any priest files. I only changed the first couple of #schild# for #saddr# for testing purposes. Otherwise the files are the same that are already translated in the current build.
 
I think I've got it working, including for Padre Domingues:
padre_domingues1.jpg

The attached includes all priest dialog files, plus updated versions of "common.ini", in both English and Spanish. Like you, I haven't done any translating, just changed "#schild#" to "#saddr#" and removed "mi" from the "dialog.h" files so that "mi #schild#" becomes "#saddr". (The "mi" is no longer needed as the preprocessed "addr" is translated in "common.ini" to "hijo mío" or "hija mía" as appropriate.)
 

Attachments

  • priests.zip
    142 KB · Views: 131
Back
Top