Bug: Labels translated in Editor invalidates term
- ModernAlchemist
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
8 years 10 months ago - 8 years 10 months ago #1257
by ModernAlchemist
Bug: Labels translated in Editor invalidates term was created by ModernAlchemist
Everytime I deactivate and reactivate a game object in the Editor(!) my text labels get translated which in turn invalidate the Localize.Term key because I2L tries to find a key which is actually translated text. This is very annoying because it destroys all translations as you redesign your scene a bit. We already wrote a editor script which fixes this bug in the opposite direction by finding translated texts and write the keys back to the labels.
I2L 2.6.4 b2, Unity 5.3.2
I2L 2.6.4 b2, Unity 5.3.2
Last edit: 8 years 10 months ago by ModernAlchemist.
Please Log in or Create an account to join the conversation.
8 years 10 months ago #1263
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Bug: Labels translated in Editor invalidates term
Hi,
I have been trying to reproduce that issue but haven't been able to. Can you please list me the steps you do to reproduce this problem?
This is what I tried:
1- Opened the example scene "UnityStandard Localization"
2- Enabled and disabled several times the textMesh (but that didn't affect the translations)
3- Changed the main term to <none> so that the Localize component started inferring the term from the label's text.
4- Again, enabled and disabled several times the textMesh
Am I missing any step?
Thanks,
Frank
I have been trying to reproduce that issue but haven't been able to. Can you please list me the steps you do to reproduce this problem?
This is what I tried:
1- Opened the example scene "UnityStandard Localization"
2- Enabled and disabled several times the textMesh (but that didn't affect the translations)
3- Changed the main term to <none> so that the Localize component started inferring the term from the label's text.
4- Again, enabled and disabled several times the textMesh
Am I missing any step?
Thanks,
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.
- ModernAlchemist
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
8 years 10 months ago - 8 years 10 months ago #1268
by ModernAlchemist
Replied by ModernAlchemist on topic Bug: Labels translated in Editor invalidates term
I just tried it on a fresh project and was able to reproduce it.
1. Create a Canvas with an empty GameObject containing a Text as a child
2. Add a Term key to the Text component and add a Localize component
3. Clone the GameObject
Here what you should have:
4. Deactivate and reactivate the Text GameObject
5. Click on the other Text
6. Deactivate and reactivate the Text GameObject
7. Repeat 4-6 until the text is translated. It should occurs after repeating it 2-3 times.
1. Create a Canvas with an empty GameObject containing a Text as a child
2. Add a Term key to the Text component and add a Localize component
3. Clone the GameObject
Here what you should have:
Canvas
GameObject
Text: Text.text="MyTerm" + Localize.term="MyTerm"
GameObject (1)
Text: Text.text="MyTerm" + Localize.term="MyTerm"
4. Deactivate and reactivate the Text GameObject
5. Click on the other Text
6. Deactivate and reactivate the Text GameObject
7. Repeat 4-6 until the text is translated. It should occurs after repeating it 2-3 times.
Last edit: 8 years 10 months ago by ModernAlchemist.
Please Log in or Create an account to join the conversation.
8 years 10 months ago #1270
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Bug: Labels translated in Editor invalidates term
Hi,
Thanks, I was able to reproduce your issue.
The problem was that when a term its not selected from the term popup, and instead its "inferred" from the label's text, then its called an inferred term and if the text changes, the term changes as well.
If you select the term from the popup, then it will be set to a "normal" term and if you clone the object, it will be fine.
Nonetheless, I see that can be a problem on most setups, so I went and changed the logic of inferred term. Now the Localize component, as soon as it founds a term in the source matching that inferred term, then it switches its type to "normal".
Which means, that as soon as you type the text matching a term in the source, it will use that one and stick with that until you select something else from the popup.
version 2.6.4 b4 its now in the beta folder.
Hope that helps,
Frank
Thanks, I was able to reproduce your issue.
The problem was that when a term its not selected from the term popup, and instead its "inferred" from the label's text, then its called an inferred term and if the text changes, the term changes as well.
If you select the term from the popup, then it will be set to a "normal" term and if you clone the object, it will be fine.
Nonetheless, I see that can be a problem on most setups, so I went and changed the logic of inferred term. Now the Localize component, as soon as it founds a term in the source matching that inferred term, then it switches its type to "normal".
Which means, that as soon as you type the text matching a term in the source, it will use that one and stick with that until you select something else from the popup.
version 2.6.4 b4 its now in the beta folder.
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.
- ModernAlchemist
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
8 years 10 months ago - 8 years 10 months ago #1272
by ModernAlchemist
Replied by ModernAlchemist on topic Bug: Labels translated in Editor invalidates term
Great! I forwarded you our I2L purchase receipt. Please grant me access to the beta folder.
Last edit: 8 years 10 months ago by ModernAlchemist.
Please Log in or Create an account to join the conversation.
Time to create page: 0.578 seconds