Cleanup some spammy output.
This commit is contained in:
parent
9ef7b13442
commit
851f9c1da6
3 changed files with 10 additions and 3 deletions
|
@ -118,7 +118,7 @@ public class AccessTransformer implements IClassTransformer
|
||||||
rulesResource = Resources.getResource(rulesFile);
|
rulesResource = Resources.getResource(rulesFile);
|
||||||
}
|
}
|
||||||
processATFile(Resources.asCharSource(rulesResource, Charsets.UTF_8));
|
processATFile(Resources.asCharSource(rulesResource, Charsets.UTF_8));
|
||||||
FMLRelaunchLog.fine("Loaded %d rules from AccessTransformer config file %s\n", modifiers.size(), rulesFile);
|
FMLRelaunchLog.fine("Loaded %d rules from AccessTransformer config file %s", modifiers.size(), rulesFile);
|
||||||
}
|
}
|
||||||
protected void processATFile(CharSource rulesResource) throws IOException
|
protected void processATFile(CharSource rulesResource) throws IOException
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@ import cpw.mods.fml.relauncher.FMLRelaunchLog;
|
||||||
|
|
||||||
public class ModAPITransformer implements IClassTransformer {
|
public class ModAPITransformer implements IClassTransformer {
|
||||||
|
|
||||||
private static final boolean logDebugInfo = Boolean.valueOf(System.getProperty("fml.debugAPITransformer", "true"));
|
private static final boolean logDebugInfo = Boolean.valueOf(System.getProperty("fml.debugAPITransformer", "false"));
|
||||||
private ListMultimap<String, ASMData> optionals;
|
private ListMultimap<String, ASMData> optionals;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.io.InputStreamReader;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
@ -35,6 +36,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StringTranslate;
|
import net.minecraft.util.StringTranslate;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
|
import com.google.common.base.Joiner;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
@ -273,13 +276,15 @@ public class LanguageRegistry
|
||||||
private void searchZipForLanguages(File source, Side side) throws IOException
|
private void searchZipForLanguages(File source, Side side) throws IOException
|
||||||
{
|
{
|
||||||
ZipFile zf = new ZipFile(source);
|
ZipFile zf = new ZipFile(source);
|
||||||
|
List<String> added = Lists.newArrayList();
|
||||||
for (ZipEntry ze : Collections.list(zf.entries()))
|
for (ZipEntry ze : Collections.list(zf.entries()))
|
||||||
{
|
{
|
||||||
Matcher matcher = assetENUSLang.matcher(ze.getName());
|
Matcher matcher = assetENUSLang.matcher(ze.getName());
|
||||||
if (matcher.matches())
|
if (matcher.matches())
|
||||||
{
|
{
|
||||||
String lang = matcher.group(2);
|
String lang = matcher.group(2);
|
||||||
FMLLog.fine("Injecting found translation data for lang %s in zip file %s at %s into language system", lang, source.getName(), ze.getName());
|
//FMLLog.fine("Injecting found translation data for lang %s in zip file %s at %s into language system", lang, source.getName(), ze.getName());
|
||||||
|
added.add(lang);
|
||||||
LanguageRegistry.instance().injectLanguage(lang, StringTranslate.parseLangFile(zf.getInputStream(ze)));
|
LanguageRegistry.instance().injectLanguage(lang, StringTranslate.parseLangFile(zf.getInputStream(ze)));
|
||||||
// Ensure en_US is available to StringTranslate on the server
|
// Ensure en_US is available to StringTranslate on the server
|
||||||
if ("en_US".equals(lang) && side == Side.SERVER)
|
if ("en_US".equals(lang) && side == Side.SERVER)
|
||||||
|
@ -288,6 +293,8 @@ public class LanguageRegistry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (added.size() > 0)
|
||||||
|
FMLLog.fine("Found translations in %s [%s]", source.getName(), Joiner.on(", ").join(added));
|
||||||
zf.close();
|
zf.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue