Bugs in script localization generation
- joe_brainplus
- Topic Author
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
4 years 3 months ago #4152
by joe_brainplus
Bugs in script localization generation was created by joe_brainplus
(I'm not sure where is best for this - let me know if I need to get it to the devs through another channel)
Some bugs we've noticed working with I2:
Version Info (applicatble to all):
Version: lastest via Asset Store (sorry, I'm not by a dev machine to double-check the number). This happened in earlier versions of I2 Localization.
Unity version: 2019.4.8f1. This also happened with earlier versions of Unity. (at least 2018.x, to my knowledge)
1) Max length for generated term IDs is not saved (Script localisation)
Expected result:
Changing the value for max Term ID length persists in the Editor window. Further, term IDs, when generated, have a max length matching the one assigned in the editor.
Actual result:
The value is changed back to default after editing, therefore term IDs are generated with the default max length.
Reproduction:
Use the editor window to set maximum term IDs for generated script localization.
Proposed fix:
in I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_Script.cs, near line 36: ChangingtoCorrectly stores the setting, and ensures that it is used.
2) Terms with the same name as their parent cause compiler errors:
Expected result:
Any valid key value for I2 can be compiled into script localization. Keys that share a name with their category can also be compiled into script localization.
Actual result:
Any key that shares a name with its category (valid for I2, at least I2 works and does not complain), when using Script localization, will result in I2 generating a class with a member of the same name, which is illegal in C# and produces a compiler error.
Reproduction:
Add a key to a category with a matching name. Try to generate Script localization.
Proposed fix:
Change the generator to account for when a key will produce this problem, and add a prefix.
(Sorry for all the newlines. The spam filter has a thing against paragraphs.)
Some bugs we've noticed working with I2:
Version Info (applicatble to all):
Warning: Spoiler!
[ Click to expand ]
[ Click to hide ]
Version: lastest via Asset Store (sorry, I'm not by a dev machine to double-check the number). This happened in earlier versions of I2 Localization.
Unity version: 2019.4.8f1. This also happened with earlier versions of Unity. (at least 2018.x, to my knowledge)
1) Max length for generated term IDs is not saved (Script localisation)
Warning: Spoiler!
[ Click to expand ]
[ Click to hide ]
Expected result:
Changing the value for max Term ID length persists in the Editor window. Further, term IDs, when generated, have a max length matching the one assigned in the editor.
Actual result:
The value is changed back to default after editing, therefore term IDs are generated with the default max length.
Reproduction:
Use the editor window to set maximum term IDs for generated script localization.
Proposed fix:
in I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_Script.cs, near line 36: Changing
EditorGUILayout.IntField("Max Length of the Generated Term IDs:", Script_Tool_MaxVariableLength);
Script_Tool_MaxVariableLength = EditorGUILayout.IntField("Max Length of the Generated Term IDs:", Script_Tool_MaxVariableLength);
2) Terms with the same name as their parent cause compiler errors:
Warning: Spoiler!
[ Click to expand ]
[ Click to hide ]
Expected result:
Any valid key value for I2 can be compiled into script localization. Keys that share a name with their category can also be compiled into script localization.
Actual result:
Any key that shares a name with its category (valid for I2, at least I2 works and does not complain), when using Script localization, will result in I2 generating a class with a member of the same name, which is illegal in C# and produces a compiler error.
Reproduction:
Add a key to a category with a matching name. Try to generate Script localization.
Proposed fix:
Change the generator to account for when a key will produce this problem, and add a prefix.
(Sorry for all the newlines. The spam filter has a thing against paragraphs.)
Please Log in or Create an account to join the conversation.
Time to create page: 0.143 seconds