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

Question/Enhancement: Don't overwrite strings.xml on android #66

Open
bradmartin opened this issue Mar 15, 2019 · 3 comments
Open

Question/Enhancement: Don't overwrite strings.xml on android #66

bradmartin opened this issue Mar 15, 2019 · 3 comments

Comments

@bradmartin
Copy link

Just digging into this plugin. Setup in a project which already had some custom strings in strings.xml for Android. Currently the plugin recreated the strings.xml based on the i18n asset files the plugin uses.

So first the question: is this intended currently or possibly a bug? If not, then I'd like to suggest the enhancement of not overwriting but look into possibly appending the i18n strings to any values currently in the strings.xml file to avoid causing build issues for people who add the plugin after they already have strings.xml created.

It might be more work than it's worth to implement a solution, in that case, maybe it's sufficient to have some warning about the overwriting. Then it overwrites and people can go back and add their current strings to the generated strings.xml with their i18n string values.

Thoughts?

@bradmartin
Copy link
Author

Ah okay so my initial suggestion wouldn't work because the current hook implementation will overwrite the strings.xml even with modifying after a failed build (where the hook was ran successfully).

@abhayastudios
Copy link

@bradmartin hey man I had the same issue for which I opened issue #60 initially for iOS but true for Android as well. I ended up using a custom hook that I use for multiple environments (dev vs prod) to copy the relevant original strings.xml and Info.plist to the right places. This way the original files stay untouched.

@TwistedTamarin
Copy link

Hi. I have added a fix for android. in this #88

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

No branches or pull requests

3 participants