1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Spanish translation

Discussion in 'Build 15 Brainstorming' started by DiegoEspinoza, Mar 27, 2010.

  1. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    I've found this new string in common.ini

    string = Barkentine,"Barquentine"

    But I can't find any ship called barquentine in the game or any mention to either barkentine or barquentine in ships.init or anywhere else, only in pictures.ini where a comment says that it shares a picture with BarqueHeavy "for now". Is it an unfinished ship not yet added to the game or something?
     
  2. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    I tried to import a barquentine from a different game, specifically the "Gentlemen of Fortune" mod for "City of Abandoned Ships". There's a snag, though. The ship model is messed up so that lighting is wrong. If the port side is facing the sun, it's the starboard side which is brightly lit and the port side which is in darkened shadow. So I took it back out again. I have an idea for a different barquentine, so I've left some of the supporting work in place. There's going to be a barquentine in the game at some point, whether someone fixes the CoAS model or whether I knock up my own based on one of PoTC's barque models with a different sail plan...
     
    Homo eructus likes this.
  3. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    I was updating the PROGRAM files with the changes I made to them for the translation, and an error popped up when trying to start the game to test.
    The line reads
    Code:
        for(int i=0; i<GetAttributesNum(cLoctr); i++)
    I 've done a couple of things in dialog_func.c but I didn't touch that line.

    What have I broken now?
     
  4. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Did you add an 'int i' definition somewhere else?
    Or otherwise perhaps missed a bracket?
     
  5. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    Not that I know of.

    The bracket thing seems more likely. Does it have to be in that same file or could it be in any other? Because I've been through quite a few of them today.
     
  6. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    It could indeed be in another file as well.
     
  7. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    On the bright side, it looks like whatever it was, it was indeed in dialog_func. After reverting the changes the game works again, so I only have to check that file
     
    Pieter Boelen likes this.
  8. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    Still don't know what it was but it's fixed

    Also, the weekday wasn't displaying on the date in Spanish, so I tried removing the XI_ConvertString that I had added in the first place to the weekdays in calendar.c. It fixed it, so I guess there's another function somewhere in the new version that relays those instances to common.ini to be translated and it didn't like the redundance. The months still use the XI_ConvertString though. Odd.
     
    Pieter Boelen likes this.
  9. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    As long as it works, I suppose... o_O
     
  10. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    All things considered, the merging is going more smoothly than I had feared it would, but there's still some issues here and there.

    Remember this switch I made to change the word order for the morale logs in DailyCrewUpdate.c?
    Code:
    if (morale <= 10) KAM_Mutiny(); //MAXIMUS: new "Mutiny"
                    switch (LanguageGetLanguage()) {
                    case "Spanish":
                        if(LogsToggle > LOG_QUIET) Log_SetStringToLog(TranslateString("","The crew now has") + " " + XI_ConvertString("morale") + " " + XI_ConvertString(GetMoraleName(morale)) + " (" + makeint(morale) + ").");
                  
                        break;
                        // default:
            if(LogsToggle > LOG_QUIET) Log_SetStringToLog(TranslateString("","The crew now has") + " " + XI_ConvertString(GetMoraleName(morale)) + " " + XI_ConvertString("morale") + " (" + makeint(morale) + ").");
    At the time it worked, but when I added it to the new file, the game doesn't start and this error happens
    The line mentioned seems to be related to the maximum number of ships allowed in one location. How does that relate to a language switch for the morale logs beats me.
     
    Last edited: Nov 6, 2017
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Is there a } after the section of code you posted?
    It looks like it needs one, but I seem to have missed it.
     
    Homo eructus likes this.
  12. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    Yep, looks like that was the problem. Thanks!
     
    Pieter Boelen likes this.
  13. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    I think I found the answer in Loginterface.c. There's a XI_ConvertString that wasn't there before
    Code:
    sDateTimeDisplay = XI_ConvertString(GetDayName(GetWeekday(iday, imonth, iyear))) + ", " + GetHumanDate(iyear, imonth, iday);
    Mistery solved

    EDIT: wait, maybe it was there in the first place, only I removed it to add it to each day in the calendar.c file instead for some reason. Mistery sort of solved anyway.
     
    Last edited: Nov 7, 2017
    Pieter Boelen likes this.
  14. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    Ok, I remember why I did it. The weekdays in the shiplog entries weren't translated. That's why I cut the translation string from the DateTimeDisplay and added it directly to each day in calendar.c. I think that's easier than adding the string to every entry that makes use of the weekdays, so I'll do that again.

    Mistery definitely solved then.
     
  15. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Brilliant! I approve of a "one size fits all" solution. :onya
     
  16. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    More fun with switches

    I added this one to change the order of words when the ransack screen displays an enemy as "Dead captain". I used the same structure as for the morale logs, and I remember it took some fiddling wirh but in the end it worked. Copying it now to the new version, the order still remains the same as in English
    Code:
                case "corpse":
                                    switch (LanguageGetLanguage()) {
                                    case "Spanish":
                                        curEnemyName = XI_ConvertString("s"+"captain") + " " + XI_ConvertString("Dead");
                                      
                                        break;
                                        // default:
                        curEnemyName = XI_ConvertString("Dead") + " " + XI_ConvertString("s"+"captain");
                            }
    This one has the } at the end and everything. So what would you say is wrong now?
     
    Last edited: Nov 7, 2017
    DeathDaisy likes this.
  17. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    A switch inside another switch, right?
    The indentation looks a bit confusing, but that has no impact.
    Other it seems OK at first glance.
     
  18. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    Yeah, I realized I was looking at the main ramsack interface in the game and that file is for the cannon transfer interface. It does work, I just was looking at the wrong place:oops:
     
    Last edited: Nov 8, 2017
    DeathDaisy and Pieter Boelen like this.
  19. Homo eructus

    Homo eructus Freebooter Storm Modder

    Joined:
    Sep 4, 2014
    Messages:
    343
    Gender:
    Male
    How do I make so the corresponding good you need for the fetch quests is translated in the quest book?
    I've been able to translate de type of each character (blacksmith, tailor...) with a regular XI_ConvertString but I don't know what to do for the goods
    Code:
    //Questbook
                Preprocessor_AddQuestData("town",ctown.name);
                Preprocessor_AddQuestData("type",XI_ConvertString("blacksmith"));
                Preprocessor_AddQuestData("amount",sti(NPChar.fetch_quest.amount));
                Preprocessor_AddQuestData("good",Goods[sti(NPChar.fetch_quest.good)].name);
                Preprocessor_AddQuestData("money",sti(NPChar.fetch_quest.money));
                Preprocessor_AddQuestData("date",NPChar.fetch_quest.expire);
    When I've done this, I'll be almost ready to upload all the files that I've modified to add translation strings and provide a hopefully finished multilanguage framwork for the whole mod. The translated files themselves will take "a bit" longer.
     
    Last edited: Nov 9, 2017
  20. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    Names of goods can presumably also be handled by "XI_ConvertString". For example, in "PROGRAM\INTERFACE\store.c", function RefreshAllStrings():
    Code:
    GameInterface.strings.GoodsName = XI_ConvertString(Goods[GetGoodsIndexForI(nCurScrollNum)].Name);
    Goods names are certainly in "common.ini".
     

Share This Page