Unable to load font, auto translate issue 2.7.0 f1

More
6 years 8 months ago - 6 years 8 months ago #2383 by Aksel
Hi!

I just updated to the newest version of I2 localize and got some issues.

First of all I have managed somehow to get 5 fonts as terms in the language source. When I click on one it says "Key 'Arial' is not localized or it is in a different language source."

If I try to delete it, it just pops right back up.

But after the update to newest version:

Issue 1:


The above issue seems to come every time some text object is activated. I believe it is specifically coming when I have an object with a localized text inactivated in the beginning, then I turn it on at some point. That's when it throws that warning. I also do not understand how it seems to search for a 'Test" font, maybe I did something a long time ago. Though, It did not come before updating to the newest version.

Everything seems to be working fine though, it just gives that warning. Suggestions?

Issue 2:

Auto translate worked good before, although I got "null reference" error. I was able to fix that simply by clicking the I2Languages prefab in Resources and then try again.

But now when I try to auto translate it translates only the last language. It skips all the other ones in the list. I have 7 or so languages and the last one is translated. If I translate every one manually by clicking the "translate" button it will work. Although I had problems with the translations being saved properly. I would translate 7 text objects, see them be translated. Then I would quit the editor and come back, noticing the last one, the 7th had not been "saved". The translations hadn't been saved.

I had this issue with some text objects, but eventually when I translated them they would stick.

The auto-translate seems to work by only translating one language at a time, and seems slower to update than before.

Any idea what is going on with my set up?
Last edit: 6 years 8 months ago by Aksel.

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

More
6 years 8 months ago #2388 by Frank
Hi,

First of all I have managed somehow to get 5 fonts as terms in the language source. When I click on one it says "Key 'Arial' is not localized or it is in a different language source."


