Special Symbols terms bug

More
5 years 10 months ago - 5 years 10 months ago #3524 by Brian-ALLCAPS
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: 5 years 10 months ago by Brian-ALLCAPS.

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

More
5 years 10 months ago #3529 by Frank
Replied by Frank on topic Special Symbols terms bug
Hi,
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,
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
5 years 10 months ago #3544 by Brian-ALLCAPS
Thanks this has fixed my issue =)

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

Time to create page: 0.188 seconds
Template by JoomlaShine