Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom TRANSLATION_PATH not working or ignored #57

Open
Reqven opened this issue Feb 21, 2020 · 3 comments
Open

Custom TRANSLATION_PATH not working or ignored #57

Reqven opened this issue Feb 21, 2020 · 3 comments

Comments

@Reqven
Copy link

Reqven commented Feb 21, 2020

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

@rodrigograca31
Copy link
Collaborator

rodrigograca31 commented Feb 26, 2020

Just gave it a quick look and the code actually looks a bit bad. 😭

Repeated code (android/ios), bad if/else statements, variable values being assigned twice in a row, imports in the middle of the code, etc

bd85075

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/

@miqmago
Copy link

miqmago commented Apr 26, 2020

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>

@SumeetHindinkeri
Copy link

@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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants