ioki-mobility / LokaliseGradlePlugin

A Gradle plugin that uploads and downloads strings from lokalise using the lokalise CLI under the hood.
MIT License
4 stars 3 forks source link

Add `checkIfEverythingIsTranslated` tasks #89

Open StefMa opened 1 month ago

StefMa commented 1 month ago

We may want to add a new Gradle task that checks if all translations are complete. If any translations are missing, the task will fail.

We can use the /projects API for this by iterating over the languages and checking if the progress is at 100%. See Project Object and Retrieve a Project for more details.

(Alternatively, the progress_total might also be useful 🤓)

Why/Motivation?

Before running/building an Android app, you download the translation strings using the plugin. If there are missing strings, your build tool might throw an error, for example, due to Android Lint. However, by the time this issue is reported, some time has already been lost.

To prevent this, we could implement a convenient “pre-check” using a single API call.

Discussion Points

juschmitt commented 1 month ago

Voting for:

Keeps the api small as you really only have to call 1 task to download the strings.