diff --git a/gradle.properties b/gradle.properties index 4bcbfc3ac2..b456f3cc05 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true -org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m diff --git a/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/Lokalise.kt b/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/Lokalise.kt index 8467f69c53..a0033e4312 100644 --- a/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/Lokalise.kt +++ b/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/Lokalise.kt @@ -4,6 +4,7 @@ import com.dailymotion.kinta.KintaEnv import com.dailymotion.kinta.Logger import com.dailymotion.kinta.globalJson import com.dailymotion.kinta.helper.UnzipUtils +import com.dailymotion.kinta.integration.lokalise.internal.model.EmptyExport import com.dailymotion.kinta.integration.lokalise.internal.model.LkDownloadPayload import com.dailymotion.kinta.integration.lokalise.internal.model.LkLangResponse import com.dailymotion.kinta.integration.lokalise.internal.model.LkUploadPayload @@ -61,6 +62,8 @@ object Lokalise { resource: String, format: String, langList: List, + convertPlaceholders: Boolean = true, + exportEmptyAs: String = EmptyExport.SKIP.name.lowercase(), ): LokaliseDownloadResponse { val project_ = project ?: KintaEnv.getOrFail(KintaEnv.Var.LOKALISE_PROJECT) @@ -68,6 +71,8 @@ object Lokalise { filter_langs = langList, filter_filenames = listOf(resource), format = format, + convert_placeholders = convertPlaceholders, + export_empty_as = exportEmptyAs ) return requestDownload( diff --git a/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/internal/model/Model.kt b/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/internal/model/Model.kt index a002b36142..86642d21af 100644 --- a/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/internal/model/Model.kt +++ b/kinta-lib/src/main/kotlin/com/dailymotion/kinta/integration/lokalise/internal/model/Model.kt @@ -22,9 +22,10 @@ data class LkDownloadPayload( val filter_langs: List, val filter_filenames: List, val format: String, - val indentation: String = "tab", + val export_empty_as: String, + val convert_placeholders: Boolean, val directory_prefix: String = "%LANG_ISO%", - val export_empty_as: String = "skip", + val indentation: String = "tab", ) @Serializable @@ -33,4 +34,6 @@ data class LkUploadPayload( val filename: String, val lang_iso: String, val replace_modified: Boolean = true, -) \ No newline at end of file +) + +enum class EmptyExport { BASE, EMPTY, NULL, SKIP } \ No newline at end of file