Welcome, Guest
Username: Password: Remember me

TOPIC: Importing into existing project

Importing into existing project 8 months 2 weeks ago #2739

  • AlbertNo
  • AlbertNo's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
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: 8 months 2 weeks ago by AlbertNo.
The administrator has disabled public write access.

Importing into existing project 8 months 2 weeks ago #2741

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1129
  • Thank you received: 241
  • Karma: 70
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
The administrator has disabled public write access.

Importing into existing project 8 months 2 weeks ago #2742

  • AlbertNo
  • AlbertNo's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
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?
The administrator has disabled public write access.

Importing into existing project 8 months 2 weeks ago #2744

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1129
  • Thank you received: 241
  • Karma: 70
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
The administrator has disabled public write access.
Time to create page: 0.746 seconds
Colors