Language Pack no longer working


Recommended Posts

Hi all,

 

I uploaded the Italian Language Pack for Invisible, Inc. months ago.

This morning I started working on it again to update it with the new stuff that came in with the Fresh Code Update. 

I generated a new .po file and moved all my original translations to it, then proceeded to translate the new text strings. Then I updated my entry in the steam workshop.

 

But everytime now I load the game with the language pack activated, i just can't play it. Entire menus are missing. It is impossible to select missions in the world map because they just don't appear. Even the agents bios and item descriptions are all missing. 

 

Is there some specific procedure I have to follow in order to do this right?

Link to comment
Share on other sites

  • Developer

Hey Peats, looking at your current build on Steam, things seem to work ok I think, other than being effected by a format change we had to some of the strings.  

Where there are variables in the strings, it was changed for %d and %s to {#}, where # is a number associated with variable. That was done so that languages with different word order can arrange the location of the variables. 
 

Is the current version on Steam your newest attempt?

Link to comment
Share on other sites

Hey Peats, looking at your current build on Steam, things seem to work ok I think, other than being effected by a format change we had to some of the strings.  

Where there are variables in the strings, it was changed for %d and %s to {#}, where # is a number associated with variable. That was done so that languages with different word order can arrange the location of the variables. 

 

Is the current version on Steam your newest attempt?

 

Hi Jason, thank you for your reply.

 

The current version on Steam is the one that was avaiable before the Fresh Code update.

I have attempted to translate the new strings yesterday, but couldn't figure out some. For example, if I translate the string that shows the days/hours time in the save slots, when I enter the game I am unable to start a new game. It simply shows the existing save slots, but doesn't allow for new ones.

Another string (not sure which one) made it impossible to start a mission from the global map: you select a target, then instead of giving you the options "Confirm infiltration, more info, cancel", it says "Confirm" on all 3 options, and clicking on any option has no effect.

I can take some screenshots and post them here briefly, if that helps.

Link to comment
Share on other sites

First screenshot, this is what happens to the save slots when I translate the "{1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS}" string. In this case, i merely copied and pasted the original string, but the menu still broke. 
I guess it's because of the day|days variables? I don't recall seeing these before the Fresh Code update.

I don't know which string causes the problems in the 2nd and 3rd screenshots, unfortunately.
 

post-690159-0-23927600-1439019891_thumb.

post-690159-0-13580100-1439020417_thumb.

post-690159-0-49219900-1439020420_thumb.

Link to comment
Share on other sites

Hi all!

 

As the responsible for the Portuguese pack, I must say I'm having the same issues, and it seems to be tied to the new way variables are being used.

 

For the save slots one, the string is wrongly formatted. The string STRINGS.UI.SAVESLOTS.DAYS_SPENT appears as such in English:

{1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS}

The correct should be:

{1} {1:DAY|DAYS} / {2} {2:HOUR|HOURS}

But, while the devs don't fix this, anyone translating should try:

{1} {1:DAY|DAYS} / {3} {3:HOUR|HOURS}

 

As for the agent select screen, I have yet to find where the problem is. Using the old translation pack everything works fine. Using the updated one, it doesn't work.

Link to comment
Share on other sites

Hi all!

 

As the responsible for the Portuguese pack, I must say I'm having the same issues, and it seems to be tied to the new way variables are being used.

 

For the save slots one, the string is wrongly formatted. The string STRINGS.UI.SAVESLOTS.DAYS_SPENT appears as such in English:

{1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS}

The correct should be:

{1} {1:DAY|DAYS} / {2} {2:HOUR|HOURS}

But, while the devs don't fix this, anyone translating should try:

{1} {1:DAY|DAYS} / {3} {3:HOUR|HOURS}

 

As for the agent select screen, I have yet to find where the problem is. Using the old translation pack everything works fine. Using the updated one, it doesn't work.

Thanks for that! I just tried your solution and it works, so that's one less problem to worry about :)

 

Link to comment
Share on other sites

Just found out which string breaks the mission select screen:

 

{1}: {2} {2:HOUR|HOURS}

 

I changed it a bit, mine now looks like this

 

{1}: {2} ORE               ** (ORE = HOURS) **

 

It works. I took out the hour/hours variable, because as far as i know it's not ever possible to choose a target for infiltration that is only 1 hour away from your position, so you always travel for hourS.

Link to comment
Share on other sites

Now that the problems highlighted in my screenshots seem to be solved, the main issue that I would like to address are the missing item descriptions. 

 

Here's an example, I move the cursor on Internationale's Neural Disrupter and the game does not tell me its KO damage or how many turns it requires to recharge. This applies to all "KO damage" and "Reload" descriptions.

 

Can anyone help with this? 

post-690159-0-95196400-1439116254_thumb.

Link to comment
Share on other sites

Solved my problem, everything is fine now and I'll update my language pack in a couple of hours, as soon as I've finished translating and testing the remaining strings.

 

Could you tell how you made it work? Still broken here on the agent selection screen.

Link to comment
Share on other sites

Could you tell how you made it work? Still broken here on the agent selection screen.

 

I don't really know which string(s) caused that to happen. I simply started over in translating the new strings because there were too many errors.

Then I figured the one that broke the mission selection screen because I first translated only the text that seemed related to that screen, then tested the game and understood which string was causing the problem.

But the agency creation screen has just not broken again.

Anyway I avoided translating the new text format that appears in many strings 

es.:  

{1} (1:turn|turns)

making it something like this 

 

{1turn(s)

The german translator has done the same with such strings, and he says his translation is now working too.

Link to comment
Share on other sites

  • Developer

Hey guys, the intent of this formatting {1:day|days} is this:

 

The number indicates the variable being tested. The variable should be a number or integer. If that number is 1 it uses the first string displayed, if it is not 1 it uses the next string.

 

var {1} = 4

 

{1}{1:day|days}   =  4 days  

 

var {1} = 1

{1}{1:day|days} = 1 day

 

 

In our code  {1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS} is written that way becase {1} and {3} are strings, not numbers. If the number was less than 10 it has a 0 put in front of it. like "04". {2} and {4} are the actual numbers.   So an example would be:

 

var{1} = "03"

var{2} = 3

var{3} = "01"

var{4} = 1

{1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS}  =  "03 DAYS / 01 HOUR"

 

Link to comment
Share on other sites

Hey guys, the intent of this formatting {1:day|days} is this:

 

The number indicates the variable being tested. The variable should be a number or integer. If that number is 1 it uses the first string displayed, if it is not 1 it uses the next string.

 

var {1} = 4

 

{1}{1:day|days}   =  4 days  

 

var {1} = 1

{1}{1:day|days} = 1 day

 

 

In our code  {1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS} is written that way becase {1} and {3} are strings, not numbers. If the number was less than 10 it has a 0 put in front of it. like "04". {2} and {4} are the actual numbers.   So an example would be:

 

var{1} = "03"

var{2} = 3

var{3} = "01"

var{4} = 1

{1} {2:DAY|DAYS} / {3} {4:HOUR|HOURS}  =  "03 DAYS / 01 HOUR"

 

Thanks for the answer, Jason! Although I understand the explanation, using the default format wasn't working in-game (it would completely break the interface, as showed by Peats), but changing as I did helped. Also, for some reason, the game was not able to parse these variables ('{1:turn|turns}', for example) correctly, so I had to remove them from the localization file for it to work.

 

Another issue is that, for some reason, most of the in-game text is not showing up localized, at least not since the newest update.

 

http://images.akamai.steamusercontent.com/ugc/1471902277027441915/45E93CAF4E8918BB0D18D76418EBCD93609CB621/

I've already updated the latest file, but I can't say why this is happening. Here is a link to my localization files, if you think you could find the issue there: https://www.dropbox.com/sh/a2vfnql86lj0vrk/AAC8LckHMvByrb4RwVnsdRfya?dl=0

Link to comment
Share on other sites

  • Developer

As you've found, there is an error in how some plurals are handled from the po files.  We will fix it in our code for the future, but that won't help you guys till the next update. 

Good news is there is a way you can fix it in the po file yourselves.
 
There is code to handle plurals. It always needs to return a number for it to work with our code. 
 
This line in the po file is returning a boolean instead 
 
        "Plural-Forms: nplurals=2; plural=(n != 1);\n"

Specifically this statement: 
 
        plural=(n != 1)
So, you can change it to something like this to convert it into a number:  
 
       plural=((n != 1)? 1 : 2) 

       plural=((n != 1)? 1 : 0) 

This would be the complete new line:

        "Plural-Forms: nplurals=2; plural=((n != 1)? 1 : 2);\n"

        "Plural-Forms: nplurals=2; plural=((n != 1)? 1 : 0);\n"

 

 

EDITED: for typo crossed with 1 point indexing brain fart.

Link to comment
Share on other sites

PauloBelato, after making that change, let me know if you are still having trouble with your localization.

Hi Jason, sorry for the delay. The aforementioned equation is not accepted by the editor; during saving it produces the following error: 'nplurals = 2 but plural expressions can produce values as large as 2'. I guess I'll just wait for the client fix. The biggest problem I have right now is the fact that, for some reason, half of the strings aren't being translated, and I have yet to find a pattern or reason for such.

Link to comment
Share on other sites

  • Developer

*facepalm* You are correct.. there was a mistake in that code I put up.  The 2 should be a 0. 

 

        "Plural-Forms: nplurals=2; plural=((n != 1)? 1 : 2);\n"

        "Plural-Forms: nplurals=2; plural=((n != 1)? 1 : 0);\n"

 

There were more agent banter lines added in the last update, so maybe you are seeing the new lines?

Link to comment
Share on other sites

Hello Jason,

Yes, the new banter lines are visible, but unfortunately there seems to be a new problem since that last update. Many ingame lines now appear in english even with the italian language pack activated (dialogues, agents descriptions, controls menu, etc) and apparently the french translation is having the same problem, I don't know about the others...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.