2.8.0f1-keys with national characters from googl

2 years 8 months ago #2486 by Killersan
Hello everyone. From the start we had translation in excel on google drive where keys had some national marks like ó,ł and such coded I think in Win1250 and all was working fine till version 2.8.0f1 where translation of keys with such national letters returns empty string.

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

2 years 8 months ago #2489 by Frank
To avoid including invalid characters in the term name (e.g. new lines, controls and invisible chars), the term's name removes any character that is not a letter, digit
or some punctuation sign.

However, I agree that is very restricted, so I'm changing the function to allow even extended characters (e.g. Chinese and other UNICODE characters).

You can fix it by replacing the function RemoveNonASCII function in assets\i2\localization\scripts\localizationmanager.cs line 468
        public static string RemoveNonASCII( string text, bool allowCategory=false )
            if (string.IsNullOrEmpty(text))
                return text;

            return new string(text.Select(c => (char.IsControl(c)|| (c=='\\' && !allowCategory)) ? ' ' : c).ToArray());

This has been included in 2.8.0f2 which I will release on Monday to the AssetStore.

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

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

Time to create page: 0.774 seconds
Template by JoomlaShine