Change message verification task to add todo comments in same order
- Make verification task add todo comments to YML files in the same order as the MessageKey enum - Use DefaultCharsets everywhere instead of Guava's Charsets class (thanks to DNx5)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package tools.messages.translation;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.io.Resources;
|
||||
import com.google.gson.Gson;
|
||||
import fr.xephi.authme.output.MessageKey;
|
||||
@@ -15,6 +14,7 @@ import tools.utils.ToolsConstants;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashSet;
|
||||
import java.util.Scanner;
|
||||
import java.util.Set;
|
||||
@@ -56,7 +56,7 @@ public class ImportMessagesTask implements ToolTask {
|
||||
private LanguageExport getLanguageExportFromUrl(String location) {
|
||||
try {
|
||||
URL url = new URL(location);
|
||||
String json = Resources.toString(url, Charsets.UTF_8);
|
||||
String json = Resources.toString(url, StandardCharsets.UTF_8);
|
||||
return gson.fromJson(json, LanguageExport.class);
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
|
||||
Reference in New Issue
Block a user