get last commit date of mainframe properies files

This commit is contained in:
honfika@gmail.com
2016-04-03 22:10:30 +02:00
parent 39da3feb88
commit 2b6183d2ad

View File

@@ -40,6 +40,7 @@ import com.jpexs.decompiler.flash.gui.abc.DeobfuscationDialog;
import com.jpexs.decompiler.flash.gui.abc.NewTraitDialog;
import com.jpexs.decompiler.flash.gui.abc.UsageFrame;
import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame;
import com.jpexs.helpers.Helper;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -136,6 +137,22 @@ public class CheckResources {
}
}
public static void checkTranslationDate(PrintStream stream) {
for (String lang : SelectLanguageDialog.getAvailableLanguages()) {
String lang2 = lang.equals("en") ? "" : "_" + lang.replace("-", "_");
//https://api.github.com/repositories/19647328/contents/src/com/jpexs/decompiler/flash/gui/locales
String url = "https://api.github.com/repos/jindrapetrik/jpexs-decompiler/commits?path=/src/com/jpexs/decompiler/flash/gui/locales/MainFrame" + lang2 + ".properties";
try {
String text = Helper.downloadUrlString(url);
text = text.substring(text.indexOf("\"date\":\"") + 8);
text = text.substring(0, text.indexOf("T"));
stream.println(lang + ": " + text);
} catch (IOException ex) {
Logger.getLogger(CheckResources.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
public static void compareResources(PrintStream stream, String revision, String revision2) {
String rootUrl = "https://raw.githubusercontent.com/jindrapetrik/jpexs-decompiler/";
Class[] classes = getClasses();