Code Monkey home page Code Monkey logo

Comments (9)

theSoenke avatar theSoenke commented on August 20, 2024 2

Hi @winkelsdorf, could you maybe take a look at this issue and whether the behavior between the versions changed? Thanks!

from ios-sdk.

honkmaster avatar honkmaster commented on August 20, 2024 1

Hey @winkelsdorf @theSoenke . Why was the ticket closed? I did not have a chance to reply yet.

Regarding your question I may give you more details and clarify your question.

Our app has two tables.

  • Localizable.strings
  • Localizable-Tenant.strings

Both tables are available in for DE and EN.

We access the values as follows:

if let value =  NSLocalizedString("key", tableName: "Localizable-Tenant", value: "", comment: "") {
  return value
} else if let value =  NSLocalizedString("key", tableName: "Localizable", value: "", comment: "") { 
  return value
}

The key exists in both tables.

Before calling setup of Phrase, the logic above returns the values as wanted, here from Localizable-Tenant.
After calling setup, the first NSLocalizedString(...) still returns a value. But the value / string returned is from the Localizable table. This has led us to believe that tableName is ignored.

Additionally, for some of our apps there is only Localizable-Tenant. Here, after setup, no value is returned.

I hope the explanation helped and we kindly ask to reopen the ticket.

from ios-sdk.

github-actions avatar github-actions commented on August 20, 2024

Hi Tobias,

Thanks for reaching out to us.
We'll look into this and get back to you as soon as possible accordingly.

Don’t hesitate to reach out again in case needed in the meantime, and have a great week ahead!

Best,
Erika from the Phrase Technical Support Team

Comment by Erika

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@honkmaster Thank you for your issue report. We're currently re-evaluating the new logic to fit your needs, too.

I'll keep you updated here.

from ios-sdk.

github-actions avatar github-actions commented on August 20, 2024

Thanks!

This ticket will reopen whenever you reply to it with any further questions or feedback.

Have a great week ahead.

Best,
Erika from the Phrase Technical Support Team

Comment by Erika

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@honkmaster Could you please provide more information about your Bundle/Table Setup?

Using another Table e.g. OtherTable.strings I was able to access the strings using the swizzled method.

let otherTableValue2 = NSLocalizedString("othertable_test_key", tableName: "OtherTable", value: "", comment: "")
debugPrint("Other table", otherTableValue2)

That returned my value from the other Table correctly.

Am I right that you want to translate keys that might exist in both tables? In the example you would have a othertable_test_key in the OTA release and your other tables, too?

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@honkmaster Sorry, that happened automatically by referencing it from our upcoming Release. Looking into your details later and giving you an update.

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

Thank you for the valuable input! We were able to fix the underlying issue and going to release later today. That said: Your custom tenant will work, but the Phrase OTA SDK only supports translating the Main Bundle (i.e. Localizable.strings). But it will not interfere with custom Tables anymore.

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@honkmaster Release 4.1.0 has just been published. Please check if your problem has been solved, I am looking forward to your feedback.

from ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.