cordova-plugin-localization-strings
cordova-plugin-localization-strings copied to clipboard
Custom TRANSLATION_PATH not working or ignored
I have the following default path in the packages.json
file.
"cordova-plugin-localization-strings": {
"TRANSLATION_PATH": "translations/app/"
}
Any other path seems to be ignored. Therefore, translations are not found/copied over when building the app.
Any idea about this ? Thanks
Just gave it a quick look and the code actually looks a bit bad. :sob:
Repeated code (android/ios), bad if/else statements, variable values being assigned twice in a row, imports in the middle of the code, etc
https://github.com/kelvinhokk/cordova-plugin-localization-strings/commit/bd850754bb69453795d2e8e4da3a98fc89400c75
Doesn't look good on me talking shit about this code but its true.... This could use quite a good amount of improvement. Unfortunately I dont have the time currently. You can always try to solve it on your own or create a bounty for someone to solve it: https://www.bountysource.com/
I've been able to make it work like this:
<plugin name="cordova-plugin-localization-strings" spec="~3.2.1">
<variable name="TRANSLATION_PATH" value="resources/native-translations/" />
</plugin>
@rodrigograca31 @miqmago I am working on ionic 4 project.I used this plugin and also followed the steps mentioned in readme.I also used comment mentioned above by @miqmago but nothing worked for me.It did not create any "/Resources/es.lproj/Localizable.strings" files at given path.I am trying to use this plugin for localising strings in dutch and english for NSCameraUsageDescription and other info.plist strings.Can anybody help me out !