Initialization Issues & CSV Import With Semicolons

More
9 years 3 weeks ago - 9 years 3 weeks ago #591 by JAC
Hey Frank,

Couple more small issues for you.

When you try to import a CSV using semicolons as a separator it fails. This is unfortunate because OpenOffice Calc defaults to using semicolons as a CSV seperator, and most of our office uses OpenOffice Calc (Shame, I know). If I find and replace in the file and replace the semicolons with commas it works. I could send you an example file if you need, but all you need to do is replace comas with semicolons in a working CSV.

Also if you import replace and it fails to import, your existing terms are wiped out. Would be nice if a failed import just left your terms as is, and replaced the lists/dictionaries after it succeed.


Also If you have a button with a SetLanguage component before any Localize components appear in a scene, LocalizationManager won't be initialized when you click the button (we had some set language buttons on an initial scene). When that happens LocalizationManager won't have any supported languages loaded yet, so LocalizationManager.HasLanguage will return false and the selected language won't be applied.

It looks like LocalizationManager.InitializeIfNeeded() needs to be called for this to happen, but that's private and only called in the getter for CurrentLanguage and CurrentLanguageCode (which a Localize would trigger indirectly).

It seems like the better solution would be for HasLanguage calling InitializeIfNeeded(), but for now I added a check on current language to trigger that indirectly before calling HasLanguage
// getting current language triggers initialization
var curr = LocalizationManager.CurrentLanguage;
if(_Language != curr && LocalizationManager.HasLanguage(_Language))
{
	LocalizationManager.CurrentLanguage = _Language;
}

Thanks,
Jovanni
Last edit: 9 years 3 weeks ago by JAC.

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

More
9 years 3 weeks ago #593 by Frank

When you try to import a CSV using semicolons as a separator it fails. This is unfortunate because OpenOffice Calc defaults to using semicolons as a CSV seperator, and most of our office uses OpenOffice Calc (Shame, I know). If I find and replace in the file and replace the semicolons with commas it works. I could send you an example file if you need, but all you need to do is replace comas with semicolons in a working CSV.


Hi, I'm please to announce that version 2.4.5 adds support for different CSV separators. (Comma, Semicolon, Tab)!

Attachment CSVseparator.jpg not found


Also if you import replace and it fails to import, your existing terms are wiped out. Would be nice if a failed import just left your terms as is, and replaced the lists/dictionaries after it succeed.


That's also implemented on 2.4.5 :)

It seems like the better solution would be for HasLanguage calling InitializeIfNeeded(), but for now I added a check on current language to trigger that indirectly before calling HasLanguage


Added as well B)

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
Attachments:

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

More
9 years 3 weeks ago #594 by JAC
I love you Frank.

But seriously, thanks again. Great support.

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

Time to create page: 0.157 seconds
Template by JoomlaShine