Are those terms showing in a different color? Or displaying the Missing tag (you can double check this by clicking the missing button?
If so, it will indicate that some of your Localize components have a secondary term set to that, but no term is actually created. The plugin detects that the secondary term could be localized (e.g. the text is using the Arial Font) and so its suggesting you to add this term to localize that font to several languages. Feel free to ignore those missing terms (unselect the Missing from the terms list and you wont see them again).

Issue1: Unable to load UnityEngine.Font 'test'


My guess is that you added the Test font to some of your localize components. That font wasn't in a Resources folder, so the plugin added a reference to the font in either the "References" section of the Localize components or in the "Assets" section of your I2Languages.prefab.
If at some point that Test font was deleted (if you did a project cleanup), it could be happening that Some terms are still trying to get the Test font, but the plugin can't find it anymore.
Could that be the case?
You can check the "References" and "Assets" sections of the Localize components and I2Languages.prefab and verify that there are no empty/deleted elements on those lists.
Then, check that no font term has "Test" as its font. (tip, an easy way to find this is to export to csv or spreadsheet and then do a text search)

Auto translate worked good before, although I got "null reference" error


Hmm, I don't have any report of null references when auto-translating. If you get that error again, could you please click it in the console and send me text showing where in the code it happened? You could also double click it and then let me know where in the code it was pointing to!

But now when I try to auto translate it translates only the last language


This could be related to that null reference you got.
One thing to test, is that I2L will only translate languages that are empty and NOT disabled. If the translation has at least an space, it wont translate it. The same if the language is disabled in the Languages tab.
Also, there is a tab for "Touch" and "Normal" for each term. Can you check if you are in the correct tab for your platform: e.g. "Touch" for IOS and Android, "Normal" for PC, WebGL, etc

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.

More
6 years 8 months ago - 6 years 8 months ago #2389 by Aksel
Hey, Frank. Appreciate the help!

Regarding issue 1, I found the cause:

Every time I add a localize component there is automatically added a term to the "secondary" section. That term is called the font name.
I had for one of these font name terms a translation that was simply "Test". So the font name was not "Test", it was the translation itself.

Although, for that particular font term. I had added it to the source, probably trying to fix something earlier. So I had just written in "Test" in there.

I was able to fix this issue by going through every scene, tapping on the gray box next to the missing term, e.g 'Arial'. It would then select all
components with that term reference. I then had to go to the "secondary", where the term was, and switch it to <none>. This would switch it for
all selected objects.

Now every time I add a new text I have to do this manually or the error will appear.

Is there someway to stop it from adding that secondary in automatically. Trying to delete the term from the terms list will not work, it pops in back again. Or how could I make this work better so my work flow isn't a heck of a lot of steps to get a text component localized?

Regarding issue 2:

I still have it. There aren't any spaces put in or anything. I simply make a text object and write something, add localize to it and then click translate all. Only the last language, which happens to be Chinese simplified, gets translated. Others in the middle it just skips.

More about the behavior:

If I click to translate Italian for example, it can take a little time. Sometimes it won't really appear. But when I click translate on the next language the previous immediately appears. It's like the translation is just capable of doing 1 task at a time. If I click too fast on the second language, the previous will remain untranslated. Like it skipped it, just like with the "translate all" button, which only translates the last one.

I managed to get this error, although I'm not sure it is related. It started popping up when I was adding the localize component to text objects:
Last edit: 6 years 8 months ago by Aksel.

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

More
6 years 8 months ago #2394 by Frank
Hi,

Is there someway to stop it from adding that secondary in automatically. Trying to delete the term from the terms list will not work, it pops in back again. Or how could I make this work better so my work flow isn't a heck of a lot of steps to get a text component localized?


If I understood correctly, what is happening is not that the secondary terms are been added.
What happens, is that when a Localize component doesn't have a primary or seconday term, it tries inferring the term from the context (e.g. label name for primary term and font name for secondary term).
If there is a term with that name in the LanguageSource, then it uses that. Otherwise, it shows them in the LanguageSource as "MISSING", so that you can easily see what terms you should add in order to localize your game. Those "missing" terms, are not added to the source, they are just suggestions.

You can select them all and click "Add Terms to Source", and then click "Translate all" to fill out the values.

But if you don't want to localize the fonts, then, you could just unselect the "Missing" filter from the top of the list, and that will hide all the suggestions.

Regarding issue 2


Hmm, I haven't been able to reproduce this. I'm now refactoring a few things around this code and will see if in the testing I get that issue. If so, I will send you a fix asap.

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.

More
6 years 8 months ago - 6 years 8 months ago #2398 by Aksel

Frank wrote: Hi,

Is there someway to stop it from adding that secondary in automatically. Trying to delete the term from the terms list will not work, it pops in back again. Or how could I make this work better so my work flow isn't a heck of a lot of steps to get a text component localized?


If I understood correctly, what is happening is not that the secondary terms are been added.
What happens, is that when a Localize component doesn't have a primary or seconday term, it tries inferring the term from the context (e.g. label name for primary term and font name for secondary term).
If there is a term with that name in the LanguageSource, then it uses that. Otherwise, it shows them in the LanguageSource as "MISSING", so that you can easily see what terms you should add in order to localize your game. Those "missing" terms, are not added to the source, they are just suggestions.

You can select them all and click "Add Terms to Source", and then click "Translate all" to fill out the values.

But if you don't want to localize the fonts, then, you could just unselect the "Missing" filter from the top of the list, and that will hide all the suggestions.

Regarding issue 2


Hmm, I haven't been able to reproduce this. I'm now refactoring a few things around this code and will see if in the testing I get that issue. If so, I will send you a fix asap.


Well yes you are correct about there not being a term. My workflow is this:
  1. Add a localize component to an object having a text component
  2. The localize component immediately shows main to have nothing and puts the font name term as suggestion in the "secondary"
  3. I then go ahead and create a new term for the main, or choose an existing one.
  4. I then go to secondary and set the term as none.

The problem is that if I don't do the last step that suggestion will remain in the secondary, and it will start giving me the error I explained in open post. I don't really feel like going to the language source to make those missing font name terms to some random stuff is a good way to go?

The process of having to remove that secondary is something I don't like, as I will probably forget at some point. Even though that warning will probably not break the game.

You stated about unselecting the "missing" tab. Will that prevent the warning message from showing up?

Let me know if the behavior I have in the listed steps is not something that should be happening. And I will test it again just to make sure. What I mean specifically is the warning error coming if the secondary is not set to none explicitly.
Last edit: 6 years 8 months ago by Aksel.

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

Time to create page: 0.145 seconds
Template by JoomlaShine