You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's using _NSBundle.mainBundle()_, as a result if you call a localized var from the App target, the system will load the localized string from the localization file of that target and not from the framework.
This way every target has only the set of translations required by the target but leads to duplication if the same strings are needed in different targets, on the other hand if I create a single unique Localizations file within the framework to be shared by all targets seems to be more clean, what do you think?
Sorry it took me so long - I've been unavailable for few weeks, but I am back in business!
I will make sure to figure out how to do it the best way ; While your idea is solid and definitely one way to go, I still believe it should be ready for everything by just downloading - I don't want to force some new conventions etc. I am still open to suggestions, but I should be able to code it sometime next week once I put some serious thinking about it.
For now, thanks for trying it and I will let you know here once this is done.
Hi,
Actually the code does not support frameworks properly, the generated String extension:
It's using _NSBundle.mainBundle()_, as a result if you call a localized var from the App target, the system will load the localized string from the localization file of that target and not from the framework.
I'm testing a little hack:
I created an internal dummy class in order to fetch the correct bundle via:
The name of this dummy class should be based on the values in the script e.g:
OUTPUT_PATH="$BASE_PATH/Path_To_Output/_Localizations_.swift"
Although I'm not sure if this is the more optimal solution.
The text was updated successfully, but these errors were encountered: