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

Download task doesn't pull new strings, or updated translations for the default locale #11

Open
Drakuwa opened this issue Feb 8, 2022 · 2 comments

Comments

@Drakuwa
Copy link

Drakuwa commented Feb 8, 2022

I'm trying out the plugin and I've used the basic Groovy configuration for the project:

apply plugin: 'com.decathlon.phraseapp' // added after the kotlin-android plugin, and the android application plugin, if that info matters at all.

phraseapp {
    authToken = 'token <token>'
    projectId = '<projectId>'
    mainLocaleId = '<localeId>' // not "en"
    resFolders = ['src/main/res']
}

...and I have the beta 1 version of the plugin (classpath 'com.decathlon.phrase:phrase-gradle-plugin:1.0.0-beta01'), which at time of writing is the latest one.

The phraseappCheck runs successfully and phraseappUpload sends the locally created strings to the server. The problem is with phraseappDownload, which succeeds, but only downloads the other locales, which currently are empty, but doesn't get the newly added strings, or the updated strings from the server.

The folder structure for my project is standard, the default locale strings file is located at src/main/res/values/strings.xml and I have 2 more locales with string files at src/main/res/values-sv/strings.xml and src/main/res/values-fi/strings.xml.

Worth mentioning is that I have the Phrase Android Studio plugin that works as expected when I "pull" changes from the server, but I need this type of integration for our CI setup.

@Drakuwa
Copy link
Author

Drakuwa commented Feb 8, 2022

Also I noticed that phraseappDownload works for the additional locales - if I add a string translation for either of the locales, it works as expected, so, only the default locale download doesn't work. I've tried different variations of the plugin configuration, like, changing the mainLocaleId, or even removing it, but it didn't make a difference.

@Drakuwa
Copy link
Author

Drakuwa commented Feb 8, 2022

OK, I've read the README again, and it seems that i was missing the overrideDefaultFile = true option, but now I've added it, and I still don't get the new strings created on the server side. The default locale file now IS downloading, with updated translations, but without the new keys. Maybe this is by design, but it breaks the pull based flow that we are using.

On a side note, the strings.xml file that's now downloaded is messing up the file formatting - uses tabs instead of the default Android Studio spaces :)

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

1 participant