From 05f13220d20789a4bfb9f48d2a3db9b7ba3a7e23 Mon Sep 17 00:00:00 2001 From: Ryan Leach Date: Mon, 18 Jan 2016 14:48:21 +1030 Subject: [PATCH] Fix 3.0 -> 3.1 changes. + build issues. --- build.gradle | 10 +++++++--- .../java/au/id/rleach/translate/TranslateWithBing.java | 2 +- .../translate/data/LanguageDataManipulatorBuilder.java | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 482a2d4..accc807 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group 'au.id.rleach' -version '1.0.0' +version '1.0.1' apply plugin: 'java' @@ -7,10 +7,14 @@ sourceCompatibility = 1.8 repositories { mavenCentral() + maven { + name = 'sponge' + url = 'http://repo.spongepowered.org/maven' + } } dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' compile 'com.memetix:microsoft-translator-java-api:0.6.2' - -} + compile 'org.spongepowered:spongeapi:3.0.0' +} \ No newline at end of file diff --git a/src/main/java/au/id/rleach/translate/TranslateWithBing.java b/src/main/java/au/id/rleach/translate/TranslateWithBing.java index b66f03f..481aa5d 100644 --- a/src/main/java/au/id/rleach/translate/TranslateWithBing.java +++ b/src/main/java/au/id/rleach/translate/TranslateWithBing.java @@ -43,7 +43,7 @@ import java.util.*; -@Plugin(id="TranslateWithBing", name="TranslateWithBing", version="1.0.0") +@Plugin(id="TranslateWithBing", name="TranslateWithBing", version="1.0.1") public class TranslateWithBing { @Inject diff --git a/src/main/java/au/id/rleach/translate/data/LanguageDataManipulatorBuilder.java b/src/main/java/au/id/rleach/translate/data/LanguageDataManipulatorBuilder.java index b71526b..c71168f 100644 --- a/src/main/java/au/id/rleach/translate/data/LanguageDataManipulatorBuilder.java +++ b/src/main/java/au/id/rleach/translate/data/LanguageDataManipulatorBuilder.java @@ -23,7 +23,7 @@ public Optional createFrom(DataHolder dataHolder) { public Optional build(DataView container) throws InvalidDataException { // Note that this should check the Queries.CONTENT_VERSION, but for the sake of demonstration // it's not necessary - if (container.contains(TranslateKeys.Language)) { + if (container.contains(TranslateKeys.Language.getQuery())) { final String language = container.getString(TranslateKeys.Language.getQuery()).get(); return Optional.of(new LanguageData(language)); }