twine icon indicating copy to clipboard operation
twine copied to clipboard

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

Open BoD opened this issue 7 years ago • 1 comments

$ 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.

BoD avatar Feb 03 '18 10:02 BoD

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

scelis avatar Feb 05 '18 19:02 scelis