Fix language issues

This commit is contained in:
Modmuss50 2018-09-02 13:57:41 +01:00
parent c527bb1976
commit 852c4584a4
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -1,6 +1,7 @@
buildscript { buildscript {
repositories { repositories {
mavenCentral() mavenCentral()
jcenter()
maven { maven {
name = "forge" name = "forge"
url = "http://files.minecraftforge.net/maven" url = "http://files.minecraftforge.net/maven"
@ -16,6 +17,7 @@ buildscript {
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath "gradle.plugin.net.minecrell:licenser:0.2.1" classpath "gradle.plugin.net.minecrell:licenser:0.2.1"
classpath 'de.undercouch:gradle-download-task:3.4.3'
} }
} }
@ -23,6 +25,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: net.minecrell.gradle.licenser.Licenser apply plugin: net.minecrell.gradle.licenser.Licenser
apply plugin: 'de.undercouch.download'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
@ -208,20 +211,22 @@ task crowdinExport() {
} }
} }
//Taken from forge build script
task crowdin(type: CrowdinDownload, dependsOn: 'crowdinExport'){ task crowdin(type: Download, dependsOn: 'crowdinExport'){
output = "build/translations.crowdin" src 'https://crowdin.com/backend/download/project/techreborn.zip'
projectId = 'techreborn' dest file("build/translations.zip")
extract = true overwrite true
if (project.hasProperty('crowdinKey')) }
apiKey = project.crowdinKey
task cleanCrowdin(type: Delete){
delete 'build/translations'
} }
//Renames the translation files to be all lower case //Renames the translation files to be all lower case
task renameCrowdin(type: Copy, dependsOn: 'crowdin'){ task renameCrowdin(type: Copy, dependsOn: ['crowdin', 'cleanCrowdin']){
mustRunAfter 'crowdin' mustRunAfter 'crowdin'
from crowdin.output from zipTree(file("build/translations.zip"))
into 'build/translations' into file('build/translations')
rename { rename {
String filename -> return filename.toLowerCase() String filename -> return filename.toLowerCase()
} }