First time applying language jumbles translations

More
2 years 7 months ago #2929 by koalitygame
The first time applying a different language shows the incorrect translations, as if the words are offset from their actual keys. Restarting the app corrects the issue and there are no further errors. Any idea what is causing the initial bug? Below you can see the incorrect translations vs one with no issues.
Attachments:

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

More
2 years 7 months ago #2930 by Frank
Hi,
Thanks for reporting this!
I found the issue will upload a fix later today to the beta folder.

The problem is related to Google Live Synchronization not been up-to-date and how the Unload langugages work:

- Whenever the game starts playing, all languages are saved into a temporal file, and removed from memory.
- When you change languages, the correct file is loaded and the previous language is unloaded.
- However, if you Google Spreadsheet has been modified and the Update frequency is set to anything other than NEVER, then the spreadsheet is downloaded
- As soon as the download is finished, the new data is used

The bug is that the downloaded data doesn't update the temporal file until you restart the app. So, if you change languages, the terms could be in a different order.

I'm correcting this in 2.8.6a2. In meantime, you can temporally fix it by disabling Google Live Synchronization: Go to the I2Langauges.prefab, in the Spreadsheet tab, Google, set update frequency to NEVER.

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
2 years 7 months ago #2931 by Frank
BTW, another quick fix is to change is to add the SaveLanguages call to
Assets\I2\Localization\Scripts\LanguageSource\LanguageSource_Import_Google.cs
line 338

It should look like this:
                    if (UpdateMode == eSpreadsheetUpdateMode.Replace)
                        UpdateMode = eSpreadsheetUpdateMode.Merge;
                }

// ADD THIS
                if (I2Utils.IsPlaying())
                {
                    SaveLanguages(true);
                }
// UP TO HERE

#if UNITY_EDITOR
                if (!string.IsNullOrEmpty(ErrorMsg))
                    UnityEditor.EditorUtility.SetDirty(this);
#endif

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
2 years 7 months ago #2932 by koalitygame
Great, thanks for the response! Does this feature (when working correctly) mean that words in the game can be edited without pushing a new app version to the users?

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

More
2 years 7 months ago #2933 by Frank
Yes, its exactly for that.

Once you link your LanguageSource with an Spreadsheet and set the update frequency to anything other than NEVER (e.g. DAILY, WEEKLY), the game will automatically check if the Spreadsheet was modified, and download the changes.
Then, it will cache those and everytime you run the game it will use the downloaded data. So, no need to push a new build just to change some texts.

See it in action:


More info:
inter-illusion.com/assets/I2Localization...Synchronization.html

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
2 years 7 months ago #2934 by koalitygame
That's amazing, thank you! Keep up the great work on this awesome plugin :)

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

Time to create page: 0.179 seconds
Template by JoomlaShine