kelvinhokk / cordova-plugin-localization-strings

Cordova Plugin for Localization of Strings on the App
MIT License
119 stars 106 forks source link

Plugin does not properly respect project file cache #33

Closed oliversalzburg closed 4 years ago

oliversalzburg commented 6 years ago

Cordova caches previously read project files. So any changes made by this plugin are lost when another plugin also modifies the iOS project. As this plugin modifies the project in a non-standard manner.

To fix this, the project file has to be evicted from the cache after writing it. I'm still working on the details in our fork.

michael-mader commented 4 years ago

could you please add a pull request fixing this issue in this pluging?

rodrigograca31 commented 4 years ago

@Fender123 is this still an issue? caching.......? :thinking: can anyone link to some documentation about this? Thanks!

michael-mader commented 4 years ago

yes absolutely. But it depends on some settings. It is only an issue if the xcode project file is changed in multiple scripts. In my case it is cordova-ios itself because I am setting SwiftVersion preference. Which seems to be using a cached version of the project.pbxproj file and is therefore lacking the changes made by this plugin.

rodrigograca31 commented 4 years ago

Unfortunately I'm not familiar with iOS so cant help much. :cry:

michael-mader commented 4 years ago

@oliversalzburg fix (https://github.com/fairmanager-cordova/plugin-localization-strings/blob/dev/hooks/createIosStrings.js#L157-L161) solves the issue for me. But his fork moved in another direction and differs from this project. Even the hook filenames were changed.

oliversalzburg commented 4 years ago

Sorry. This ship has sailed.

rodrigograca31 commented 4 years ago

@oliversalzburg according with @Fender123 it has not, so I think I will reopen the issue....

@Fender123 seems those lines could be implemented here: https://github.com/kelvinhokk/cordova-plugin-localization-strings/blob/master/scripts/create_ios_strings.js#L151

if you dont mint please fork it or try it somehow and report back. We would appreciate a PR!

oliversalzburg commented 4 years ago

Do what you need to do, but don't expect help from me after not addressing my concern for more than a year. We have moved on. Good luck :)