aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-30 18:34:52 +0100
committerLinnea Gräf <nea@nea.moe>2024-10-30 18:41:15 +0100
commitb11b12585d3e4dfd67f73beebf7cf950799f087c (patch)
tree5b695f0c03b5e66c65d28092192031cab5f910fb /src/main
parentc9c25b61560e6fb4e1ba2dfb1d5cc61b0ec9ddab (diff)
downloadFirmament-b11b12585d3e4dfd67f73beebf7cf950799f087c.tar.gz
Firmament-b11b12585d3e4dfd67f73beebf7cf950799f087c.tar.bz2
Firmament-b11b12585d3e4dfd67f73beebf7cf950799f087c.zip
Add mc auto translations
[no changelog]
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/commands/rome.kt12
-rw-r--r--src/main/kotlin/util/textutil.kt4
-rw-r--r--src/main/resources/assets/firmament/lang/en_us.json245
3 files changed, 11 insertions, 250 deletions
diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt
index 8fcbd77..39053d2 100644
--- a/src/main/kotlin/commands/rome.kt
+++ b/src/main/kotlin/commands/rome.kt
@@ -31,6 +31,7 @@ import moe.nea.firmament.util.accessors.messages
import moe.nea.firmament.util.collections.InstanceList
import moe.nea.firmament.util.collections.WeakCache
import moe.nea.firmament.util.mc.SNbtFormatter
+import moe.nea.firmament.util.tr
import moe.nea.firmament.util.unformattedString
@@ -262,15 +263,16 @@ fun firmamentCommand() = literal("firmament") {
}
thenLiteral("events") {
thenExecute {
- source.sendFeedback(Text.translatable("firmament.event.start"))
+ source.sendFeedback(tr("firmament.event.start", "Event Bus Readout:"))
FirmamentEventBus.allEventBuses.forEach { eventBus ->
- source.sendFeedback(Text.translatable(
+ val prefixName = eventBus.eventType.typeName.removePrefix("moe.nea.firmament")
+ source.sendFeedback(tr(
"firmament.event.bustype",
- eventBus.eventType.typeName.removePrefix("moe.nea.firmament")))
+ "- $prefixName:"))
eventBus.handlers.forEach { handler ->
- source.sendFeedback(Text.translatable(
+ source.sendFeedback(tr(
"firmament.event.handler",
- handler.label))
+ " * ${handler.label}"))
}
}
}
diff --git a/src/main/kotlin/util/textutil.kt b/src/main/kotlin/util/textutil.kt
index a6a7e87..3687743 100644
--- a/src/main/kotlin/util/textutil.kt
+++ b/src/main/kotlin/util/textutil.kt
@@ -164,3 +164,7 @@ fun Text.transformEachRecursively(function: (Text) -> Text): Text {
}
}
}
+
+fun tr(key: String, default: String): Text = error("Compiler plugin did not run.")
+fun trResolved(key: String, vararg args: Any) = Text.translatable(key, *args)
+
diff --git a/src/main/resources/assets/firmament/lang/en_us.json b/src/main/resources/assets/firmament/lang/en_us.json
deleted file mode 100644
index 125b49f..0000000
--- a/src/main/resources/assets/firmament/lang/en_us.json
+++ /dev/null
@@ -1,245 +0,0 @@
-{
- "firmament.dev.resourcerebuild.start": "Invoking gradle resource rebuild (./gradlew :processResources)",
- "firmament.dev.resourcerebuild.done": "Gradle resource rebuild done in %s",
- "firmament.command.toggle.no-config-found": "Could not find config %s",
- "firmament.command.toggle.no-property-found": "Could not find property %s",
- "firmament.command.toggle.not-a-toggle": "Property %s is not a toggle",
- "firmament.command.toggle.toggled": "Toggled %s / %s %s",
- "firmament.command.waypoint.import": "Imported %s waypoints from clipboard.",
- "firmament.command.waypoint.import.error": "Could not import waypoints from clipboard. Make sure they are on ColeWeight format:\n[{\"x\": 69, \"y\":420, \"z\": 36}]",
- "firmament.command.waypoint.clear": "Cleared waypoints.",
- "firmament.command.waypoint.added": "Added waypoint %s %s %s.",
- "firmament.command.waypoint.remove": "Removed waypoint %s. Other waypoints may have different indexes now.",
- "firmament.command.waypoint.remove.error": "Could not find waypoint with that index to delete.",
- "firmament.command.waypoint.skip.error": "Could not skip a waypoint. Are you in ordered waypoint mode with waypoints loaded?",
- "firmament.command.waypoint.skip": "Skipped 1 waypoint",
- "firmament.poweruser.entity.fail": "No entity found under cursor",
- "firmament.poweruser.entity.type": "Entity Type: %s",
- "firmament.poweruser.entity.name": "Entity Name: %s",
- "firmament.poweruser.entity.position": "Position: %s",
- "firmament.poweruser.entity.armor": "Entity Armor:",
- "firmament.poweruser.entity.armor.item": " - %s",
- "firmament.poweruser.entity.passengers": "%s Passengers",
- "firmament.mixins.start": "Applied firmament mixins:",
- "firmament.event.start": "Event Bus Readout:",
- "firmament.event.bustype": " - %s:",
- "firmament.event.handler": " * %s",
- "firmament.config.all-configs": "- All Configs -",
- "firmament.config.anniversary": "Anniversary Features",
- "firmament.config.anniversary.shiny-pigs": "Shiny Pigs Tracker",
- "firmament.config.anniversary.pig-hud": "Pig Tracker Hud",
- "firmament.pristine-profit.collection": "Collection: %s/h",
- "firmament.pristine-profit.money": "Money: %s/h",
- "firmament.toggle.true": "On",
- "firmament.toggle.false": "Off",
- "firmament.config.developer": "Developer Settings",
- "firmament.config.developer.auto-rebuild": "Automatically rebuild resources",
- "firmament.price": "Checking price for %s",
- "firmament.price.bazaar": "Bazaar stats:",
- "firmament.price.bazaar.productid": "Stock id: %s",
- "firmament.price.bazaar.buy.price": "Buy Price: %s",
- "firmament.price.bazaar.buy.order": "Buy orders: %d",
- "firmament.tooltip.bazaar.sell-order": "Bazaar Sell Order: %s",
- "firmament.tooltip.bazaar.buy-order": "Bazaar Buy Order: %s",
- "firmament.tooltip.ah.lowestbin": "Lowest BIN: %d",
- "firmament.pv.pets": "Pets",
- "firmament.reiwarning.disable": "Click here to disable this warning",
- "firmament.reiwarning.disabled": "Disabled the RoughlyEnoughItems warning. Keep in mind that you will not have an item list without REI.",
- "firmament.download": "Click here to download %s",
- "firmament.download.already": " (Already downloaded)",
- "firmament.reiwarning": "Firmament needs RoughlyEnoughItems to display its item list!",
- "firmament.config.diana": "Diana",
- "firmament.config.diana.ancestral-teleport": "Warp near guess",
- "firmament.config.diana.ancestral-spade": "Ancestral Spade Solver",
- "firmament.config.diana.nearby-waypoints": "Nearby Waypoints Highlighter",
- "firmament.config.pristine-profit": "Pristine Profit Tracker",
- "firmament.config.pristine-profit.timeout": "Timeout (0 = disabled)",
- "firmament.config.pristine-profit.position": "Position",
- "firmament.debug.skyblockid": "SkyBlock ID: %s",
- "firmament.debug.skyblockid.copy": "Click to copy SkyBlock ID",
- "firmament.price.bazaar.sell.price": "Sell Price: %s",
- "firmament.price.bazaar.sell.order": "Sell orders: %d",
- "firmament.price.lowestbin": "Lowest BIN: %s",
- "firmament.repo.reload.network": "Trying to redownload the repository",
- "firmament.repo.reload.disk": "Reloading repository from disk. This may lag a bit.",
- "firmament.repo.cache": "Recaching items",
- "firmament.repo.brokenitem": "Failed to render item: %s",
- "firmament.config.auto-completions": "Hypixel Command Improvements",
- "firmament.config.auto-completions.warp-complete": "Auto Complete /warp",
- "firmament.config.auto-completions.warp-is": "Redirect /warp is to /warp island",
- "firmanent.config.edit": "Edit",
- "firmament.config.carnival": "Carnival Features",
- "firmament.config.carnival.bombs-solver": "Bombs Solver",
- "firmament.config.carnival.tutorials": "Tutorial Reminder",
- "firmament.carnival.tutorial.minesweeper": "§eClick here to check out Firmaments Tutorial for this minigame!",
- "firmament.config.repo": "Firmament Repo Settings",
- "firmament.config.repo.autoUpdate": "Auto Update",
- "firmament.config.repo.username": "Repo Username",
- "firmament.config.repo.username.hint": "NotEnoughUpdates",
- "firmament.config.repo.reponame": "Repo Name",
- "firmament.config.repo.reponame.hint": "NotEnoughUpdates-REPO",
- "firmament.config.configconfig.enable-yacl": "Use YACL Config",
- "firmament.config.repo.branch": "Repo Branch",
- "firmament.config.configconfig": "Firmaments Config",
- "firmament.config.commissions": "Commissions",
- "firmament.config.commissions.highlight-completed": "Highlight Completed",
- "firmament.config.repo.branch.hint": "dangerous",
- "firmament.config.repo.reset": "Reset",
- "firmament.config.repo.disable-item-groups": "Disable Item Groups",
- "firmament.config.repo.enable-super-craft": "Always use Super Craft",
- "firmament.config.repo.reload": "Reload Item List",
- "firmament.config.repo.redownload": "Redownload Item List",
- "firmament.config.pets": "Pets",
- "firmament.config.pets.highlight-pet": "Highlight active pet",
- "firmament.config.category.misc": "Miscellaneous",
- "firmament.config.category.mining": "Mining",
- "firmament.config.category.events": "Events",
- "firmament.config.category.chat": "Chat",
- "firmament.config.category.inventory": "Inventory",
- "firmament.config.category.integrations": "Integrations & Textures",
- "firmament.config.category.meta": "Meta & Firmament",
- "firmament.config.category.dev": "Developer & Debug",
- "firmament.ursa.debugrequest.start": "Ursa request launched",
- "firmament.hotmpreset.openinghotm": "Opening /hotm menu for export.",
- "firmament.hotmpreset.scrollprompt": "We need to scroll! Please click anywhere to continue.",
- "firmament.hotmpreset.scrolled": "Just scrolled. Waiting on server to update items.",
- "firmament.hotmpreset.copied": "Collected all HOTM perks to clipboard. Use /firm importhotm to import.",
- "firmament.hotmpreset.okayimport": "Imported a HOTM perk preset.",
- "firmament.hotmpreset.failedimport": "Could not find a HOTM perk preset in your clipboard. You can export your current HOTM perks with /firm exporthotm",
- "firmament.ursa.debugrequest.result": "Ursa request succeeded: %s",
- "firmament.sbinfo.nolocraw": "No locraw data available",
- "firmament.sbinfo.profile": "Current profile cutename: %s",
- "firmament.sbinfo.server": "Locraw Server: %s",
- "firmament.sbinfo.gametype": "Locraw Gametype: %s",
- "firmament.sbinfo.mode": "Locraw Mode: %s",
- "firmament.sbinfo.map": "Locraw Map: %s",
- "firmament.config.price-data": "Price data",
- "firmament.config.price-data.enable-always": "Enable Item Price",
- "firmament.config.price-data.enable-keybind": "Enable only with Keybinding",
- "firmament.config.fairy-souls": "Fairy Souls",
- "firmament.config.fairy-souls.show": "Show Fairy Soul Waypoints",
- "firmament.config.fairy-souls.reset": "Reset Collected Fairy Souls",
- "firmament.config.fishing-warning": "Fishing Warning",
- "firmament.config.fishing-warning.display-warning": "Display a warning when you are about to hook a fish",
- "firmament.config.fishing-warning.highlight-wake-chain": "Highlight fishing particles",
- "firmament.protectitem": "Firmament protected your item: ",
- "firmament.inventory-buttons.save-preset": "Save Preset",
- "firmament.inventory-buttons.load-preset": "Load Preset",
- "firmament.inventory-buttons.import-failed": "One of your buttons could only be imported partially",
- "firmament.config.inventory-buttons": "Inventory buttons",
- "firmament.config.inventory-buttons.open-editor": "Open Editor",
- "firmament.warp-util.mark-excluded": "Firmament: Tried to warp to %s, but it was not unlocked. I will avoid warping there again.",
- "firmament.waypoint.temporary": "Temporary Waypoint: %s",
- "firmament.config.waypoints": "Waypoints",
- "firmament.config.waypoints.temp-waypoint-duration": "Temporary Waypoint Duration",
- "firmament.config.waypoints.show-index": "Show ordered waypoint indexes",
- "firmament.config.waypoints.skip-to-nearest": "Allow skipping waypoints",
- "firmament.recipe.forge.time": "Forging Time: %s",
- "firmament.recipe.mobs.drops": "§e§lDrop Chance: %s",
- "firmament.recipe.mobs.name": "§8[§7Lv %d§8] §c%s",
- "firmament.recipe.mobs.name.nolevel": "§c%s",
- "firmament.recipe.mobs.coins": "§eCoins: %s",
- "firmament.recipe.mobs.combat": "§bCombat Experience: %s",
- "firmament.recipe.mobs.exp": "§6Experience: %s",
- "firmament.pv.skills": "Skills",
- "firmament.pv.skills.farming": "Farming",
- "firmament.pv.skills.foraging": "Foraging",
- "firmament.pv.skills.mining": "Mining",
- "firmament.pv.skills.alchemy": "Alchemy",
- "firmament.pv.skills.taming": "Taming",
- "firmament.pv.skills.fishing": "Fishing",
- "firmament.pv.skills.runecrafting": "Runecrafting",
- "firmament.pv.skills.carpentry": "Carpentry",
- "firmament.pv.skills.combat": "Combat",
- "firmament.pv.skills.social": "Social",
- "firmament.pv.skills.rift": "Rift",
- "firmament.pv.skills.enchanting": "Enchanting",
- "firmament.pv.skills.total": "Total Exp: %s",
- "firmament.pv.lookingup": "Looking up %s",
- "firmament.pv.noprofile": "%s has no SkyBlock profiles",
- "firmament.pv.noplayer": "%s is not a Minecraft player",
- "firmament.config.save-cursor-position.enable": "Enable",
- "firmament.config.save-cursor-position.tolerance": "Tolerance",
- "firmament.config.save-cursor-position": "Save Cursor Position",
- "firmament.config.storage-overlay": "Storage Overlay",
- "firmament.config.storage-overlay.rows": "Columns",
- "firmament.config.storage-overlay.always-replace": "Always Open Overlay",
- "firmament.config.storage-overlay.padding": "Padding",
- "firmament.config.storage-overlay.scroll-speed": "Scroll Speed",
- "firmament.config.storage-overlay.inverse-scroll": "Invert Scroll",
- "firmament.config.storage-overlay.margin": "Margin",
- "firmament.config.chat-links": "Chat Links",
- "firmament.config.chat-links.links-enabled": "Enable Clickable Links",
- "firmament.config.chat-links.image-enabled": "Enable Image Preview",
- "firmament.config.chat-links.allow-all-hosts": "Allow all Image Hosts",
- "firmament.config.chat-links.allowed-hosts": "Allowed Image Hosts",
- "firmament.config.chat-links.position": "Chat Image Preview",
- "firmament.config.item-rarity-cosmetics": "Item Rarity Cosmetics",
- "firmament.config.item-rarity-cosmetics.background": "Slot Background Rarity",
- "firmament.config.item-rarity-cosmetics.background-hotbar": "Hotbar Background Rarity",
- "firmament.hud.edit": "Edit %s",
- "firmament.key.category": "Firmament",
- "firmament.keybinding.external": "%s",
- "firmament.config.slot-locking": "Slot Locking",
- "firmament.config.slot-locking.lock": "Lock Slot",
- "firmament.config.slot-locking.lock-uuid": "Lock UUID (Lock Item)",
- "firmament.config.slot-locking.bind": "Bind Slot",
- "firmament.config.slot-locking.require-quick-move": "Require Shift-Click for Bound Slots",
- "firmament.config.fixes.auto-sprint": "Auto Sprint",
- "firmament.config.fixes.auto-sprint-keybinding": "Auto Sprint KeyBinding",
- "firmament.config.fixes.auto-sprint-hud": "Sprint State Hud",
- "firmament.config.fixes.peek-chat": "Peek Chat",
- "firmament.config.fixes.clientside-lefthand": "Fix Left Handed",
- "firmament.fixes.auto-sprint.on": "Sprint toggled",
- "firmament.fixes.auto-sprint.sprinting": "Sprinting",
- "firmament.fixes.auto-sprint.not-sprinting": "Not Sprinting",
- "firmament.recipe.novanilla": "Hypixel cannot super craft vanilla recipes",
- "firmament.config.custom-skyblock-textures": "Custom SkyBlock Item Textures",
- "firmament.config.custom-skyblock-textures.cache-duration": "Model Cache Duration",
- "firmament.config.custom-skyblock-textures.model-overrides": "Enable model overrides/predicates",
- "firmament.config.custom-skyblock-textures.legacy-cit": "Enable legacy CIT Resewn compat",
- "firmament.config.custom-skyblock-textures.recolor-text": "Allow packs to recolor text",
- "firmament.config.custom-skyblock-textures.armor-overrides": "Enable Armor re-texturing",
- "firmament.config.custom-skyblock-textures.block-overrides": "Enable Block re-modelling",
- "firmament.config.custom-skyblock-textures.enabled": "Enable Custom Item Textures",
- "firmament.config.custom-skyblock-textures.skulls-enabled": "Enable Custom Placed Skull Textures",
- "firmament.config.custom-skyblock-textures.cache-forever": "Disable cache clearing",
- "firmament.config.fixes": "Fixes",
- "firmament.config.fixes.player-skins": "Fix unsigned Player Skins",
- "firmament.config.power-user.show-item-id": "Show SkyBlock Ids",
- "firmament.config.power-user.copy-item-id": "Copy SkyBlock Id",
- "firmament.modapi.event": "Received mod API event: %s",
- "firmament.config.power-user.copy-texture-pack-id": "Copy Texture Pack Id",
- "firmament.config.power-user.copy-skull-texture": "Copy Placed Skull Id",
- "firmament.config.power-user.entity-data": "Show Entity Data",
- "firmament.config.power-user.copy-nbt-data": "Copy ExtraAttributes data",
- "firmament.config.power-user.copy-lore": "Copy Name + Lore",
- "firmament.config.power-user.copy-item-stack": "Copy ItemStack",
- "firmament.config.power-user": "Power Users",
- "firmament.tooltip.skyblockid": "SkyBlock Id: %s",
- "firmament.tooltip.copied.skyblockid.fail": "Failed to copy SkyBlock Id",
- "firmament.tooltip.copied.skyblockid": "Copied SkyBlock Id: %s",
- "firmament.tooltip.copied.modelid.fail": "Failed to copy Texture Id",
- "firmament.tooltip.copied.modelid": "Copied Texture Id: %s",
- "firmament.tooltip.copied.skull": "Copied Skull Id: %s",
- "firmament.tooltip.copied.skull.fail": "Failed to copy skull id.",
- "firmament.tooltip.copied.nbt": "Copied NBT data",
- "firmament.tooltip.copied.lore": "Copied Name and Lore",
- "firmament.tooltip.copied.stack": "Copied ItemStack",
- "firmament.config.compatibility": "Intermod Features",
- "firmament.config.compatibility.explosion-enabled": "Redirect Enhanced Explosions",
- "firmament.config.compatibility.explosion-power": "Enhanced Explosion Power",
- "firmament.quick-commands.join.unknown": "Could not find instance for %s",
- "firmament.quick-commands.join.success": "Joining: %s",
- "firmament.quick-commands.join.explain": "Join a dungeon or kuudra floor by using commands like /join f1, /join m7, /join fe or /join khot",
- "firmament.quick-commands.join.unknown-kuudra": "Unknown kuudra floor %s",
- "firmament.quick-commands.join.unknown-catacombs": "Unknown catacombs floor %s",
- "firmament.config.pickaxe-info": "Pickaxes",
- "firmament.config.pickaxe-info.ability-cooldown": "Pickaxe Ability Cooldown",
- "firmament.config.pickaxe-info.ability-scale": "Ability Cooldown Scale",
- "firmament.config.pickaxe-info.fuel-bar": "Drill Fuel Durability Bar",
- "firmament.warp-util.no-warp-found": "Could not find an unlocked warp in %s",
- "firmament.warp-util.already-close": "Already closer to destination than /warp %s",
- "firmament.warp-util.attempting-to-warp": "Trying to warp to /warp %s",
- "firmament.warp-util.clear-excluded": "Marked all /warp commands as potentially available."
-}