diff --git a/packs/BP/scripts/classes/Builder/BuilderForm.js b/packs/BP/scripts/classes/Builder/BuilderForm.js index 6b9cb3c..71e9cae 100644 --- a/packs/BP/scripts/classes/Builder/BuilderForm.js +++ b/packs/BP/scripts/classes/Builder/BuilderForm.js @@ -26,7 +26,7 @@ export class BuilderForm { option.displayName, { translate: 'construct.option.enabled' }, { text: `§7 ` }, - { translate: option.howToUse } + option.howToUse ]}); } else if (changedToValue === false) { this.player.sendMessage({ rawtext: [ diff --git a/packs/BP/scripts/classes/Instance/InstanceFormBuilder.js b/packs/BP/scripts/classes/Instance/InstanceFormBuilder.js index d6dbd5f..12cc33c 100644 --- a/packs/BP/scripts/classes/Instance/InstanceFormBuilder.js +++ b/packs/BP/scripts/classes/Instance/InstanceFormBuilder.js @@ -11,14 +11,13 @@ export class InstanceFormBuilder { const location = instance.getLocation(); const form = new ActionFormData() .title(MenuFormBuilder.menuTitle) - let body = { rawtext: [ - { translate: 'construct.instance.menu.body', with: [instance.getName(), instance.getStructureId()] }, - { text: '\n' } + const body = { rawtext: [ + { translate: 'construct.instance.menu.body', with: [instance.getName(), instance.getStructureId()] } ]}; if (instance.hasLocation()) - body.rawtext.push([ - { translate: 'construct.instance.menu.location', with: [String(location.location.x), String(location.location.y), String(location.location.z), location.dimensionId] }, - { text: '\n' } + body.rawtext.push(...[ + { text: '\n' }, + { translate: 'construct.instance.menu.location', with: [String(location.location.x), String(location.location.y), String(location.location.z), location.dimensionId] } ]); form.body(body); options.forEach(option => { diff --git a/packs/BP/scripts/classes/Materials/MaterialGrabberForm.js b/packs/BP/scripts/classes/Materials/MaterialGrabberForm.js index 1d08c2a..37a0002 100644 --- a/packs/BP/scripts/classes/Materials/MaterialGrabberForm.js +++ b/packs/BP/scripts/classes/Materials/MaterialGrabberForm.js @@ -17,7 +17,7 @@ export class MaterialGrabberForm { const selectedInstanceName = structureCollection.getInstanceNames()[response.selection]; if (selectedInstanceName) { this.setActiveInstance(selectedInstanceName); - this.player.sendMessage({ translate: 'construct.materials.grabber.menu.success' }); + this.player.sendMessage({ translate: 'construct.materials.grabber.menu.success', with: [selectedInstanceName] }); return; } }); diff --git a/packs/BP/scripts/classes/Materials/MaterialGrabberFormBuilder.js b/packs/BP/scripts/classes/Materials/MaterialGrabberFormBuilder.js index 9b6c825..1e30c93 100644 --- a/packs/BP/scripts/classes/Materials/MaterialGrabberFormBuilder.js +++ b/packs/BP/scripts/classes/Materials/MaterialGrabberFormBuilder.js @@ -4,7 +4,7 @@ import { structureCollection } from "../Structure/StructureCollection"; import { Builders } from "../Builder/Builders"; export class MaterialGrabberFormBuilder { - static menuTitle = MenuFormBuilder.menuTitle + ' Material Grabber'; + static menuTitle = { rawtext: [MenuFormBuilder.menuTitle, { translate: 'construct.materials.grabber.menu.title' }] }; static buildInstanceSelector(player) { const allInstanceNameForm = new ActionFormData() diff --git a/packs/BP/scripts/classes/MenuFormBuilder.js b/packs/BP/scripts/classes/MenuFormBuilder.js index f050406..a9a96ff 100644 --- a/packs/BP/scripts/classes/MenuFormBuilder.js +++ b/packs/BP/scripts/classes/MenuFormBuilder.js @@ -26,7 +26,7 @@ export class MenuFormBuilder { static buildAllStructures() { const allStructuresForm = new ActionFormData() .title(this.menuTitle) - .body({ translate: construct.mainmenu.selectstructure.header }); + .body({ translate: 'construct.mainmenu.selectstructure.header' }); structureCollection.getWorldStructureIds().forEach(structureId => { const structureName = structureId.replace('mystructure:', ''); allStructuresForm.button(`§2${structureName}`); diff --git a/packs/BP/scripts/classes/Structure/StructureStatistics.js b/packs/BP/scripts/classes/Structure/StructureStatistics.js index 52ab200..eeec751 100644 --- a/packs/BP/scripts/classes/Structure/StructureStatistics.js +++ b/packs/BP/scripts/classes/Structure/StructureStatistics.js @@ -46,7 +46,7 @@ export class StructureStatistics { const message = { rawtext: [] }; message.rawtext.push({ translate: 'construct.structure.statistics.header', with: [this.instance.getName()] }); if (this.instance.hasLayerSelected()) - message.rawtext.push({ translate: 'construct.instance.materials.layer', with: [String(instance.getLayer())] }); + message.rawtext.push({ translate: 'construct.instance.materials.layer', with: [String(this.instance.getLayer())] }); message.rawtext.push({ rawtext: [ { text: '\n' }, { translate: 'construct.structure.statistics.blocks', with: [String(this.getNonAirBlocks())] }, diff --git a/packs/RP/texts/en_US.lang b/packs/RP/texts/en_US.lang index 7e49806..3856b6e 100644 --- a/packs/RP/texts/en_US.lang +++ b/packs/RP/texts/en_US.lang @@ -24,58 +24,59 @@ construct.menu.instance.unknownOption=§cUnknown option: %s construct.menu.instance.nameEmpty=§cInstance name cannot be empty. construct.instance.flexibleMove.alreadyMoving=§cThis instance is already being moved. -construct.instance.flexibleMove.start=§aNow moving "%s". Use the Construct item when finished. ## Insert string: instance name -construct.instance.flexibleMove.finish=§aMoved "%1" to %2. ## Insert strings: instance name, coordinates +construct.instance.flexibleMove.start=§aNow moving "%s". Use the Construct item when finished. ## Insert string: instance name +construct.instance.flexibleMove.finish=§aMoved "%1" to %2. ## Insert strings: instance name, coordinates construct.instance.rename.error=§cError renaming instance: %s construct.instance.validation.alreadyRunning=§cA verification is already in progress. Please wait until it finishes. construct.instance.validation.formfail=§cFailed to build statistics form. -construct.instance.menu.body=Instance: §a%1\n§fStructure: §2%2 ## Insert strings: instance name, structure name -construct.instance.menu.location=§7(%1 %2 %3 in %4) ## Is added to the body when the instance has is placed. Insert strings: x, y, z coordinates, dimension +construct.instance.menu.body=Instance: §a%1\n§fStructure: §2%2 ## Insert strings: instance name, structure name +construct.instance.menu.location=§7(%1 %2 %3 in %4) ## Is added to the body when the instance has is placed. Insert strings: x, y, z coordinates, dimension construct.isntance.menu.rename=Enter a new name for the instance: construct.instance.option.validation=Block Validation construct.instance.option.validation.description=Shows missing and incorrect block overlay. construct.instance.option.layer=Layer construct.instance.option.layer.description=Changes the active layer. Use 0 for all layers. construct.instance.materials.noinventory=§cNo player inventory found. -construct.instance.materials.missing.header=`§cMaterials Missing From Inventory: +construct.instance.materials.missing.header=§cMaterials Missing From Inventory: construct.instance.materials.missing.button=Show Missing Materials -construct.instance.materials.layer= §7(layer %s) ## Is added to the header when the instance is in layer mode. Insert string: layer number +construct.instance.materials.layer= §7(layer %s) ## Is added to the header when the instance is in layer mode. Insert string: layer number construct.instance.materials.all.header=§aAll Materials: construct.instance.materials.all.button=Show All Materials -construct.materials.grabber.menu.success=§7Selected instance for material grabber: §2%s +construct.materials.grabber.menu.title= Material Grabber +construct.materials.grabber.menu.success=§7Selected instance for material grabber: §2%s ## Insert string: instance name construct.materials.grabber.menu.header=§7Current instance: construct.materials.grabber.menu.noinstance=§7None construct.materials.grabber.menu.selectinstance=§7Select an instance: -construct.structure.statistics.header=§fStatistics for §a%s§f: ## Insert string: instance name -construct.structure.statistics.blocks=§7Blocks: §2%s ## Insert string: number of non-air blocks in the structure -construct.structure.statistics.skipped=§c[!] This analysis skipped %s blocks. ## Insert string: number of blocks the analysis skipped -construct.structure.statistics.correct=§7Correct: §a%s ## Insert string: number of correctly placed blocks -construct.structure.statistics.stateincorrect=§7Block State Incorrect: §e%s ## Insert string: number of incorrectly stated blocks -construct.structure.statistics.incorrect=§7Incorrect: §c%s ## Insert string: number of incorrectly placed blocks -construct.structure.statistics.missing=§7Missing: §3%s ## Insert string: number of missing blocks +construct.structure.statistics.header=§fStatistics for §a%s§f: ## Insert string: instance name +construct.structure.statistics.blocks=§7Blocks: §2%s ## Insert string: number of non-air blocks in the structure +construct.structure.statistics.skipped=§c[!] This analysis skipped %s blocks. ## Insert string: number of blocks the analysis skipped +construct.structure.statistics.correct=§7Correct: §a%s ## Insert string: number of correctly placed blocks +construct.structure.statistics.stateincorrect=§7Block State Incorrect: §e%s ## Insert string: number of incorrectly stated blocks +construct.structure.statistics.incorrect=§7Incorrect: §c%s ## Insert string: number of incorrectly placed blocks +construct.structure.statistics.missing=§7Missing: §3%s ## Insert string: number of missing blocks ## Structure Block Info Display construct.blockinfo.header=Structure: construct.blockinfo.none=§7None -construct.blockinfo.nosupply= §c[No Supply] ## When the targeted block is not in the player's inventory +construct.blockinfo.nosupply= §c[No Supply] ## When the targeted block is not in the player's inventory construct.blockinfo.unknown=§7Unknown construct.blockinfo.waterlogged=§7isWaterlogged: §3true -construct.mainmenu.instance.exists=§cInstance '%s' already exists. Try again with a new name. ## Insert string: instance name -construct.mainmenu.instance.notfound=§cStructure ID '%s' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again. ## Insert string: structure name -construct.mainmenu.title=§l§2Construct ## This is the name of the pack. +construct.mainmenu.instance.exists=§cInstance '%s' already exists. Try again with a new name. ## Insert string: instance name +construct.mainmenu.instance.notfound=§cStructure ID '%s' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again. ## Insert string: structure name +construct.mainmenu.title=§l§2Construct ## This is the name of the pack. construct.mainmenu.selectinstance=Select an instance: construct.mainmenu.settings=Builder Settings construct.mainmenu.newinstance=Create New Instance construct.mainmenu.newinstance.prompt=Enter a name for the new instance: -construct.mainmenu.newinstance.placeholder=example_instance ## The placeholder text in the textbox where the user enters the instance name. +construct.mainmenu.newinstance.placeholder=example_instance ## The placeholder text in the textbox where the user enters the instance name. construct.mainmenu.selectstructure.header=Select a structure: construct.mainmenu.selectstructure.other=Other construct.mainmenu.selectstructure.howto=How to Add/Remove Structures construct.mainmenu.selectstructure.other.prompt=Enter the Structure ID: -construct.mainmenu.selectstructure.other.placeholder=example_structure ## The placeholder text in the textbox where the user enters the structure name. +construct.mainmenu.selectstructure.other.placeholder=example_structure ## The placeholder text in the textbox where the user enters the structure name. construct.mainmenu.selectstructure.howto.add.header=§aHow to Add Structures: construct.mainmenu.selectstructure.howto.add.structureblock=§7- Save a structure using a §fstructure block§7 or the §f/structure§7 command. construct.mainmenu.selectstructure.howto.add.or=§7§lOR§r @@ -91,8 +92,8 @@ construct.commands.item.fail=§cFailed to give you the Construct item. construct.commands.item.success=§aYou recieved the Construct item! Use it to open the Construct menu. ## Options -construct.option.enabled=is now enabled! -construct.option.disabled=is now disabled. +construct.option.enabled= is now enabled! +construct.option.disabled= is now disabled. construct.option.easyplace.name=Easy Place construct.option.easyplace.description=Always place the correct structure block. construct.option.easyplace.howto=Hold the Easy Place item in your offhand and place blocks in an instance to have them be corrected automatically. @@ -105,4 +106,4 @@ construct.option.materialgrabber.description=Pulls structure items from inventor construct.option.materialgrabber.howto=Interact with inventories using the Material Grabber item to pull structure items from them. construct.option.materialgrabber.grabbed.zero=§7Grabbed 0 items. construct.option.materialgrabber.grabbed.one=§aGrabbed 1 item. -construct.option.materialgrabber.grabbed.many=§aGrabbed %s items. ## Insert string: number of items transferred to the player \ No newline at end of file +construct.option.materialgrabber.grabbed.many=§aGrabbed %s items. ## Insert string: number of items transferred to the player \ No newline at end of file