Importing into existing project

More
6 years 10 months ago - 6 years 10 months ago #2739 by AlbertNo
I am working I2 into an existing project. I am wondering if there is built-in any sort of automation to establish all the current keys in the first language automatically.

I was using No Localized to find all the scene elements with scripting and then adding an I2 Localization component to them. I try with <none> selected and I end up with a huge number of keys to manually name. If I leave it at default, then they don't show up in Terms. Is there any default way to batch all these?

In other words, a way for me to batch add components with the default English being used for the first language entry as well as the key?
Last edit: 6 years 10 months ago by AlbertNo.

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #2741 by Frank
Hi,
When you add a localize component to a label, I2 Localization tries inferring the term from the label's text, if there is a term using that text, it will automatically select it.

But if there is no term, then, when you open the I2Languages.prefab it will show all those inferred terms as suggestions (they are set as MISSING).
To add them all, you can unselect the "Used" and "Not Used" options from the toolbar, and leave only the "Missing" ones, then, click the "All" button to select them all, and click the button "Add terms"



Then, translate each of them, or go the languages tab, and click "Translate" for each language, so that all new terms get automatically translated using Google Translate.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #2742 by AlbertNo
Ah, I see my problem now! It is not that I wasn't able to add the components that auto-populated. It was that I was unable to to see them in I2Languages. I had a few entries but I noticed a console error of "String too long for TextMeshGenerator. Cutting off characters." Which was reported on line 335 of LocalizationEditor.CalculateTermListMaxWidth()

After I went in and out of a few htings, a larger portion of the key list (or possibly all of it, hard to be sure) has appeared. i.imgur.com/ySb57mB.jpg

Do you have any more information about this error or how I might avoid it?

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #2744 by Frank
Hi,
If one of your keys is too long, that error could happen.
To prevent this, I added some code to clamp the maximum length to 100 characters, so that the term's list doesn't get too wide. This clamping doesn't constraint the actual term, just the label that its shown in the inspector.

This fix is in v2.8.2b6.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.293 seconds
Template by JoomlaShine