I2 Localization Support - DS To I2 doesn't work in any direction

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MateuszWoodland
Posts: 4
Joined: Fri Jun 23, 2023 2:31 pm

I2 Localization Support - DS To I2 doesn't work in any direction

Post by MateuszWoodland »

Hi,
so, first of all, documentation regarding I2 Localization Support is very humble and also very out of date. Fields that are available in DS To I2 tool are not 1:1 with the screenshots present in the documentation. There is also no example in documentation. Considering all that I am not sure, if I've setup everything correctly, because when I convert DS To I2 or I2 to DS, no localization is applied, only first language works (kinda), others are not applied anywhere.

Here is my setup in the dialogue database:
Screenshot 2023-06-23 211043.png
Screenshot 2023-06-23 211043.png (40.69 KiB) Viewed 10803 times
And here is my setup in DS To I2 (I've checked "Dialogue Text" in "DialogueEntries" and "Translations To I2"):
Screenshot 2023-06-23 205612.png
Screenshot 2023-06-23 205612.png (74.01 KiB) Viewed 10803 times
After all that I click "To I2" button and this is what I see in a LanguageSource of I2:
Screenshot 2023-06-23 205903.png
Screenshot 2023-06-23 205903.png (47.43 KiB) Viewed 10803 times
There is only the first language, the second language does not convert from DS to I2. When I fill this second language with a translation and then click `From I2" button, this second language does not convert from I2 to DS (changes in the first language also do not convert from I2 to DS, if I do some in I2).

There are no errors or warnings while converting with DS To I2 tool, I have the newest versions of Dialogue System, I2 Localization and DS To I2. So, is my setup incorrect or is it some kind of bug with DS To I2 tool?

Thank you for any help :)
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by Tony Li »

Hi,

The steps in the i2 Localization integration instructions are current, with one note that I just added: If the current open scene has a LanguageSource component, the DS To I2 window will use this LanguageSource instead of an I2 asset. Your translations may be going to the LanguageSource instead of the I2 asset. I also just added a more verbose screenshot in place of the trimmed-down screenshot.
MateuszWoodland
Posts: 4
Joined: Fri Jun 23, 2023 2:31 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by MateuszWoodland »

Thanks for the answer and for updating the documentation!

Eventually I've managed to resolve my problem, but it wasn't due to your tips. I've tried to use DS To I2 with only empty scene opened and it was working without any difference. Then I've copied the whole setup from updated screenshots in the documentation - still nothing. At some point I've discovered that when I do "To I2", the console is empty, but when I do "From I2" I get warnings like this, although I had those terms in my Test LanguageSource to which and from I was converting:
Screenshot 2023-06-26 143925.png
Screenshot 2023-06-26 143925.png (137.73 KiB) Viewed 10782 times
But, there was no such terms in my default LanguageSource, which is sitting in Resources folder. Throughout that entire time, I had "Specify I2 Asset" enabled during the conversion process. And the conversion was occurring to my specified I2 asset (but without the translations). However, when converting from I2, it was converting by using my default asset rather than the one specified! I was doing some tests with that "Specify I2 Asset" option before and I saw that it is working very strangely, sometimes it was looking like it doesn't matter if I check this option or not. But now I thought about the last test - before unticking "Specify I2 Asset", I've removed the asset from the field, so it was set to none (null). After removing my test asset from the field and unticking "Specify" I clicked "To I2" and... it started to work correctly with my main/default I2 LanguageSource asset in Resources!

So you have very nasty and confusing bugs related to "Specify I2 Asset". First, when this option is selected, "Translations to I2" doesn't work on "To I2", only main field is converted, without the translations. Second, when "Specify" is selected, then "From I2" is done from a default asset, not from a specified one. Third, when you tick "Specify", fill the field with an asset specified, then untick the "Specify I2 Asset" and then click "To I2", a conversion happens not to a default asset, but to specified one (to revert to default, the field with specified asset needs to be emptied too)! Fourth, "Inspect I2" always inspects a defualt asset, it doesn't matter if "Specify I2 Asset" is ticked or not.

Probably I am not the first person confused by this (problem with confusion and general UX of your plugin is another separate topic), so I think you should fix this. FYI, I am using Unity 2022.2.18f1 editor version.

Thanks for your time
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by Tony Li »

Thank you for the valuable feedback. I'll try to incorporate and clarify all of this in the 2.2.38.2 update.

Edit: Thanks again. The documentation, output to the Console, and the way it works with other LanguageSourceAssets have all been improved in the upcoming integration.
MateuszWoodland
Posts: 4
Joined: Fri Jun 23, 2023 2:31 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by MateuszWoodland »

Thanks!
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by Tony Li »

BTW, I updated the package on the Dialogue System Extras page if you'd like to try it before 2.2.38.2 comes out.
MateuszWoodland
Posts: 4
Joined: Fri Jun 23, 2023 2:31 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by MateuszWoodland »

Hi,
after some other priorities, I now have time to come back to the topic of a dialogues localization. I have updated Dialogue System package to the newest version (2.2.41.1), but not a single bug have been fixed which I have specified in a very detailed manner in my previous post.

It works alright with a default I2 asset, but when I check "Specify I2 asset" option, then everything breaks and all four bugs which I described earlier happen.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by Tony Li »

Hi,

Please watch this video:



Can you tell me what I'm doing differently from what you are doing?

When the video starts, it shows that "Specify I2 Asset" is set to I2LanguagesTest, and this i2 asset uses the languages English and Polish. (To keep i2 consistent, your main I2Languages asset should also have the same language list.) The other settings are all the same are your screenshot except I set Verbose to Detailed so you can see the names of the terms it will add.

At 00:05, I click the "To I2" button, and you can see that it creates the terms in I2LanguagesTest.

At 00:14, I have entered a translation for one of the dialogue entries. Then I click "From I2".

At 00:27, I inspect that dialogue entry and confirm that the translation is in the database.
mXispitlk
Posts: 2
Joined: Mon Dec 18, 2023 7:46 am

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by mXispitlk »

Hi Tony,

Could you pls tell me how it works with l2 localization? If you put the keys as is on the video .. when I change language in l2 it gonna also change in the Dialogue system automatically?

Thank you for you answer
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: I2 Localization Support - DS To I2 doesn't work in any direction

Post by Tony Li »

Hi,

The documentation is here: i2 Localization Support

The video above briefly shows the steps. You don't have to assign the i2 asset to the DS To i2 window. By default, it will use your default I2Languages asset. The steps are:

1. Assign your dialogue database.

2. Select the fields you want to localize. Often it's just Dialogue Entries > Dialogue Text, but you can also selector Actors > Display Name, Quests > Display Name, etc.

3. Click "To I2" to create corresponding terms in i2.

4. Translate your content in i2.

5. Click "From I2" to retrieve the translations and put them into the dialogue database.
Post Reply