Skip to content

Commit

Permalink
Add Nautilus' instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Weathercold committed Dec 6, 2022
1 parent 61e2dfc commit c9559eb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions core/src/mindustry/client/utils/Translating.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ public class Translating {
*/
public static volatile ObjectMap<String, Boolean> servers = ObjectMap.of(
//"libretranslate.com", false, requires API key :(
"translate.argosopentech.com", false,
"libretranslate.de", false,
"lt.vern.cc", false,
"translate.terraprint.co", false,
"translate.api.skitzen.com", false,
"translate.fortytwo-it.com", false
// Thanks to Allen for hosting this instance and Nautilus for giving permission to use it
// https://github.com/TomtheCoder2/mainPlugin/blob/master/src/main/java/mindustry/plugin/minimods/Translate.java#L219
"http://168.119.234.142:5000", false,
"https://translate.argosopentech.com", false,
"https://libretranslate.de", false,
"https://lt.vern.cc", false,
"https://translate.terraprint.co", false,
"https://translate.api.skitzen.com", false,
"https://translate.fortytwo-it.com", false
);

// Might break certain mods idk
Expand Down Expand Up @@ -110,7 +113,7 @@ private static void fetch(String api, HttpMethod method, @Nullable StringMap bod
return;
}

Http.post("https://" + server + api)
Http.post(server + api)
.method(method)
.header("Content-Type", "application/json")
.content(JsonIO.json.toJson(body, StringMap.class, String.class))
Expand Down

0 comments on commit c9559eb

Please sign in to comment.