mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +00:00
Fix missed localization
This commit is contained in:
1 parent
b1bd4a30f7
commit
ce19751ca2
15 files changed
+44
-21
No files matched your search
@@ -29,7 +29,7 @@ public class AlleleEffectNone implements IAlleleFlowerEffect {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return I18N.localise("botany.allele.none");
|
||||
return I18N.localise("forestry.allele.effect.none");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PageSpeciesOverview extends PageSpecies {
|
||||
String descBody = EnumChatFormatting.ITALIC.toString();
|
||||
String descSig = "";
|
||||
|
||||
if (desc == null || desc.isEmpty() || desc.contains("for.description.")) {
|
||||
if (desc == null || desc.isEmpty() || !desc.matches("(\\w+\\.?)+")) {
|
||||
descBody += I18N.localise("binniecore.gui.database.species.noDesc");
|
||||
} else {
|
||||
String[] descStrings = desc.split("\\|");
|
||||
|
||||
@@ -58,6 +58,6 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Acclimatiser";
|
||||
}
|
||||
}
|
||||
@@ -74,6 +74,6 @@ public class WindowAnalyser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Analyser";
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import binnie.core.craftgui.minecraft.control.ControlTabIcon;
|
||||
import binnie.core.craftgui.window.Panel;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.core.genetics.Gene;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.genetics.Engineering;
|
||||
import binnie.genetics.genetics.GeneTracker;
|
||||
@@ -82,7 +83,7 @@ public class WindowGeneBank extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle("Gene Bank");
|
||||
setTitle(getTitle());
|
||||
addEventHandler(new EventValueChanged.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventValueChanged event) {
|
||||
@@ -131,7 +132,7 @@ public class WindowGeneBank extends WindowMachine {
|
||||
}
|
||||
}
|
||||
}
|
||||
tooltip.add("" + seqGenes + "/" + totalGenes + " Genes");
|
||||
tooltip.add(I18N.localise("genetics.gui.geneBank.sequencedGenes.short", seqGenes, totalGenes));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -140,9 +141,12 @@ public class WindowGeneBank extends WindowMachine {
|
||||
tabBar.setValues(Binnie.Genetics.getActiveSystems());
|
||||
tabBar.setValue(Binnie.Genetics.beeBreedingSystem);
|
||||
boxX -= 8;
|
||||
ControlTabBar<String> infoTabs = new ControlTabBar<String>(this, boxX + 8, 160.0f, 16.0f, 50.0f, Position.LEFT);
|
||||
infoTabs.setValues(Arrays.asList("Stats", "Ranking"));
|
||||
infoTabs.setValue("Info");
|
||||
ControlTabBar<String> infoTabs = new ControlTabBar<>(this, boxX + 8, 160.0f, 16.0f, 50.0f, Position.LEFT);
|
||||
infoTabs.setValues(Arrays.asList(
|
||||
I18N.localise("genetics.gui.geneBank.stats"),
|
||||
I18N.localise("genetics.gui.geneBank.ranking")
|
||||
));
|
||||
infoTabs.setValue(I18N.localise("genetics.gui.geneBank.info"));
|
||||
Panel panelProject = new Panel(this, boxX + 24, 160.0f, geneBoxWidth + 20, 50.0f, MinecraftGUI.PanelType.Black);
|
||||
int totalGenes = 0;
|
||||
int seqGenes = 0;
|
||||
@@ -161,13 +165,13 @@ public class WindowGeneBank extends WindowMachine {
|
||||
}
|
||||
}
|
||||
|
||||
new ControlText(panelProject, new IPoint(4.0f, 4.0f), EnumChatFormatting.UNDERLINE + "Full Genome Project");
|
||||
new ControlText(panelProject, new IPoint(4.0f, 18.0f), EnumChatFormatting.ITALIC.toString() + EnumChatFormatting.YELLOW + "quenced " + EnumChatFormatting.RESET + seqGenes + "/" + totalGenes + " " + EnumChatFormatting.ITALIC + "Genes");
|
||||
new ControlText(panelProject, new IPoint(4.0f, 4.0f), EnumChatFormatting.UNDERLINE + I18N.localise("genetics.gui.geneBank.project"));
|
||||
new ControlText(panelProject, new IPoint(4.0f, 18.0f), EnumChatFormatting.ITALIC.toString() + EnumChatFormatting.YELLOW + I18N.localise("genetics.gui.geneBank.sequencedGenes", seqGenes, totalGenes));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Gene Bank";
|
||||
return I18N.localise("genetics.gui.geneBank");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,6 +70,6 @@ public class WindowGenepool extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Genepool";
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,6 @@ public class WindowIncubator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Incubator";
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,6 @@ public class WindowInoculator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Inoculator";
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,6 @@ public class WindowIsolator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Isolator";
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,6 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Polymeriser";
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,6 @@ public class WindowSequencer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Sequencer";
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,6 @@ public class WindowSplicer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return getTitle();
|
||||
return "Splicer";
|
||||
}
|
||||
}
|
||||
@@ -115,11 +115,11 @@ public class AlleleHelper extends forestry.core.genetics.alleles.AlleleHelper {
|
||||
if (flowering == EnumAllele.Flowering.AVERAGE) {
|
||||
return toAlleleDisplay("flowering", "normal");
|
||||
}
|
||||
return toAlleleDisplay("flowering", flowering.name());
|
||||
return toAlleleDisplay(null, flowering.name());
|
||||
}
|
||||
|
||||
public static String toDisplay(EnumAllele.Speed speed) {
|
||||
return toAlleleDisplay("speed", speed.name());
|
||||
return toAlleleDisplay(null, speed.name());
|
||||
}
|
||||
|
||||
public static String toDisplay(EnumAllele.Lifespan lifespan) {
|
||||
@@ -211,6 +211,9 @@ public class AlleleHelper extends forestry.core.genetics.alleles.AlleleHelper {
|
||||
|
||||
private static String toAlleleDisplay(String key, String valueName) {
|
||||
String name = valueName.toLowerCase().replace("_", "");
|
||||
if (key == null) {
|
||||
return I18N.localise("forestry.allele." + name);
|
||||
}
|
||||
return I18N.localise("forestry.allele." + key + "." + name);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user