Bugs?`

More
9 years 10 months ago - 9 years 10 months ago #134 by aholla
Bugs?` was created by aholla
Hi I am have a little bit of trouble with I2. I've just started using it so might be my own fault but I thought I would ask for opinions on whats going wrong anyway.

I am using Unity 4.5 Pro and exporting csv from excel and have the latest verion of NGUI.

My main issues was that I thought the I2 was breaking everytime I was playing but on closer inspection it is not but it is still not working as I think it should. I have imported a csv files and added "Localize" scripts to all my labels. I then select a term from the drop down. All good. However as soon as i hit the play button, all the Localisation fields display a red asterix with the copy "Key {MY_KEY} is not Localized or it is in a different Language Source".

One i stop the game running they remain broken, I select them, deselect them and nothing fixes them. They report the is no Key. The only way to fix this is to select the GameObject that has the "Localize Source" script attached to it. This somehow resets everything and if i then return to the "Localize" component they will have reset and show the Key/Term that i initially set.

Also worth noting they still work when the game runs, so I guess its just the inspector panel that is broken.


Another issues I have come across is that if I use the Tools > "Select No Localized Labels" its selects all my labels BUT I cant seem to unselect them. I have to hit the play button which then enables everything again.

Also the up and down arrow do not work on the Language selection tab in the Localize Source. So the only way to set the initial language is directly in the PlayerPrefs...
Last edit: 9 years 10 months ago by aholla. Reason: Further inspection

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

More
9 years 10 months ago #137 by Frank
Replied by Frank on topic Bugs?`
Hi,
The bug "Select No Localized Labels" running every frame and reselecting every label is fixed in the latest version (2.1.0 b3).
I'm waiting for the AssetStore team to publish the version in the Asset Store, but you can download it right now from the I2 Community.

Regarding the terms been deleted. It could be two things.
1- There was a bug that some times the language source was not saving the terms after import, unless you edit or add a new term manually. Thats fix in the latest version as well.

2- If you are adding a Language Source to the scene it may conflict with the I2Languages.prefab in your project. When playing the game, the plugin is able to load the I2Languages prefab and mix it with any source in the scene. But when you click any localize component in the editor it only loads the last used source.
If you are using a language source in the scene, it maybe a good idea to add a reference to that source in the field at the bottom of the Localize component so that the inspector knows from which source it should preview the terms.

Please, Upgrade to the lastest version and let me know if the problems continue.

Thanks a lot,
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
9 years 10 months ago - 9 years 10 months ago #144 by aholla
Replied by aholla on topic Bugs?`
Hi thanks, I got the latest version.

I am getting a reoccuring error when trying to import my csv:
Array index is out of range.
UnityEngine.Debug:LogError(Object)
I2.Loc.LocalizationEditor:OnGUI_Spreadsheet_Local_ImportExport(eLocalSpreadsheeet, String) (at Assets/Extensions/I2/Localization/Editor/Localization/LocalizationEditor_Spreadsheet_Local.cs:168)
I2.Loc.LocalizationEditor:OnGUI_Spreadsheet_Local() (at Assets/Extensions/I2/Localization/Editor/Localization/LocalizationEditor_Spreadsheet_Local.cs:95)
I2.Loc.LocalizationEditor:OnGUI_ImportExport() (at Assets/Extensions/I2/Localization/Editor/Localization/LocalizationEditor.cs:78)
I2.Loc.LocalizationEditor:OnGUI_Main() (at Assets/Extensions/I2/Localization/Editor/Localization/LocalizationEditor.cs:60)
I2.Loc.LocalizationEditor:OnInspectorGUI() (at Assets/Extensions/I2/Localization/Editor/Inspectors/LanguageSourceInspector.cs:68)
UnityEditor.DockArea:OnGUI()

This means I can't edit the CSV externally. It also corrupts the file (stripping all the commas).

What I did was create an empty .txt file, rename it csv. and import it into I2. I got the error on doing this. But it seemed to have a reference so I added a key and a couple of languages and exported it. That worked!

So i opened the csv and pasted all my translations into the correct boxes, then tried reimporting. This is when i got the above error again. When I open the csv externally it has been stripped of commas and is a mess.


[EDIT]
So I think I have figured it out. Not sure if you can do anything about it or if it's a Microsoft Excel thing.

Anyway, I2 imports my csv fine and when I export my changes it looks like everything is fine. It opens in excel and all the columns are there BUT when I go to save it, the file has been converted to a Unicode Text file. Excel then saves the files but the commas are lost. This is why the error occurs in I2.

Is there anything I2 can do when exporting the file that retains its original state?

If not the user who opens the exported csv MUST re-export it from excel, they can not simple makes the changes and hit the save button because this will save it in the "txt" format with the ".csv" extension. It looks correct but the data isnt.

I found these two posts: support.microsoft.com/kb/77295 and stackoverflow.com/questions/18209914/excel-saving-csv-with-tabs . Also this: stackoverflow.com/questions/4098568/csv-and-ms-dos-csv-formats .

p.s. Should I post here or in the G+ community?

Thanks.

[EDIT AGAIN]
So the above issue is totally related to excel. I switched to Open Office and upon opening the csv file I am prompeted with how I was it to be split. This solves everything. I guess ifs its not something that can be fixed easily, recommend people use open office instead of excel. Thanks.

Also all the bugs i posted in the initial post have been fixed in your update. But I do have to change the sources to my custom prefab or it will use the one from the example and the problem still happens.
Last edit: 9 years 10 months ago by aholla.

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

More
9 years 10 months ago #146 by Frank
Replied by Frank on topic Bugs?`
Hi

You are going to get errors when importing an empty csv file, because the plugin requires the spreadsheet to have an specific format in order to read it correctly:
Key,Type,Desc,Language1,Language2
Term1,Text,description1,translation1,translation2

Thats why for creating a csv file, its better to open the Language Source, add a language and export into a CSV file. That way it will create the right structure for you.

I tried Microsoft Excel to edit the csv file. By default it will open the file as a txt file and if you hit "save" it will not output the correct format.
However, if after opening the file, you select "Save As" and select the "CSV (Comma delimited) (*.csv)" type, it will export correctly. And it seems that it will remember that setting and from now on, everytime you open that file it selects the correct type.

You could also setup Excel to save to csv by default by changing the settings on File\Options\Save

Thanks,
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.

Time to create page: 0.144 seconds
Template by JoomlaShine