Skip to content

Commit

Permalink
Getting ready for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ringosham committed Apr 28, 2020
1 parent 999754f commit 807a901
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .idea/modules/TranslationMod.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/TranslationMod.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TranslationMod.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="TranslationMod" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.ringosham.translationmod" external.system.module.version="5.0.1" type="JAVA_MODULE" version="4">
<module external.linked.project.id="TranslationMod" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.ringosham.translationmod" external.system.module.version="5.0.2" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public RequestResult translate(String message, Language from, Language to) {
.build();
try {
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() == 200) {
if (response.getStatusLine().getStatusCode() != 200) {
accessDenied = true;
return new RequestResult(429, "Access to Google Translate denied", null, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public void run() {
//Remove the chat header to get the actual content
String rawMessage = messageTrim.replace(matcher.group(0), "");
TranslateResult translatedMessage = translate(rawMessage);
if (translatedMessage == null)
return;
String fromStr = null;
if (translatedMessage.getFromLanguage() != null)
fromStr = translatedMessage.getFromLanguage().getName();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ issueTrackerURL="https://github.com/ringosham/TranslateMod/issues" #optional
# The modid of the mod
modId="translationmod" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="5.0.1" #mandatory
version="5.0.2" #mandatory
# A display name for the mod
displayName="Real time translation mod" #mandatory
# A URL for the "homepage" for this mod, displayed in the mod UI
Expand Down

0 comments on commit 807a901

Please sign in to comment.