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

Importing an Android project for the first time: only French is imported #239

Open
BoD opened this issue Feb 3, 2018 · 1 comment
Open

Comments

@BoD
Copy link

BoD commented Feb 3, 2018

$ twine --version
Twine version 1.0.3

I'm trying it out twine for the first time. I have an already existing Android project containing texts in English and French.

The folders are organized in the standard Android way:

  • English texts in app/src/main/res/values/strings.xml
  • French texts in app/src/main/res/values-fr/strings.xml

I execute this command:

echo "" >twine.txt
twine consume-all-localization-files twine.txt app/src/main/res/ --format android --developer-language en --consume-all --consume-comments

I get Adding new definition 'xyz' to twine file. for each key but also Warning: xyz does not exist in developer language 'en' for each key.

Then when I look at the twine.txt file, I only have fr texts.

Thanks for your help.

@scelis
Copy link
Owner

scelis commented Feb 5, 2018

Hello. I think there may be a bug here where we should consume the developer language before consuming all of the other languages in the project. You can work around this issue for now by consuming just app/src/main/res/values/strings.xml before you consume everything else.

For example:

echo "" > twine.txt
twine consume-localization-file twine.txt app/src/main/res/values/strings.xml --format android --developer-language en --lang en --consume-all --consume-comments
twine consume-all-localization-files twine.txt app/src/main/res/ --format android --developer-language en --consume-all

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

2 participants