Welcome, Guest
Username: Password: Remember me

TOPIC: Special Symbols terms bug

Special Symbols terms bug 1 month 1 day ago #3524

My terms have special symbols such as [ ] & # but for some reason this doesnt work for when I importat my terms from my spreadsheet.

So if my google spreadsheet has a term name "this [player]", the imported term will only show "this" as the name of the term name, for some reason it seems that the symbol # and / works, but nothing else.

Im on version 2.8.11 f1, I deleted my old I2 folder before importing this new version.
Last Edit: 1 month 1 day ago by Brian-ALLCAPS.
The administrator has disabled public write access.

Special Symbols terms bug 1 month 22 hours ago #3529

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1202
  • Thank you received: 256
  • Karma: 78
Yes, the problem is that terms are not allowed to have some symbols.
Recently I changed the symbols allowed in the term's name, because there were cases where new lines, control characters and other bad unicode chars were getting added which was breaking import/export from spreadsheets.
Currently, Terms can have any letter or digit, plus the following symbols .-_$#@*()[]{}+:

But that is too restrictive, so in the next update I have added more valid symbols.

In the meantime, you can change that by adding the ones you need to the ValidNameSymbols array in the
Assets\I2\Localization\Scripts\Utils\I2Utils.cs file line 14

Now, the other problem you are seeing is that the "[player]" part is detected as a tag. And by default the plugin removes any tagging from the Term's name.
Most rich text implementations use the "<xxx>" (Unity UI, TextMeshPro, etc) format, but some do "[xxx]" (NGUI).
Given that it may not be good to have terms named "This <color=yellow> is </color>", then the plugin removes those tags.

With that in mind, you could use "this {player}" or remove the "RemoveTag call from the GetValidTermName function in
Assets\I2\Localization\Scripts\Utils\I2Utils.cs line 77
        public static string GetValidTermName( string text, bool allowCategory = false)
            if (text == null)
                return null;
           // text = RemoveTags(text);    <-  remove or comment this line
            return RemoveNonASCII(text, allowCategory);

Hope that helps,
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.

Special Symbols terms bug 3 weeks 5 days ago #3544

Thanks this has fixed my issue =)
The administrator has disabled public write access.
Time to create page: 0.089 seconds
Template by JoomlaShine