Problem with caching from google

More
5 years 10 months ago #3532 by Euge
I’m using the web service to update the localizations from google and this is my setup:
Auto Update Frequency: Never
Update Synchronization: As Soon As Downloaded

I call the “I2.Loc.LocalizationManager.Sources[0].Import_Google(true, false);” only when I change a flag from my server and it works, but I’m a problem.
At the first app launch the translations are correctly updated from the server.
When I kill and reopen the app I would expect that the translations previously downloaded should be loaded from the cache, but this does not happen.
The translations that shows up are the ones builded in the app and not the ones downloaded from google.
I’m doing something wrong?
Attachments:

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

More
5 years 10 months ago - 5 years 10 months ago #3536 by Frank
Hi,
The problem is that the plugin doesn't load the data from the cache if the auto update frequency is NEVER

Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs
line 74 function AddSource
if (Source.HasGoogleSpreadsheet() && Source.GoogleUpdateFrequency != LanguageSourceData.eGoogleUpdateFrequency.Never)
{
      #if !UNITY_EDITOR
            Source.Import_Google_FromCache();
            bool justCheck = false;
      #else

To solve this issue and update from the cache after you have manually downloaded data, you can do one of this:
- set GoogleUpdateFrequency to LanguageSourceData.eGoogleUpdateFrequency.OnlyOnce

or

manually call Source[0].Import_Google_FromCache() on startup

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
Last edit: 5 years 10 months ago by Frank.

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

Time to create page: 0.211 seconds
Template by JoomlaShine