Smartling / ios-lqa-sdk

Smartling Mobile SDK for iOS (Mobile Context, In App Review, Mobile Delivery Network)
Other
3 stars 2 forks source link

SLContextCapture breaks plural strings #11

Open gustavosaume opened 5 years ago

gustavosaume commented 5 years ago

When using SLContextCapture, our plural strings stop showing the localized string and show the NSStringLocalizedFormatKey instead.

I see in the docs that pluralizedStringWithKey:value: is required instead of NSLocalizedString but we are not doing OTA or anything fancy, we just would like context capture enabled, why we would need to update all of our code to use a custom way to use stringdicts files? Can this be de-coupled?

enegron-sl commented 5 years ago

Hi @gustavosaume,

pluralizedStringWithKey is actually a reference to a custom library that Smartling built prior to Apple supported plurals via .stringsdict. https://github.com/Smartling/ios-i18n So you can ignore that if you are using the NSLocalizedString as described here: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html

When you say they stop showing the localized string and show NSStringLocalizedFormatKey instead; do you mean in the UI when the app is running?

gustavosaume commented 5 years ago

yeah, if I run the app with SLContextCapture it shows um_posts@ (the key is actually %#@num_posts@) but if I change it to SLDisabled it works as expected.