phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

Translations from other tables are lost #54

Closed h-leroy-betclic closed 1 year ago

h-leroy-betclic commented 1 year ago

Once a sync has been done, the tableName parameter do not work anymore. NSLocalizedString(<key>, tableName: <tableName>, comment: "")

My project work with multiple tables : A and B, that are 2 distinct projects on Phrase. i use OTA to sync A (since OTA can only sync one project) Once a sync has been done :

You need to store the sync data mapped to a tableName (project name is a good candidate), and check it correctly in your swizzling. Or add tableName parameter in updateTranslation func, default nil, so no pb upgrading the sdk. Thank's

theSoenke commented 1 year ago

Hi @h-leroy-betclic, which version of the SDK are you currently using? Could you check with the latest SDK 4.1? https://github.com/phrase/ios-sdk/releases/tag/4.1.0 The issue with multiple tables should be resolved in the version 4.1

winkelsdorf commented 1 year ago

@h-leroy-betclic Thank you for your report. We need to investigate your use case a bit more to provide a solution for this, too. Keeping you updated here.

@theSoenke I think this might be a new issue which is quite different from our common use case.

h-leroy-betclic commented 1 year ago

Hi @theSoenke, @winkelsdorf, yes it's on 4.1.0. The difference i notice from this issue https://github.com/phrase/ios-sdk/issues/50 is the problem happens after the first sync has been done (not setup).

h-leroy-betclic commented 1 year ago

@theSoenke, @winkelsdorf do you reproduce the issue ? For information, we have postponed OTA feature delivery (again), so the fix is very expected. Thank's

theSoenke commented 1 year ago

Hi @h-leroy-betclic, I'm sorry for the inconvenience and causing the delay in rolling out OTA. We're now looking into this and expect to have a solution in the next 1-2 weeks. I'll keep you posted here once there as soon as there is an update.

h-leroy-betclic commented 1 year ago

@theSoenke , @winkelsdorf any news ?

theSoenke commented 1 year ago

@h-leroy-betclic unfortunately no update yet. We will need a few more days to tackle this

winkelsdorf commented 1 year ago

@h-leroy-betclic I was able to identify a problem related to the fallback to the iOS main bundle and there will be an update for it in a couple of days.

We ensured the following will be working:

This allows us to support different scenarios:

Support for downloading translations for different tables and/or translating for them unfortunately is something we currently don't support. Please see the last comment in https://github.com/phrase/ios-sdk/issues/25.

cc @theSoenke

Edit: Related to #50

h-leroy-betclic commented 1 year ago

@theSoenke , @winkelsdorf any news ??

winkelsdorf commented 1 year ago

@h-leroy-betclic Thank you for your patience. We have just released a new release that addresses the issue (v4.2.0). We are looking forward to your feedback!

winkelsdorf commented 1 year ago

Closed, as very likely fixed. Feel free to reopen if there are comments.