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,
{ translate: 'construct.option.enabled' },
{ text: `§7 ` },
{ translate: option.howToUse }
option.howToUse
]});
} else if (changedToValue === false) {
this.player.sendMessage({ rawtext: [
@@ -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 => {
@@ -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;
}
});
@@ -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()
+1 -1
View File
@@ -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}`);
@@ -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())] },