Skip to content

Commit

Permalink
Remove the transifex leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Mar 20, 2024
1 parent 8563baa commit 440b6e6
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,3 @@ plugins {
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}

tasks {
val pullStrings = register<Exec>("pullStrings") {
executable = "tx"
args("pull", "--all")
}
val removeEmptyListings = register("removeEmptyListings") {
dependsOn(pullStrings)
mustRunAfter(pullStrings)
val listingsFolder = file("app/src/main/play/listings")
doLast {
(listingsFolder.listFiles()?.toList() ?: emptyList())
.filter { it.isDirectory }
.filterNot {
// don't remove the source language
it.name == "en-US"
}
.forEach { language ->
val contents = language.listFiles()?.toList() ?: emptyList()
val requiredListings = listOf("full-description.txt", "short-description.txt", "title.txt")
.map { File(language, it) }
if (!contents.containsAll(requiredListings)) {
logger.warn("Missing translations for ${language.name}. Delete listing.")
language.deleteRecursively()
}
}
}
}
register("importStrings") {
dependsOn(pullStrings, removeEmptyListings)
mustRunAfter(pullStrings, removeEmptyListings)
finalizedBy(":app:lintDebug")
}
}

0 comments on commit 440b6e6

Please sign in to comment.