translation working
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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())] },
|
||||||
|
|||||||
@@ -37,13 +37,14 @@ construct.instance.option.validation.description=Shows missing and incorrect blo
|
|||||||
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:
|
||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user