I try to generate ScriptLocalization.cs but every time I select all the terms and click "Build script with selected terms" it throws this error:
"IndexOutOfRangeException: Index was outside the bounds of the array."
Here is the call stack:
IndexOutOfRangeException: Index was outside the bounds of the array.
at I2.Loc.LocalizationEditor.ScriptTool_AdjustTerm (System.String Term, System.Boolean allowFullLength) [0x00008] in /Users/romainpedra/Git/Airlines-Manager-2-Mobile_Unity_2017.3/Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_Script.cs:192
at I2.Loc.LocalizationEditor.BuildScriptWithSelectedTerms (System.Text.StringBuilder sb) [0x0005e] in /Users/romainpedra/Git/Airlines-Manager-2-Mobile_Unity_2017.3/Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_Script.cs:141
at I2.Loc.LocalizationEditor.BuildScriptWithSelectedTerms () [0x0007f] in /Users/romainpedra/Git/Airlines-Manager-2-Mobile_Unity_2017.3/Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_Script.cs:96
at (wrapper delegate-invoke) <Module>:invoke_void ()
at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () [0x00010] in /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:127
Thanks for reporting this. This issue is now fixed in 2.8.6a1 (will be uploading to the beta folder later today).
Also, the tool was modified to not only include the translations of the terms, but also variables containing the term name.
For example, If you have the term "Tutorials/Main Tutorial" translated as "Welcome back!"
var translation = ScriptLocalization.Tutorials.Main_Tutorial; // returns "Welcome back!"
var termName = ScriptTerms.Tutorials.Main_Tutorial; // returns "Tutorials/Main Tutorial"
That way you can set terms without using string constants: