Welcome, Guest
Username: Password: Remember me

TOPIC: 2.8.0f1-keys with national characters from googl

2.8.0f1-keys with national characters from googl 1 week 3 days ago #2486

  • Killersan
  • Killersan's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
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.
The administrator has disabled public write access.

2.8.0f1-keys with national characters from googl 1 week 2 days ago #2489

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 873
  • Thank you received: 189
  • Karma: 55
Hi,
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,
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
The administrator has disabled public write access.
Time to create page: 0.108 seconds
Colors