Skip to content

Commit

Permalink
Add translation strings for config tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkerr committed Sep 2, 2023
1 parent 7505c47 commit fe226f4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.gradle.parallel=true
loader_version=0.14.22

# Mod Properties
mod_version = 1.5.0
mod_version = 1.5.1
maven_group = com.fwloopins
archives_base_name = tabby-1.19.4

Expand Down
21 changes: 10 additions & 11 deletions src/main/java/com/fwloopins/tabby/config/TabbyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.ConfigEntry;
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;
import org.lwjgl.glfw.GLFW;

@me.shedaniel.autoconfig.annotation.Config(name = "Tabby")
Expand All @@ -16,28 +15,28 @@ public class TabbyConfig implements ConfigData {
public Misc misc = new Misc();

public static class General {
@Comment("The maximum players that can be rendered, set to 0 for the max to always be the current online player count")
@ConfigEntry.Gui.Tooltip
public long maxCount = 0L;
@ConfigEntry.BoundedDiscrete(min = 1, max = 100)
@Comment("The maximum rows that can be rendered, this value is not used if adaptive is set to true")
@ConfigEntry.Gui.Tooltip
public int maxRows = 40;
@Comment("Set to true for the amount of rows to adapt based off how many players there are")
@ConfigEntry.Gui.Tooltip
public boolean adaptive = false;
@ConfigEntry.BoundedDiscrete(min = 1, max = 10)
@Comment("The amount to divide the players online by to determine how many rows will be rendered when adaptive is set to true\nFormula: x / y = maxRows\nWhere x is the value of maxCount and y is the adaptiveDivisor value")
@ConfigEntry.Gui.Tooltip(count = 3)
public int adaptiveDivisor = 5;
}

public static class Misc {
@Comment("Set to true to enable custom highlight colours for specific names in tab\nEdit this at .minecraft/config/Tabby/groups.json")
public boolean customColours = true;
@Comment("Change header to a custom string, leave blank for no change, write null for nothing to be rendered")
@ConfigEntry.Gui.Tooltip(count = 2)
public boolean customColours = false;
@ConfigEntry.Gui.Tooltip
public String customHeader = "";
@Comment("Change footer to a custom string, leave blank for no change, write null for nothing to be rendered")
@ConfigEntry.Gui.Tooltip
public String customFooter = "";
@Comment("Keybinding to reload certain Tabby features")
@ConfigEntry.Gui.Tooltip
public int reloadKey = GLFW.GLFW_KEY_F9;
@Comment("Set to true to enable specific debug logs\nWill spam logs")
@ConfigEntry.Gui.Tooltip(count = 2)
public boolean debug = false;
}
}
15 changes: 14 additions & 1 deletion src/main/resources/assets/tabby/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,27 @@

"text.autoconfig.Tabby.category.General": "General",
"text.autoconfig.Tabby.option.general.maxCount": "Max Count",
"text.autoconfig.Tabby.option.general.maxCount.@Tooltip": "The maximum players that can be rendered, set to 0 for the max to always be the current online player count",
"text.autoconfig.Tabby.option.general.maxRows": "Max Rows",
"text.autoconfig.Tabby.option.general.maxRows.@Tooltip": "The maximum rows that can be rendered, this value is not used if adaptive is set to true",
"text.autoconfig.Tabby.option.general.adaptive": "Adaptive",
"text.autoconfig.Tabby.option.general.adaptive.@Tooltip": "Set to true for the amount of rows to adapt based off how many players there are",
"text.autoconfig.Tabby.option.general.adaptiveDivisor": "Adaptive Divisor",
"text.autoconfig.Tabby.option.general.adaptiveDivisor.@Tooltip[0]": "The amount to divide the players online by to determine how many rows will be rendered when adaptive is set to true",
"text.autoconfig.Tabby.option.general.adaptiveDivisor.@Tooltip[1]": "Formula: x / y = maxRows",
"text.autoconfig.Tabby.option.general.adaptiveDivisor.@Tooltip[2]": "Where x is the value of maxCount and y is the adaptiveDivisor value",

"text.autoconfig.Tabby.category.Misc": "Misc",
"text.autoconfig.Tabby.option.misc.customColours": "Custom Colours",
"text.autoconfig.Tabby.option.misc.customColours.@Tooltip[0]": "Set to true to enable custom highlight colours for specific names in tab",
"text.autoconfig.Tabby.option.misc.customColours.@Tooltip[1]": "Edit this at .minecraft/config/Tabby/groups.json",
"text.autoconfig.Tabby.option.misc.customHeader": "Custom Header",
"text.autoconfig.Tabby.option.misc.customHeader.@Tooltip": "Change header to a custom string, leave blank for no change, write null for nothing to be rendered",
"text.autoconfig.Tabby.option.misc.customFooter": "Custom Footer",
"text.autoconfig.Tabby.option.misc.customFooter.@Tooltip": "Change footer to a custom string, leave blank for no change, write null for nothing to be rendered",
"text.autoconfig.Tabby.option.misc.reloadKey": "Reload Key",
"text.autoconfig.Tabby.option.misc.debug": "Debug"
"text.autoconfig.Tabby.option.misc.reloadKey.@Tooltip": "Keybinding to reload certain Tabby features",
"text.autoconfig.Tabby.option.misc.debug": "Debug",
"text.autoconfig.Tabby.option.misc.debug.@Tooltip[0]": "Set to true to enable specific debug logs",
"text.autoconfig.Tabby.option.misc.debug.@Tooltip[1]": "Will spam logs"
}

0 comments on commit fe226f4

Please sign in to comment.