diff --git a/assets/languages/en.json b/assets/languages/en.json index e229031..288eeae 100644 --- a/assets/languages/en.json +++ b/assets/languages/en.json @@ -39,25 +39,25 @@ "ctrlResetGuide": "If your controls don't work, press R to reset them.", "ctrlGuide": "PRESS ANY KEY TO CONTINUE.", - "leftKey": "Left: ", - "downKey": "Down: ", - "upKey": "Up: ", - "rightKey": "Right: ", - "leftKeyAlt": "Left (Alt): ", - "downKeyAlt": "Down (Alt): ", + "leftKey": "Left", + "downKey": "Down", + "upKey": "Up", + "rightKey": "Right", + "leftKeyAlt": "Left (Alt)", + "downKeyAlt": "Down (Alt)", "upKeyAlt": "Up (Alt): ", - "rightKeyAlt": "Right (Alt): ", - "acceptKey": "Accept: ", - "exitKey": "Exit: ", - "resetKey": "Reset: ", + "rightKeyAlt": "Right (Alt)", + "acceptKey": "Accept", + "exitKey": "Exit", + "resetKey": "Reset", "langSelect": "SELECT A LANGUAGE", "langNotCompletelyAccurate": "(Language translations may not be 100% accurate.)", - "noteColorGuide": "Use LEFT/RIGHT to change the selected arrow or the selected color.\nUse UP/DOWN to change the selected color value.\nUse ENTER to select a note.\nUse RESET to reset a note's color.", - "red": "Red: ", - "green": "Green: ", - "blue": "Blue: ", + "noteColorGuide": "Use LEFT/RIGHT to change the selected arrow or the selected color.\nUse UP/DOWN to change the selected color value.\nUse ENTER to select a note.\nUse RESET to reset a note's color.\n", + "red": "\nRed: ", + "green": "\nGreen: ", + "blue": "\nBlue: ", "yes": "Yes", "no": "No", @@ -72,7 +72,7 @@ "missTxt": "Misses: ", "accTxt": "Accuracy: ", "botplayTxt": "BOTPLAY", - "resultsTxt": "RESULTS", + "resultsTxt": "RESULTS\n", "pauseTxt": "PAUSED?", "resumeTxt": "Resume", diff --git a/assets/languages/es.json b/assets/languages/es.json index 5a185c6..62e2132 100644 --- a/assets/languages/es.json +++ b/assets/languages/es.json @@ -54,7 +54,7 @@ "langSelect": "SELECCIONA UN IDIOMA", "langNotCompletelyAccurate": "(Las traducciones de idioma pueden no ser 100% precisas.)", - "noteColorGuide": "Usa IZQUIERDA/DERECHA para cambiar la flecha o el color seleccionado.\nUsa ARRIBA/ABAJO para cambiar el valor del color seleccionado.\nUsa ENTER para seleccionar una nota.\nUsa REINICIAR para restablecer el color de una nota.", + "noteColorGuide": "Usa IZQUIERDA/DERECHA para cambiar la flecha o el color seleccionado.\nUsa ARRIBA/ABAJO para cambiar el valor del color seleccionado.\nUsa ENTER para seleccionar una nota.\nUsa REINICIAR para restablecer el color de una nota.\n\n", "red": "Rojo: ", "green": "Verde: ", "blue": "Azul: ", @@ -72,7 +72,7 @@ "missTxt": "Quiebres de Combo: ", "accTxt": "Precisión: ", "botplayTxt": "BOTPLAY", - "resultsTxt": "RESULTADOS", + "resultsTxt": "RESULTADOS\n", "pauseTxt": "¿PAUSADO/A?", "resumeTxt": "Reanudar", diff --git a/source/options/ControlsSubState.hx b/source/options/ControlsSubState.hx index d86d957..4819960 100644 --- a/source/options/ControlsSubState.hx +++ b/source/options/ControlsSubState.hx @@ -2,7 +2,7 @@ package options; class ControlsSubState extends ExtendableSubState { var coolControls:Array = [ - "Left", "Down", "Up", "Right", "Left (Alt)", "Down (Alt)", "Up (Alt)", "Right (Alt)", "Accept", "Exit", "Restart" + "leftKey", "downKey", "upKey", "rightKey", "leftKeyAlt", "downKeyAlt", "upKeyAlt", "rightKeyAlt", "acceptKey", "exitKey", "resetKey" ]; var ctrlGroup:FlxTypedGroup; @@ -46,7 +46,7 @@ class ControlsSubState extends ExtendableSubState { add(ctrlGroup); for (i in 0...coolControls.length) { - var bindTxt:FlxText = new FlxText(20, 20 + (i * 80), 0, coolControls[i], 32); + var bindTxt:FlxText = new FlxText(20, 20 + (i * 80), 0, Localization.get(coolControls[i]), 32); bindTxt.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); bindTxt.ID = i; ctrlGroup.add(bindTxt); @@ -102,7 +102,7 @@ class ControlsSubState extends ExtendableSubState { if (Input.justPressed('accept')) { isChangingBind = true; tempBG.visible = true; - anyKeyTxt.text = "PRESS ANY KEY TO CONTINUE."; + anyKeyTxt.text = Localization.get("ctrlGuide"); } if (Input.justPressed('exit')) { diff --git a/source/options/NoteColorState.hx b/source/options/NoteColorState.hx index 1726fca..a9226e8 100644 --- a/source/options/NoteColorState.hx +++ b/source/options/NoteColorState.hx @@ -40,9 +40,7 @@ class NoteColorState extends ExtendableState { strumline.add(note); } - daText = new FlxText(0, 280, FlxG.width, - "Use LEFT/RIGHT to change the selected arrow or the selected color.\nUse UP/DOWN to change the selected color value.\nUse ENTER to select a note.\nUse RESET to reset a note's color.", - 12); + daText = new FlxText(0, 280, FlxG.width, "", 12); daText.setFormat(Paths.font('vcr.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); daText.screenCenter(X); add(daText); @@ -148,11 +146,12 @@ class NoteColorState extends ExtendableState { blue = '>$blue<'; } - daText.text = "Use LEFT/RIGHT to change the selected arrow or the selected color.\nUse UP/DOWN to change the selected color value.\nUse ENTER to select a note.\nUse RESET to reset a note's color.\n\nRed: " + daText.text = Localization.get("noteColorGuide") + + Localization.get("red") + red - + "\nGreen: " + + Localization.get("green") + green - + "\nBlue: " + + Localization.get("blue") + blue; daText.screenCenter(X); } diff --git a/source/options/Option.hx b/source/options/Option.hx index 91791c6..f6fc6a6 100644 --- a/source/options/Option.hx +++ b/source/options/Option.hx @@ -56,7 +56,7 @@ class Option { switch (type) { case OptionType.Toggle: - formattedString = '$name: ${value ? 'On' : 'Off'}'; + formattedString = '$name: ${value ? Localization.get("on") : Localization.get("off")}'; case OptionType.Integer(_, _, _): formattedString = '$name: $value${showPercentage ? '%' : ''}'; case OptionType.Decimal(_, _, _): diff --git a/source/options/OptionsState.hx b/source/options/OptionsState.hx index a3e0d27..782313c 100644 --- a/source/options/OptionsState.hx +++ b/source/options/OptionsState.hx @@ -1,7 +1,7 @@ package options; class OptionsState extends ExtendableState { - final options:Array = ['Preferences', 'Controls', 'Language', 'Note Colors']; + final options:Array = ['prefTxt', 'ctrlTxt', 'langTxt', 'notesTxt']; var opGrp:FlxTypedGroup; var curSelected:Int = 0; var fromPlayState:Bool; @@ -27,7 +27,7 @@ class OptionsState extends ExtendableState { add(opGrp); for (i in 0...options.length) { - var text:FlxText = new FlxText(0, 260 + (i * 70), 0, options[i], 32); + var text:FlxText = new FlxText(0, 260 + (i * 70), 0, Localization.get(options[i]), 32); text.setFormat(Paths.font('vcr.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); text.scrollFactor.set(); text.screenCenter(X); @@ -35,7 +35,7 @@ class OptionsState extends ExtendableState { opGrp.add(text); } - var resetControlsTxt:FlxText = new FlxText(5, FlxG.height - 24, 0, "If your controls don't work, press R to reset them.", 12); + var resetControlsTxt:FlxText = new FlxText(5, FlxG.height - 24, 0, Localization.get("ctrlResetGuide"), 12); resetControlsTxt.setFormat(Paths.font('vcr.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); resetControlsTxt.scrollFactor.set(); add(resetControlsTxt); diff --git a/source/options/OptionsSubState.hx b/source/options/OptionsSubState.hx index 75f6e24..9b0d5d7 100644 --- a/source/options/OptionsSubState.hx +++ b/source/options/OptionsSubState.hx @@ -15,13 +15,13 @@ class OptionsSubState extends ExtendableSubState { public function new() { super(); - var option:Option = new Option("Antialiasing", "If disabled, improves the game's performance at the cost of sharper visuals.", OptionType.Toggle, + var option:Option = new Option(Localization.get("opAnti"), Localization.get("descAnti"), OptionType.Toggle, SaveData.settings.antialiasing); option.onChange = (value:Dynamic) -> SaveData.settings.antialiasing = value; options.push(option); #if desktop - var option:Option = new Option("Fullscreen", "Toggles fullscreen.", OptionType.Toggle, SaveData.settings.fullscreen); + var option:Option = new Option(Localization.get("opFlScrn"), Localization.get("descFlScrn"), OptionType.Toggle, SaveData.settings.fullscreen); option.onChange = (value:Dynamic) -> { SaveData.settings.fullscreen = value; FlxG.fullscreen = SaveData.settings.fullscreen; @@ -29,11 +29,11 @@ class OptionsSubState extends ExtendableSubState { options.push(option); #end - var option:Option = new Option("Flashing Lights", "Turn this off if you're photosensitive.", OptionType.Toggle, SaveData.settings.flashing); + var option:Option = new Option(Localization.get("opFlash"), Localization.get("descFlash"), OptionType.Toggle, SaveData.settings.flashing); option.onChange = (value:Dynamic) -> SaveData.settings.flashing = value; options.push(option); - var option:Option = new Option("Framerate", "Use LEFT/RIGHT to change the framerate (Max 240).", OptionType.Integer(60, 240, 10), + var option:Option = new Option(Localization.get("opFrm"), Localization.get("descFrm"), OptionType.Integer(60, 240, 10), Std.int(FlxMath.bound(FlxG.stage.application.window.displayMode.refreshRate, 60, 240))); option.onChange = (value:Dynamic) -> { SaveData.settings.framerate = value; @@ -41,7 +41,7 @@ class OptionsSubState extends ExtendableSubState { }; options.push(option); - var option:Option = new Option("FPS Counter", "Toggles the FPS Display.", OptionType.Toggle, SaveData.settings.fpsCounter); + var option:Option = new Option(Localization.get("opFPS"), Localization.get("descFPS"), OptionType.Toggle, SaveData.settings.fpsCounter); option.onChange = (value:Dynamic) -> { SaveData.settings.fpsCounter = value; if (Main.fpsDisplay != null) @@ -49,21 +49,21 @@ class OptionsSubState extends ExtendableSubState { }; options.push(option); - var option:Option = new Option("Song Speed", "Adjust the scroll speed of the notes.", OptionType.Integer(1, 10, 1), SaveData.settings.songSpeed); + var option:Option = new Option(Localization.get("opSpeed"), Localization.get("descSpeed"), OptionType.Integer(1, 10, 1), SaveData.settings.songSpeed); option.onChange = (value:Dynamic) -> SaveData.settings.songSpeed = value; options.push(option); - var option:Option = new Option("Downscroll", "Makes the arrows go down instead of up.", OptionType.Toggle, SaveData.settings.downScroll); + var option:Option = new Option(Localization.get("opDwnScrl"), Localization.get("descDwnScrl"), OptionType.Toggle, SaveData.settings.downScroll); option.onChange = (value:Dynamic) -> SaveData.settings.downScroll = value; options.push(option); - var option:Option = new Option("Lane Underlay Alpha", "Changes the visibility of the lane underlay.", OptionType.Integer(0, 100, 1), + var option:Option = new Option(Localization.get("opUnderlay"), Localization.get("descUnderlay"), OptionType.Integer(0, 100, 1), SaveData.settings.laneUnderlay); option.showPercentage = true; option.onChange = (value:Dynamic) -> SaveData.settings.laneUnderlay = value; options.push(option); - var option:Option = new Option("Hitsound Type", "Only works if the hitsound volume isn't at 0.", + var option:Option = new Option(Localization.get("opHitSndT"), Localization.get("descHitSndT"), OptionType.Choice(['Default', 'CD', 'OSU', 'Switch']), SaveData.settings.hitSoundType); option.onChange = (value:Dynamic) -> { SaveData.settings.hitSoundType = value; @@ -71,7 +71,7 @@ class OptionsSubState extends ExtendableSubState { }; options.push(option); - var option:Option = new Option("Hitsound Volume", "Changes the volume of the hitsound.", OptionType.Integer(0, 100, 10), + var option:Option = new Option(Localization.get("opHitSndV"), Localization.get("descHitSndV"), OptionType.Integer(0, 100, 10), SaveData.settings.hitSoundVolume); option.showPercentage = true; option.onChange = (value:Dynamic) -> { @@ -80,16 +80,16 @@ class OptionsSubState extends ExtendableSubState { }; options.push(option); - var option:Option = new Option("Botplay", "If enabled, the game plays for you.", OptionType.Toggle, SaveData.settings.botPlay); + var option:Option = new Option(Localization.get("opBot"), Localization.get("descBot"), OptionType.Toggle, SaveData.settings.botPlay); option.onChange = (value:Dynamic) -> SaveData.settings.botPlay = value; options.push(option); - var option:Option = new Option("Millisecond Display", "If enabled, displays your hit time in milliseconds.", OptionType.Toggle, + var option:Option = new Option(Localization.get("opMSDisp"), Localization.get("descMSDisp"), OptionType.Toggle, SaveData.settings.displayMS); option.onChange = (value:Dynamic) -> SaveData.settings.displayMS = value; options.push(option); - var option:Option = new Option("Anti-mash", "If enabled, you will get a miss for pressing keys when no notes are present.", OptionType.Toggle, + var option:Option = new Option(Localization.get("opMash"), Localization.get("descMash"), OptionType.Toggle, SaveData.settings.antiMash); option.onChange = (value:Dynamic) -> SaveData.settings.antiMash = value; options.push(option); diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 638d714..5ac7e6f 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -308,7 +308,8 @@ class PlayState extends ExtendableState { + ' // ' + Localization.get("missTxt") + misses - + ' // Accuracy: $accuracy%' + + ' // ' + + Localization.get("accTxt") + accuracy + '%' + ' (${generateRank()})'; if (spawnNotes.length > 0) { diff --git a/source/substates/PauseSubState.hx b/source/substates/PauseSubState.hx index c098a6a..96fa8ad 100644 --- a/source/substates/PauseSubState.hx +++ b/source/substates/PauseSubState.hx @@ -5,7 +5,7 @@ class PauseSubState extends ExtendableSubState { var isTweening:Bool = false; var lastString:String = ''; - final pauseOptions:Array = ['Resume', 'Restart', 'Options', 'Song Menu', 'Main Menu']; + final pauseOptions:Array = ['resumeTxt', 'restartTxt', 'optionsTxt', 'sMenuTxt', 'mMenuTxt']; var pauseGrp:FlxTypedGroup; var curSelected:Int = 0; @@ -25,7 +25,7 @@ class PauseSubState extends ExtendableSubState { add(pauseGrp); for (i in 0...pauseOptions.length) { - var text:FlxText = new FlxText(0, 250 + (i * 60), 0, pauseOptions[i], 32); + var text:FlxText = new FlxText(0, 250 + (i * 60), 0, Localization.get(pauseOptions[i]), 32); text.setFormat(Paths.font('vcr.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); text.screenCenter(X); text.ID = i; diff --git a/source/substates/ResultsSubState.hx b/source/substates/ResultsSubState.hx index ee04dd2..0b80191 100644 --- a/source/substates/ResultsSubState.hx +++ b/source/substates/ResultsSubState.hx @@ -32,12 +32,19 @@ class ResultsSubState extends ExtendableSubState { tweens.push(FlxTween.angle(rankSpr, rankSpr.angle, -4, 4, {ease: FlxEase.quartInOut})); }, 0); - rankTxt = new FlxText(10, 300, FlxG.width, "RESULTS\nScore: " + score + "\nAccuracy: " + accuracy + "%", 12); + rankTxt = new FlxText(10, 300, FlxG.width, + Localization.get("scoreTxt") + + Localization.get("ctrlGuide") + + score + + "\n" + + Localization.get("accTxt") + + accuracy + + "%", 12); rankTxt.setFormat(Paths.font('vcr.ttf'), 40, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); rankTxt.alpha = 0; add(rankTxt); - anyKeyTxt = new FlxText(10, 480, 0, "PRESS ANY KEY TO CONTINUE.", 12); + anyKeyTxt = new FlxText(10, 480, 0, Localization.get("ctrlGuide"), 12); anyKeyTxt.setFormat(Paths.font('vcr.ttf'), 30, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); anyKeyTxt.alpha = 0; add(anyKeyTxt);