translation working

This commit is contained in:
ForestOfLight
2025-12-14 13:43:47 -08:00
Unverified
parent dcc9704078
commit 1249a894e4
7 changed files with 34 additions and 34 deletions
@@ -26,7 +26,7 @@ export class BuilderForm {
option.displayName, option.displayName,
{ translate: 'construct.option.enabled' }, { translate: 'construct.option.enabled' },
{ text: `§7 ` }, { text: `§7 ` },
{ translate: option.howToUse } option.howToUse
]}); ]});
} else if (changedToValue === false) { } else if (changedToValue === false) {
this.player.sendMessage({ rawtext: [ this.player.sendMessage({ rawtext: [
@@ -11,14 +11,13 @@ export class InstanceFormBuilder {
const location = instance.getLocation(); const location = instance.getLocation();
const form = new ActionFormData() const form = new ActionFormData()
.title(MenuFormBuilder.menuTitle) .title(MenuFormBuilder.menuTitle)
let body = { rawtext: [ const body = { rawtext: [
{ translate: 'construct.instance.menu.body', with: [instance.getName(), instance.getStructureId()] }, { translate: 'construct.instance.menu.body', with: [instance.getName(), instance.getStructureId()] }
{ text: '\n' }
]}; ]};
if (instance.hasLocation()) if (instance.hasLocation())
body.rawtext.push([ 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' },
{ 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); form.body(body);
options.forEach(option => { options.forEach(option => {
@@ -17,7 +17,7 @@ export class MaterialGrabberForm {
const selectedInstanceName = structureCollection.getInstanceNames()[response.selection]; const selectedInstanceName = structureCollection.getInstanceNames()[response.selection];
if (selectedInstanceName) { if (selectedInstanceName) {
this.setActiveInstance(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; return;
} }
}); });
@@ -4,7 +4,7 @@ import { structureCollection } from "../Structure/StructureCollection";
import { Builders } from "../Builder/Builders"; import { Builders } from "../Builder/Builders";
export class MaterialGrabberFormBuilder { export class MaterialGrabberFormBuilder {
static menuTitle = MenuFormBuilder.menuTitle + ' Material Grabber'; static menuTitle = { rawtext: [MenuFormBuilder.menuTitle, { translate: 'construct.materials.grabber.menu.title' }] };
static buildInstanceSelector(player) { static buildInstanceSelector(player) {
const allInstanceNameForm = new ActionFormData() const allInstanceNameForm = new ActionFormData()
+1 -1
View File
@@ -26,7 +26,7 @@ export class MenuFormBuilder {
static buildAllStructures() { static buildAllStructures() {
const allStructuresForm = new ActionFormData() const allStructuresForm = new ActionFormData()
.title(this.menuTitle) .title(this.menuTitle)
.body({ translate: construct.mainmenu.selectstructure.header }); .body({ translate: 'construct.mainmenu.selectstructure.header' });
structureCollection.getWorldStructureIds().forEach(structureId => { structureCollection.getWorldStructureIds().forEach(structureId => {
const structureName = structureId.replace('mystructure:', ''); const structureName = structureId.replace('mystructure:', '');
allStructuresForm.button(`§2${structureName}`); allStructuresForm.button(`§2${structureName}`);
@@ -46,7 +46,7 @@ export class StructureStatistics {
const message = { rawtext: [] }; const message = { rawtext: [] };
message.rawtext.push({ translate: 'construct.structure.statistics.header', with: [this.instance.getName()] }); message.rawtext.push({ translate: 'construct.structure.statistics.header', with: [this.instance.getName()] });
if (this.instance.hasLayerSelected()) 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: [ message.rawtext.push({ rawtext: [
{ text: '\n' }, { text: '\n' },
{ translate: 'construct.structure.statistics.blocks', with: [String(this.getNonAirBlocks())] }, { translate: 'construct.structure.statistics.blocks', with: [String(this.getNonAirBlocks())] },
+24 -23
View File
@@ -24,58 +24,59 @@ construct.menu.instance.unknownOption=§cUnknown option: %s
construct.menu.instance.nameEmpty=§cInstance name cannot be empty. construct.menu.instance.nameEmpty=§cInstance name cannot be empty.
construct.instance.flexibleMove.alreadyMoving=§cThis instance is already being moved. 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.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.finish=§aMoved "%1" to %2. ## Insert strings: instance name, coordinates
construct.instance.rename.error=§cError renaming instance: %s 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.alreadyRunning=§cA verification is already in progress. Please wait until it finishes.
construct.instance.validation.formfail=§cFailed to build statistics form. 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.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.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.isntance.menu.rename=Enter a new name for the instance:
construct.instance.option.validation=Block Validation construct.instance.option.validation=Block Validation
construct.instance.option.validation.description=Shows missing and incorrect block overlay. construct.instance.option.validation.description=Shows missing and incorrect block overlay.
construct.instance.option.layer=Layer construct.instance.option.layer=Layer
construct.instance.option.layer.description=Changes the active layer. Use 0 for all layers. 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.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.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.header=§aAll Materials:
construct.instance.materials.all.button=Show All 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.header=§7Current instance:
construct.materials.grabber.menu.noinstance=§7None construct.materials.grabber.menu.noinstance=§7None
construct.materials.grabber.menu.selectinstance=§7Select an instance: construct.materials.grabber.menu.selectinstance=§7Select an instance:
construct.structure.statistics.header=§fStatistics for §a%s§f: ## Insert string: instance name 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.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.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.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.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.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.missing=§7Missing: §3%s ## Insert string: number of missing blocks
## Structure Block Info Display ## Structure Block Info Display
construct.blockinfo.header=Structure: construct.blockinfo.header=Structure:
construct.blockinfo.none=§7None 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.unknown=§7Unknown
construct.blockinfo.waterlogged=§7isWaterlogged: §3true 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.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.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.title=§l§2Construct ## This is the name of the pack.
construct.mainmenu.selectinstance=Select an instance: construct.mainmenu.selectinstance=Select an instance:
construct.mainmenu.settings=Builder Settings construct.mainmenu.settings=Builder Settings
construct.mainmenu.newinstance=Create New Instance construct.mainmenu.newinstance=Create New Instance
construct.mainmenu.newinstance.prompt=Enter a name for the 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.header=Select a structure:
construct.mainmenu.selectstructure.other=Other construct.mainmenu.selectstructure.other=Other
construct.mainmenu.selectstructure.howto=How to Add/Remove Structures construct.mainmenu.selectstructure.howto=How to Add/Remove Structures
construct.mainmenu.selectstructure.other.prompt=Enter the Structure ID: 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.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.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 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. construct.commands.item.success=§aYou recieved the Construct item! Use it to open the Construct menu.
## Options ## Options
construct.option.enabled=is now enabled! construct.option.enabled= is now enabled!
construct.option.disabled=is now disabled. construct.option.disabled= is now disabled.
construct.option.easyplace.name=Easy Place construct.option.easyplace.name=Easy Place
construct.option.easyplace.description=Always place the correct structure block. 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. 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.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.zero=§7Grabbed 0 items.
construct.option.materialgrabber.grabbed.one=§aGrabbed 1 item. 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 construct.option.materialgrabber.grabbed.many=§aGrabbed %s items. ## Insert string: number of items transferred to the player