diff --git a/assets/data/editors/layouts/stage/characterEditScreen.xml b/assets/data/editors/layouts/stage/characterEditScreen.xml index 2658f4ac..d5ad108d 100644 --- a/assets/data/editors/layouts/stage/characterEditScreen.xml +++ b/assets/data/editors/layouts/stage/characterEditScreen.xml @@ -1,4 +1,4 @@ - + @@ -16,7 +16,7 @@ } - + <title name="title" x="20" y="30 + 16" text="${translate('character-title')}" /> <section> <set name="curY" value="title.y + TO" /> @@ -24,51 +24,51 @@ <stepper name="xStepper" label="X" value="char.x" x="col(0)" y="curY" step="1" width="100" /> <stepper name="yStepper" label="Y" value="char.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" /> - <stepper name="scrollXStepper" label="Scroll X" value="char.scrollFactor.x" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scrollYStepper" label="Scroll Y" value="char.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scrollXStepper" label="${translate('scroll', ['X'])}" value="char.scrollFactor.x" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scrollYStepper" label="${translate('scroll', ['Y'])}" value="char.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scaleXStepper" label="Scale X" value="char.scale.x / charScale" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scaleYStepper" label="Scale Y" value="char.scale.y / charScale" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scaleXStepper" label="${translate('scale', ['X'])}" value="char.scale.x / charScale" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scaleYStepper" label="${translate('scroll', ['Y'])}" value="char.scale.y / charScale" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> </section> <section> <set name="curY" value="xStepper.y + xStepper.bHeight + YOFFSET" /> - <stepper name="camxStepper" label="Cam X" value="getEx('camX')" x="col(0)" y="curY" step="1" width="100" /> - <stepper name="camyStepper" label="Cam Y" value="getEx('camY')" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" /> + <stepper name="camxStepper" label="${translate('camera', ['X'])}" value="getEx('camX')" x="col(0)" y="curY" step="1" width="100" /> + <stepper name="camyStepper" label="${translate('camera', ['Y'])}" value="getEx('camY')" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" /> - <label name="spacingLabel" text="Spacing (X, Y)" x="col(1)" y="curY" size="15" /> + <label name="spacingLabel" text="${translate('spacing')}" x="col(1)" y="curY" size="15" /> <stepper name="spacingXStepper" value="getEx('spacingX')" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> <stepper name="spacingYStepper" value="getEx('spacingY')" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="skewXStepper" label="Skew X" value="char.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="skewYStepper" label="Skew Y" value="char.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="skewXStepper" label="${translate('skew', ['X'])}" value="char.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="skewYStepper" label="${translate('skew', ['Y'])}" value="char.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> </section> <section> <set name="curY" value="camxStepper.y + camxStepper.bHeight + YOFFSET" /> - <stepper name="alphaStepper" label="Alpha" value="char.alpha / 0.75" x="col(0)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="angleStepper" label="Angle" value="char.angle" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="alphaStepper" label="${translate('alpha')}" value="char.alpha / 0.75" x="col(0)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="angleStepper" label="${translate('angle')}" value="char.angle" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="zoomFactorStepper" label="Zoom Factor" value="char.zoomFactor" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="zoomFactorStepper" label="${translate('zoomFactor')" value="char.zoomFactor" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> <section if="!StringTools.startsWith(char.name, 'NO_DELETE_')"> - <textbox name="charName" label="Position Name" value="char.name" x="col(2)" y="curY" width="100"/> + <textbox name="charName" label="${translate('positionName')}" value="char.name" x="col(2)" y="curY" width="100"/> </section> </section> <section> <set name="curY" value="alphaStepper.y + alphaStepper.bHeight + YOFFSET - 20" /> - <checkbox name="flipXCheckbox" text="Flip X" value="char.isPlayer" x="col(0)" y="curY" /> + <checkbox name="flipXCheckbox" text="${translate('flipX')}" value="char.isPlayer" x="col(0)" y="curY" /> - <radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="getEx('highMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" /> - <radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="getEx('lowMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" /> + <radio for="memoryCheck" name="highMemoryRadio" text="${translate('highMemory')}" value="getEx('highMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" /> + <radio for="memoryCheck" name="lowMemoryRadio" text="${translate('lowMemory')}" value="getEx('lowMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" /> </section> <section if="previewSprite != null"> - <title name="previewTitle" x="20" y="self.winHeight - 220" text="Preview Transform:" size="15" /> + <title name="previewTitle" x="20" y="self.winHeight - 220" text="${translate('transformPreview')}" size="15" /> </section> <section if="previewSprite == null"> <exec> diff --git a/assets/data/editors/layouts/stage/spriteEditScreen.xml b/assets/data/editors/layouts/stage/spriteEditScreen.xml index 651756a0..5d5b7888 100644 --- a/assets/data/editors/layouts/stage/spriteEditScreen.xml +++ b/assets/data/editors/layouts/stage/spriteEditScreen.xml @@ -1,4 +1,4 @@ -<window width="1056" height="520" title="Editing Sprite ${button.getName()}"> +<window width="1056" height="520" title="${translate('win-sprite-title', [button.getName()])}"> <set name="MARGIN" value="20" /> <set name="XOFFSET" value="50" /> <set name="YOFFSET" value="40" /> @@ -17,15 +17,15 @@ } </exec> - <title name="title" x="20" y="30 + 16" text="Sprite Data" /> + <title name="title" x="20" y="30 + 16" text="${translate('sprite-title')}" /> <section> <!-- ROW 1 --> <set name="curY" value="title.y + TO" /> - <textbox name="nameTextBox" label="Name Identifier" value="button.getName()" x="col(0)" y="curY" width="200" height="32" /> + <textbox name="nameTextBox" label="${translate('nameID')}" value="button.getName()" x="col(0)" y="curY" width="200" height="32" /> <textbox name="spriteTextBox" value="getEx('imageFile')" x="last.x + last.bWidth + XOFFSET" y="curY" width="200" height="32" /> <stepper name="alphaStepper" label="Alpha" value="sprite.alpha" x="spriteTextBox.x + spriteTextBox.bWidth + XOFFSET" y="curY" precision="2" step="0.01" width="100" /> - <label name="imageFile" text="Image File (WIP: needs reload) In (${stage.spritesParentFolder})" x="spriteTextBox.x" y="spriteTextBox.y - 14" size="15" /> + <label name="imageFile" text="${translate('imageFile')}" x="spriteTextBox.x" y="spriteTextBox.y - 14" size="15" /> </section> <section> <!-- ROW 2 --> @@ -34,36 +34,36 @@ <stepper name="xStepper" label="X" value="sprite.x" x="col(0)" y="curY" step="1" width="100" /> <stepper name="yStepper" label="Y" value="sprite.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" /> - <stepper name="scrollXStepper" label="Scroll X" value="sprite.scrollFactor.x" x="spriteTextBox.x" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scrollYStepper" label="Scroll Y" value="sprite.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scrollXStepper" label="${translate('scroll', ['X'])}" value="sprite.scrollFactor.x" x="spriteTextBox.x" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scrollYStepper" label="${translate('scroll', ['Y'])}" value="sprite.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scaleXStepper" label="Scale X" value="sprite.scale.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="scaleYStepper" label="Scale Y" value="sprite.scale.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scaleXStepper" label="${translate('scale', ['X'])}" value="sprite.scale.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="scaleYStepper" label="${translate('scroll', ['Y'])}" value="sprite.scale.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> </section> <section> <!-- ROW 3 --> <set name="curY" value="xStepper.y + xStepper.bHeight + YOFFSET" /> - <stepper name="angleStepper" label="Angle" value="sprite.angle" x="col(0)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="zoomFactorStepper" label="Zoom Factor" value="sprite.zoomFactor" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="angleStepper" label="${translate('angle')}" value="sprite.angle" x="col(0)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="zoomFactorStepper" label="${translate('zoomFactor')}" value="sprite.zoomFactor" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> <!-- TODO: Simplify this --> - <dropdown name="animType" label="Animation Type" value="sprite.spriteAnimType" x="col(1)" y="curY" width="150" height="32"> - <item label="NONE" value="0" /> - <item label="BEAT" value="1" /> - <item label="LOOP" value="2" /> + <dropdown name="animType" label="${translate('animType')}" value="sprite.spriteAnimType" x="col(1)" y="curY" width="150" height="32"> + <item label="${translate('animType.none')}" value="0" /> + <item label="${translate('animType.beat')}" value="1" /> + <item label="${translate('animType.loop')}" value="2" /> </dropdown> - <stepper name="skewXStepper" label="Skew X" value="sprite.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> - <stepper name="skewYStepper" label="Skew Y" value="sprite.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="skewXStepper" label="${translate('skew', ['X'])}" value="sprite.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="skewYStepper" label="${translate('skew', ['Y'])}" value="sprite.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" /> </section> <section> <!-- ROW 4 --> <set name="curY" value="angleStepper.y + angleStepper.bHeight + YOFFSET" /> - <checkbox name="antialiasingCheckbox" text="Antialiasing" value="sprite.antialiasing" x="col(0)" y="curY" /> - <radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="getEx('highMemory')" x="col(1)" y="curY" /> - <radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="getEx('lowMemory')" x="col(2)" y="curY" /> + <checkbox name="antialiasingCheckbox" text="${translate('antialiasing')}" value="sprite.antialiasing" x="col(0)" y="curY" /> + <radio for="memoryCheck" name="highMemoryRadio" text="${translate('highMemory')}" value="getEx('highMemory')" x="col(1)" y="curY" /> + <radio for="memoryCheck" name="lowMemoryRadio" text="${translate('lowMemory')}" value="getEx('lowMemory')" x="col(2)" y="curY" /> <!-- TODO: Animation list --> </section> @@ -72,7 +72,7 @@ <set name="curY" value="title.y + TO" /> <set name="listWidth" value="250" /> - <buttonlist name="animations" label="Animations (TODO)" x="col(3)" y="curY" width="listWidth" height="330" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> + <buttonlist name="animations" label="${translate('animations')}" x="col(3)" y="curY" width="listWidth" height="330" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> <texture path="editors/ui/inputbox" /> <camSpacing value="0" /> @@ -103,14 +103,14 @@ </code> --> </buttonlist> - <text text="Tip: To access custom properties, hold shift when clicking edit" x="col(2) - 60" y="self.winHeight - 50" size="15" /> + <text text="${translate('tipCustomProperties')}" x="col(2) - 60" y="self.winHeight - 50" size="15" /> </section> <!-- Preview Transform --> <section if="previewSprite != null"> - <title name="previewTitle" x="20" y="self.winHeight - 150" text="Preview Transform:" size="15" /> + <title name="previewTitle" x="20" y="self.winHeight - 150" text="${translate('transformPreview')}" size="15" /> </section> <exec> diff --git a/assets/data/editors/layouts/stage/stageInfoScreen.xml b/assets/data/editors/layouts/stage/stageInfoScreen.xml index 1a477da8..9cfa1b28 100644 --- a/assets/data/editors/layouts/stage/stageInfoScreen.xml +++ b/assets/data/editors/layouts/stage/stageInfoScreen.xml @@ -1,4 +1,4 @@ -<window width="470" height="620" title="Editing Stage Info '${stage.stageName}'"> +<window width="470" height="620" title="${translate('win-title', [stage.stageName])}"> <set name="MARGIN" value="20" /> <set name="XOFFSET" value="50" /> <set name="YOFFSET" value="40" /> @@ -28,31 +28,31 @@ } </exec> - <title name="title" x="MARGIN" y="30 + 16" text="Stage Info" /> + <title name="title" x="MARGIN" y="30 + 16" text="${translate('title')}" /> <section> <!-- ROW 1 --> <set name="curY" value="title.y + TO" /> - <textbox name="nameTextBox" label="Stage Name" value="stage.stageName" x="col(0)" y="curY" width="200" height="32" /> + <textbox name="nameTextBox" label="${translate('stageName')}" value="stage.stageName" x="col(0)" y="curY" width="200" height="32" /> <textbox name="spritePathTextBox" value="stage.spritesParentFolder" x="col(1)" y="curY" width="200" height="32" /> - <label text="Sprite Path (Needs Refresh)" x="spritePathTextBox.x" y="spritePathTextBox.y - 14" size="15" /> + <label text="${translate('spritePath')}" x="spritePathTextBox.x" y="spritePathTextBox.y - 14" size="15" /> </section> <section> <!-- ROW 2 --> <set name="curY" value="nameTextBox.y + nameTextBox.bHeight + YOFFSET" /> - <label text="Start Cam Pos (X, Y)" x="col(0)" y="curY" /> + <label text="${translate('startCamPos')}" x="col(0)" y="curY" /> <stepper name="camxStepper" value="stage.startCam.x" x="col(0)" y="curY" step="1" width="120" /> <stepper name="camyStepper" value="stage.startCam.y" x="last.x + last.bWidth + XOFFSET - 30" y="curY" step="1" width="120" /> - <stepper name="zoomStepper" label="Zoom" value="stage.defaultZoom" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> + <stepper name="zoomStepper" label="${translate('zoom')}" value="stage.defaultZoom" x="col(1)" y="curY" precision="2" step="0.01" width="100" /> </section> <section> <set name="curY" value="camxStepper.y + camxStepper.bHeight + YOFFSET" /> <set name="listWidth" value="self.winWidth - MARGIN * 2" /> - <buttonlist name="attributesList" label="Custom Attributes" x="col(0)" y="curY" width="listWidth" height="290" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> + <buttonlist name="attributesList" label="${translate('customAttributes')}" x="col(0)" y="curY" width="listWidth" height="290" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> <texture path="editors/ui/inputbox" /> <camSpacing value="0" /> diff --git a/assets/data/editors/layouts/stage/unknownEditScreen.xml b/assets/data/editors/layouts/stage/unknownEditScreen.xml index ec6f3d71..913574ca 100644 --- a/assets/data/editors/layouts/stage/unknownEditScreen.xml +++ b/assets/data/editors/layouts/stage/unknownEditScreen.xml @@ -1,4 +1,4 @@ -<window width="350" height="570" title="Editing XML <${button.getName()} />"> +<window width="350" height="570" title="${translate('win-title', [button.getName()])}"> <set name="MARGIN" value="20" /> <set name="XOFFSET" value="30" /> <set name="YOFFSET" value="40" /> @@ -10,25 +10,25 @@ } </exec> - <title name="title" x="MARGIN" y="30 + 16" text="Xml Data" /> + <title name="title" x="MARGIN" y="30 + 16" text="${translate('title')}" /> <section> <set name="curY" value="title.y + TO" /> - <textbox name="nodeNameTextBox" label="Element Name" value="button.getName()" x="col(0)" y="curY" width="280" height="32" /> + <textbox name="nodeNameTextBox" label="${translate('elementName')}" value="button.getName()" x="col(0)" y="curY" width="280" height="32" /> </section> <section> <set name="curY" value="nodeNameTextBox.y + nodeNameTextBox.bHeight + YOFFSET - 30" /> - <radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="button.highMemory" x="col(0)" y="curY" /> - <radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="button.lowMemory" x="col(0)" y="last.y + last.check.height + YOFFSET - 30" /> + <radio for="memoryCheck" name="highMemoryRadio" text="${translate('highMemory')}" value="button.highMemory" x="col(0)" y="curY" /> + <radio for="memoryCheck" name="lowMemoryRadio" text="${translate('lowMemory')}" value="button.lowMemory" x="col(0)" y="last.y + last.check.height + YOFFSET - 30" /> </section> <section> <set name="curY" value="lowMemoryRadio.y + lowMemoryRadio.check.height + YOFFSET" /> <set name="listWidth" value="self.winWidth - MARGIN * 2" /> - <buttonlist name="attributesList" label="Attributes" x="col(0)" y="curY" width="listWidth" height="260" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> + <buttonlist name="attributesList" label="${translate('attributes')}" x="col(0)" y="curY" width="listWidth" height="260" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> <texture path="editors/ui/inputbox" /> <camSpacing value="0" /> diff --git a/assets/data/editors/layouts/stage/xmlEditScreen.xml b/assets/data/editors/layouts/stage/xmlEditScreen.xml index 7a7ac956..f5885126 100644 --- a/assets/data/editors/layouts/stage/xmlEditScreen.xml +++ b/assets/data/editors/layouts/stage/xmlEditScreen.xml @@ -1,4 +1,4 @@ -<window width="450" height="570" title="Editing XML ${type}"> +<window width="450" height="570" title="${translate('win-title', [type])}"> <!-- BASED ON unknownEditScreen.xml --> <set name="MARGIN" value="20" /> <set name="XOFFSET" value="30" /> @@ -11,13 +11,13 @@ } </exec> - <title name="title" x="MARGIN" y="30 + 16" text="Xml Data" /> + <title name="title" x="MARGIN" y="30 + 16" text="${translate('title')}" /> <section> <set name="curY" value="title.y + TO" /> <set name="listWidth" value="self.winWidth - MARGIN * 2" /> - <buttonlist name="attributesList" label="Attributes" x="col(0)" y="curY" width="listWidth" height="400" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> + <buttonlist name="attributesList" label="${translate('attributes')}" x="col(0)" y="curY" width="listWidth" height="400" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5"> <texture path="editors/ui/inputbox" /> <camSpacing value="0" /> diff --git a/assets/languages/en/Editors.xml b/assets/languages/en/Editors.xml index 419d3fa9..86ca86ac 100644 --- a/assets/languages/en/Editors.xml +++ b/assets/languages/en/Editors.xml @@ -24,19 +24,19 @@ <str id="foundAtlas">{0} Spritemap Found</str> <str id="foundAtlasplural">{0} Spritemaps Found</str> - <str id="fileAlreadyExists">The following files alreadly exist: \n\n{0}\n\nIMPORTANT: OVERRIDING CAN NOT BE UNDONE!!!!!!!!</str> + <str id="fileAlreadyExists">The following files alreadly exist: \n\n{0}\n\nIMPORTANT: OVERRIDING CAN NOT BE UNDONE!</str> <str id="override">Override Files</str> <str id="useExisting">Use Existing</str> </group> <group name="EditorPicker" prefix="editor."> + <str id="alphabet.name">Alphabet Editor</str> <str id="chart.name">Chart Editor</str> <str id="character.name">Character Editor</str> <str id="stage.name">Stage Editor</str> <str id="uiDebug.name">UI Debug State</str> <str id="wiki.name">Wiki</str> <str id="debugOptions.name">Debug Options</str> - <str id="alphabet.name">Alphabet Editor</str> </group> <group name="ChartEditor"> @@ -429,7 +429,6 @@ <str id="charImageFile">Character Image File $* Required$</str> </group> </group> - <str id="name">Character Editor</str> </group> <group name="CharacterCreationScreen" prefix="characterCreationScreen."> @@ -497,6 +496,135 @@ </group> </group> + <group name="StageEditor"> + <group name="StageSelection" prefix="stageSelection."> + <str id="desc">Select a stage to edit. HSCRIPT only stages are not supported.</str> + <str id="acceptStage">Press ACCEPT to edit this stage.</str> + <str id="newStage">New Stage</str> + <str id="acceptNewStage">Press ACCEPT to create a new stage.</str> + </group> + + <group name="StageEditor" prefix="stageEditor."> + <group name="TopBar"> + <str id="topBar.file">File</str> + <group name="FileMenu" prefix="file."> + <str id="save">Save</str> + <str id="saveAs">Save As...</str> + <str id="exit">Exit</str> + </group> + + <str id="topBar.edit">Edit</str> + <group name="EditMenu" prefix="edit."> + <str id="undo">Undo</str> + <str id="redo">Redo</str> + <str id="editStageInfo">Edit Stage Info</str> + </group> + + <str id="topBar.select">Selection</str> + <group name="SelectionMenu" prefix="select."> + <str id="all">Select All</str> + <str id="deselect">Deselect</str> + <str id="inverse">Inverse Selection</str> + </group> + + <str id="topBar.view">View</str> + <group name="ViewMenu" prefix="view."> + <str id="zoomIn">Zoom in</str> + <str id="zoomOut">Zoom out</str> + <str id="zoomReset">Reset Zoom</str> + <str id="focusDad">Focus Dad</str> + <str id="focusGF">Focus GF</str> + <str id="focusBF">Focus BF</str> + </group> + + <str id="topBar.editor">Editor</str> + <group name="EditorMenu" prefix="editor."> + <str id="showCharacters">Show Characters</str> + </group> + + <group name="StageSpriteScreen" prefix="stageSpriteScreen."> + <str id="win-title">Edit stage sprite</str> + <str id="stageImageFile">Stage Image File $* Required$</str> + </group> + </group> + </group> + + <group name="StageCreationScreen" prefix="stageCreationScreen."> + <str id="win-title">Creating New Stage</str> + <str id="title">Stage Info</str> + <str id="stageName">Stage Name</str> + <str id="stagePath">Stage Path</str> + </group> + + <group name="StageInfoScreen" prefix="stageInfoScreen"> + <str id="win-title">Editing Stage "{0}" Infos</str> + <str id="title">Stage Info</str> + <str id="stageName">Stage Name</str> + <str id="spritePath">Sprite Path\n(Needs Refresh)</str> + <str id="startCamPos">Start Camera Position (X, Y)</str> + <str id="zoom">Zoom</str> + </group> + + <group name="StageElementEditScreen" prefix="stageElementEditScreen."> + <str id="win-character-title">Editing Character "{0}"</str> + <str id="win-sprite-title">Editing Sprite "{0}"</str> + <str id="win-title">Editing XML <{0} /></str> + + <str id="character-title">Character Data</str> + <str id="sprite-title">Sprite Data</str> + <str id="title">XML Data</str> + + <str id="elementName">Element Name</str> + <str id="nameID">Name Identifier</str> + <str id="imageFile">Image File (WIP: needs reload)\nIn (${stage.spritesParentFolder})</str> + <str id="scroll">Scroll {0}</str> + <str id="scale">Scale {0}</str> + <str id="camera">Camera {0}</str> + <str id="spacing">Spacing (X, Y)</str> + <str id="skew">Skew {0}</str> + <str id="alpha">Alpha</str> + <str id="angle">Angle</str> + <str id="zoomFactor">Zoom Factor</str> + <str id="positionName">Position Name</str> + <str id="flipX">Flip X</str> + <str id="antialiasing">Antialiasing</str> + <str id="highMemory">High Memory</str> + <str id="lowMemory">Low Memory</str> + <str id="attributes">Attributes</str> + <str id="transformPreview">Transform Preview:</str> + + <str id="animType">Animation Type</str> + <group name="AnimTypeDropdown" prefix="animType."> + <str id="none">NONE</str> + <str id="beat">BEAT</str> + <str id="loop">LOOP</str> + </group> + <str id="tipCustomProperties">Tip: To access custom properties,\nHold Shift when clicking edit</str> + </group> + + <group name="StageXMLEditScreen" prefix="stageXMLEditScreen."> + <str id="win-title">Editing {0} XML</str> + <str id="title">Xml Data</str> + <str id="attributes">Attributes</str> + </group> + + <str id="stageCharacters.requiredPosition">This character position is required in stages!</str> + <str id="stageCharacters.noDeleteGirlfriend">You can't delete Girlfriend</str> + + <group name="StageElement" prefix="stageElement."> + <str id="scale">Scale: {0}, {1}</str> + <str id="scroll">Scroll: {0}, {1}</str> + </group> + + <group name="StageSprites" prefix="stageSprites."> + <str id="win-title">Stage Sprites</str> + <str id="sprite">Sprite</str> + <str id="box">Box</str> + <str id="character">Character</str> + <str id="warnings.not-implemented">Creating a box isnt implemented yet!</str> + </group> + </group> + <!-- PlayTesting and SaveWarning are almost the same but with some small differences --> <!-- PlayTesting allows color in the description by doing *hello* --> <!-- SaveWarning doesn't allow color in the description --> diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index b1e8e5b2..5885db7f 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -73,7 +73,7 @@ class CharacterEditor extends UIState { undos = new UndoList<CharacterEditorChange>(); - WindowUtils.suffix = " (" + translate("name") + ")"; + WindowUtils.suffix = " (" + TU.translate("editor.character.name") + ")"; SaveWarning.selectionClass = CharacterSelection; SaveWarning.saveFunc = () -> {_file_save(null);}; diff --git a/source/funkin/editors/stage/StageCreationScreen.hx b/source/funkin/editors/stage/StageCreationScreen.hx index 90ac7d85..5802f023 100644 --- a/source/funkin/editors/stage/StageCreationScreen.hx +++ b/source/funkin/editors/stage/StageCreationScreen.hx @@ -20,8 +20,11 @@ class StageCreationScreen extends UISubstateWindow { if (onSave != null) this.onSave = onSave; } + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageCreationScreen." + id, args); + public override function create() { - winTitle = "Creating New Stage"; + winTitle = translate("win-title"); winWidth = 748 - 32 + 40; winHeight = 220; @@ -35,13 +38,13 @@ class StageCreationScreen extends UISubstateWindow { } var stageInfo:UIText; - add(stageInfo = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, "Stage Info", 28)); + add(stageInfo = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, translate("title"), 28)); - add(stageNameTextBox = new UITextBox(stageInfo.x, stageInfo.y + stageInfo.height + 36, "Stage Name")); - addLabelOn(stageNameTextBox, "Stage Name"); + add(stageNameTextBox = new UITextBox(stageInfo.x, stageInfo.y + stageInfo.height + 36, translate("stage-name"))); + addLabelOn(stageNameTextBox, translate("stage-name")); - add(stagePathTextBox = new UITextBox(stageNameTextBox.x + 320 + 26, stageNameTextBox.y, "Stage Path")); - addLabelOn(stagePathTextBox, "Stage Path"); + add(stagePathTextBox = new UITextBox(stageNameTextBox.x + 320 + 26, stageNameTextBox.y, translate("stage-path"))); + addLabelOn(stagePathTextBox, translate("stage-path")); add(saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, TU.translate("editor.saveClose"), function() { saveStageInfo(); diff --git a/source/funkin/editors/stage/StageEditor.hx b/source/funkin/editors/stage/StageEditor.hx index 4e84894e..c865b8d7 100644 --- a/source/funkin/editors/stage/StageEditor.hx +++ b/source/funkin/editors/stage/StageEditor.hx @@ -71,6 +71,9 @@ class StageEditor extends UIState { return "stageEditor." + id; } + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageEditor." + id, args); + public function new(stage:String) { super(); if (stage != null) __stage = stage; @@ -79,47 +82,47 @@ class StageEditor extends UIState { public override function create() { super.create(); - WindowUtils.suffix = " (Stage Editor)"; + WindowUtils.suffix = " (" + TU.translate("editor.stage.name") + ")"; SaveWarning.selectionClass = StageSelection; SaveWarning.saveFunc = () -> {_file_save(null);}; topMenu = [ { - label: "File", + label: translate("topBar.file"), childs: [ { - label: "Save", + label: translate("file.save"), keybind: [CONTROL, S], onSelect: _file_save, }, { - label: "Save As...", + label: translate("file.saveAs"), keybind: [CONTROL, SHIFT, S], onSelect: _file_saveas, }, null, { - label: "Exit", + label: translate("file.exit"), onSelect: _file_exit } ] }, { - label: "Edit", + label: translate("topBar.edit"), childs: [ { - label: "Undo", + label: translate("edit.undo"), keybind: [CONTROL, Z], onSelect: _edit_undo, }, { - label: "Redo", + label: translate("edit.redo"), keybind: [CONTROL, SHIFT, Z], onSelect: _edit_redo, }, null, { - label: "Edit Stage Info", + label: translate("edit.editStageInfo"), onSelect: (_) -> { openSubState(new UISoftcodedWindow( "layouts/stage/stageInfoScreen", @@ -130,7 +133,10 @@ class StageEditor extends UIState { "stage" => stage, "Stage" => Stage, "exID" => exID, - "CEditInfo" => StageChange.CEditInfo + "CEditInfo" => StageChange.CEditInfo, + "translate" => function (id:String, ?args:Array<Dynamic>) { + return TU.translate("stageInfoScreen." + id, args); + } ] )); }, @@ -138,56 +144,56 @@ class StageEditor extends UIState { ] }, { - label: "Select", + label: translate("topBar.select"), childs: [ { - label: "All", + label: translate("select.all"), keybind: [CONTROL, A], onSelect: (_) -> _select_all(_), }, { - label: "Deselect", + label: translate("select.deselect"), keybind: [CONTROL, D], onSelect: (_) -> _select_deselect(_), }, { - label: "Inverse", + label: translate("select.inverse"), keybind: [CONTROL, SHIFT, I], onSelect: (_) -> _select_inverse(_), }, ] }, { - label: "View", + label: translate("topBar.view"), childs: [ { - label: "Zoom in", + label: translate("view.zoomIn"), keybind: [CONTROL, NUMPADPLUS], onSelect: _view_zoomin }, { - label: "Zoom out", + label: translate("view.zoomOut"), keybind: [CONTROL, NUMPADMINUS], onSelect: _view_zoomout }, { - label: "Reset zoom", + label: translate("view.zoomReset"), keybind: [CONTROL, NUMPADZERO], onSelect: _view_zoomreset }, null, { - label: "Focus Dad", + label: translate("view.focusDad"), //keybind: [CONTROL, NUMPADZERO], onSelect: _view_focusdad }, { - label: "Focus Gf", + label: translate("view.focusGF"), //keybind: [CONTROL, NUMPADZERO], onSelect: _view_focusgf }, { - label: "Focus BF", + label: translate("view.focusBF"), //keybind: [CONTROL, NUMPADZERO], onSelect: _view_focusbf }, @@ -195,10 +201,10 @@ class StageEditor extends UIState { ] }, { - label: "Editor", + label: translate("topBar.editor"), childs: [ { - label: "Show Characters", + label: translate("editor.showCharacters"), //keybind: [CONTROL, NUMPADMINUS], onSelect: _editor_showCharacters, icon: showCharacters ? 1 : 0 @@ -808,7 +814,7 @@ class StageEditor extends UIState { var sprite:FunkinSprite = cast sprite; sprite.extra.set(exID("selected"), true); sprite.extra.get(exID("button")).selected = true; - Logs.trace("Selected " + sprite.name); + //Logs.trace("Selected " + sprite.name); } } } @@ -1350,6 +1356,9 @@ class StageXMLEditScreen extends UISoftcodedWindow { public var xml:Access; public var saveCallback:Void->Void; + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageXMLEditScreen." + id, args); + public function new(xml:Access, saveCallback:Void->Void, type:String = "Unknown") { this.xml = xml; this.saveCallback = saveCallback; @@ -1357,7 +1366,8 @@ class StageXMLEditScreen extends UISoftcodedWindow { "stage" => StageEditor.instance.stage, "xml" => xml, "exID" => StageEditor.exID, - "type" => type + "type" => type, + "translate" => translate ]); } diff --git a/source/funkin/editors/stage/StageSelection.hx b/source/funkin/editors/stage/StageSelection.hx index 942f5c30..b78aebc3 100644 --- a/source/funkin/editors/stage/StageSelection.hx +++ b/source/funkin/editors/stage/StageSelection.hx @@ -21,20 +21,20 @@ class StageSelection extends EditorTreeMenu var list:Array<OptionType> = [ for (stage in (modsList.length == 0 ? Stage.getList(false, true) : modsList)) { stages.push(stage); - new TextOption(stage, "Press ACCEPT to edit this stage.", + new TextOption(stage, TU.translate("stageSelection.acceptStage"), function() { FlxG.switchState(new StageEditor(stage)); }); } ]; - list.insert(0, new NewOption("New Stage", "Press ACCEPT to create a new stage.", function() { + list.insert(0, new NewOption(TU.translate("stageSelection.newStage"), TU.translate("stageSelection.acceptNewStage"), function() { FlxG.state.openSubState(new StageCreationScreen(saveStage)); })); - main = new OptionsScreen("Stage Editor", "Select a stage to edit. HSCRIPT only stages are not supported.", list); + main = new OptionsScreen(TU.translate("editor.stage.name"), TU.translate("stageSelection.desc"), list); - //DiscordUtil.call("onEditorTreeLoaded", ["Stage Editor"]); + DiscordUtil.call("onEditorTreeLoaded", ["Stage Editor"]); } public function saveStage(creation:StageCreationData) { @@ -51,7 +51,7 @@ class StageSelection extends EditorTreeMenu #end // Add to List - var option = new TextOption(creation.name, "Press ACCEPT to edit this stage.", function() { + var option = new TextOption(creation.name, TU.translate("stageSelection.acceptStage"), function() { FlxG.switchState(new StageEditor(creation.name)); }); optionsTree.members[optionsTree.members.length-1].insert(1, option); diff --git a/source/funkin/editors/stage/StageSpritesWindow.hx b/source/funkin/editors/stage/StageSpritesWindow.hx index 78988e1e..25a930ea 100644 --- a/source/funkin/editors/stage/StageSpritesWindow.hx +++ b/source/funkin/editors/stage/StageSpritesWindow.hx @@ -4,8 +4,12 @@ import funkin.editors.stage.elements.StageElementButton; import funkin.editors.stage.elements.*; class StageSpritesWindow extends UIButtonList<StageElementButton> { + + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageSprites." + id, args); + public function new(x:Float, y:Float) { - super(x, y, 400, FlxG.height-25, "Stage Sprites", FlxPoint.get(400, 64)); + super(x, y, 400, FlxG.height-25, translate("win-title"), FlxPoint.get(400, 64)); collapsable = true; topAlpha = 0.9; @@ -23,22 +27,22 @@ class StageSpritesWindow extends UIButtonList<StageElementButton> { var screenPos = addButton.getScreenPosition(null, lastDrawCam == null ? FlxG.camera : lastDrawCam); StageEditor.instance.openContextMenu([ { - label: "Sprite", + label: translate("sprite"), onSelect: StageEditor.instance._sprite_new, color: 0xFF00FF00, icon: 2 }, { - label: "Box", + label: translate("box"), onSelect: function(_) { - UIState.state.displayNotification(new UIBaseNotification("Creating a box isnt implemented yet!", 2, BOTTOM_LEFT)); + UIState.state.displayNotification(new UIBaseNotification(translate("warnings.not-implemented"), 2, BOTTOM_LEFT)); CoolUtil.playMenuSFX(WARNING, 0.45); }, color: 0xFF00FF00, icon: 2 }, { - label: "Character", + label: translate("character"), onSelect: StageEditor.instance._character_new, color: 0xFF00FF00, icon: 2 diff --git a/source/funkin/editors/stage/elements/StageCharacterButton.hx b/source/funkin/editors/stage/elements/StageCharacterButton.hx index 68156dcc..afd13840 100644 --- a/source/funkin/editors/stage/elements/StageCharacterButton.hx +++ b/source/funkin/editors/stage/elements/StageCharacterButton.hx @@ -12,6 +12,9 @@ class StageCharacterButton extends StageElementButton { public var char:Character; public var charScale(get, null):Float; + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageCharacters." + id, args); + public function new(x:Float,y:Float, char:Character, xml:Access) { this.char = char; super(x,y, xml); @@ -61,9 +64,9 @@ class StageCharacterButton extends StageElementButton { public override function onDelete() { if (char.name.startsWith("NO_DELETE_")) { - var text = "This character position is required in stages!"; - if (char.name == "NO_DELTE_girlfriend" && FlxG.random.bool(1)) - text = "You can't delete Girlfriend"; + var text = translate("requiredPosition"); + if (char.name == "NO_DELETE_girlfriend" && FlxG.random.bool(1)) + text = translate("noDeleteGirlfriend"); UIState.state.displayNotification(new UIBaseNotification(text, 2, BOTTOM_LEFT)); return; } @@ -100,6 +103,9 @@ class StageCharacterEditScreen extends UISoftcodedWindow { public var button:StageCharacterButton; public var char:Character; + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageElementEditScreen." + id, args); + public function new(button:StageCharacterButton) { this.button = button; this.char = button.char; @@ -117,6 +123,7 @@ class StageCharacterEditScreen extends UISoftcodedWindow { "setEx" => function(name:String, value:Dynamic) { char.extra.set(StageEditor.exID(name), value); }, + "translate" => translate, ]); } diff --git a/source/funkin/editors/stage/elements/StageElementButton.hx b/source/funkin/editors/stage/elements/StageElementButton.hx index 937893c5..4ba56ec8 100644 --- a/source/funkin/editors/stage/elements/StageElementButton.hx +++ b/source/funkin/editors/stage/elements/StageElementButton.hx @@ -209,8 +209,10 @@ class StageElementButton extends UIButton { var text = '${getName()} (${CoolUtil.quantize(pos.x, 100)}, ${CoolUtil.quantize(pos.y, 100)})'; var sprite = getSprite(); if(sprite != null) { - text += '\nScale: (${CoolUtil.quantize(sprite.scale.x, 100)}, ${CoolUtil.quantize(sprite.scale.y, 100)})'; - text += '\nScroll: (${CoolUtil.quantize(sprite.scrollFactor.x, 100)}, ${CoolUtil.quantize(sprite.scrollFactor.y, 100)})'; + var scaleText = TU.getRaw("stageElement.scale"); + var scrollText = TU.getRaw("stageElement.scroll"); + text += '\n${scaleText.format([CoolUtil.quantize(sprite.scale.x, 100), CoolUtil.quantize(sprite.scale.y, 100)])}'; + text += '\n${scrollText.format([CoolUtil.quantize(sprite.scrollFactor.x, 100), CoolUtil.quantize(sprite.scrollFactor.y, 100)])}'; } pos.put(); return text; diff --git a/source/funkin/editors/stage/elements/StageSpriteButton.hx b/source/funkin/editors/stage/elements/StageSpriteButton.hx index 485eca9f..81b609c2 100644 --- a/source/funkin/editors/stage/elements/StageSpriteButton.hx +++ b/source/funkin/editors/stage/elements/StageSpriteButton.hx @@ -76,6 +76,9 @@ class StageSpriteEditScreen extends UISoftcodedWindow { public var sprite:FunkinSprite; var isSaving:Bool = false; + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageElementEditScreen." + id, args); + public function new(button:StageSpriteButton) { this.button = button; this.sprite = button.getSprite(); @@ -91,6 +94,7 @@ class StageSpriteEditScreen extends UISoftcodedWindow { "setEx" => function(name:String, value:Dynamic) { sprite.extra.set(StageEditor.exID(name), value); }, + "translate" => translate, ]); } diff --git a/source/funkin/editors/stage/elements/StageUnknownButton.hx b/source/funkin/editors/stage/elements/StageUnknownButton.hx index a1beb0bc..a3fb0949 100644 --- a/source/funkin/editors/stage/elements/StageUnknownButton.hx +++ b/source/funkin/editors/stage/elements/StageUnknownButton.hx @@ -75,7 +75,7 @@ class StageUnknownButton extends StageElementButton { } public override function getInfoText():String { - return 'Unknown\n<${getName()} />'; + return TU.translate("stageElement.unknown", [getName()]); } public override function updatePos() { @@ -86,13 +86,17 @@ class StageUnknownButton extends StageElementButton { class StageUnknownEditScreen extends UISoftcodedWindow { public var button:StageUnknownButton; + inline function translate(id:String, ?args:Array<Dynamic>) + return TU.translate("stageElementEditScreen." + id, args); + public function new(button:StageUnknownButton) { this.button = button; super("layouts/stage/unknownEditScreen", [ "stage" => StageEditor.instance.stage, "button" => button, "xml" => button.xml, - "exID" => StageEditor.exID + "exID" => StageEditor.exID, + "translate" => translate, ]); }