mezz / ItemZoom

Minecraft Mod that shows a big version of the item you hover over.
MIT License
13 stars 7 forks source link

Formatting Error w/ Config GUI Title #8

Closed SnowShock35 closed 7 years ago

SnowShock35 commented 7 years ago

Hi mezz,

I believe to have found an issue with ItemZoom, here are the details;

Important Information

Issue Description

Tl;Dr: See image, Formatting error with in-game config GUI title therefore causing it to display: Formatting error ItemZoom Config

Issue Media

Issue Screenshot (Incorrect Config GUI Title being displayed)

Issue Fix

So, if you were to go about fixing this the quick way, you could just do it the way it's done in JEI using the now deprecated class net.minecraft.util.text.translation.I18n and if you were to do that here's the code for it... However, I imagine you'll look for a better solution for this.

private static String getTitle() {
    String key = "config.itemzoom.title";
    if (I18n.canTranslate(key)) {
        return I18n.translateToLocal(key).replace("%MODNAME", MOD_NAME);
    } else {
        return I18n.translateToFallback(key).replace("%MODNAME", MOD_NAME);
    }
}
mezz commented 7 years ago

Thanks! Fixed in version 1.5