Update Text

This commit is contained in:
5gi 2022-11-04 12:45:52 -04:00
parent 5abf319465
commit e25bff8f07

View File

@ -9,7 +9,7 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
public class Translator { public class Translator {
//TODO TEST CLASS //TODO Test class to make sure multiple contructors work.
public static String globalAuthKey = "null"; public static String globalAuthKey = "null";
public static void setGlobalAuthKey(String key) { public static void setGlobalAuthKey(String key) {
@ -48,7 +48,7 @@ public class Translator {
System.out.println(response); System.out.println(response);
e.printStackTrace(); e.printStackTrace();
} }
String message = "Error Processing Request"; String message = "Error Processing Request (Note: This could be due to the api updating or your api being taxed to often)";
JSONObject jsonObject = new JSONObject(response); JSONObject jsonObject = new JSONObject(response);
JSONArray jsonArray = jsonObject.getJSONArray("translations"); JSONArray jsonArray = jsonObject.getJSONArray("translations");
for (int i = 0; i < jsonArray.length(); i++) { for (int i = 0; i < jsonArray.length(); i++) {