From 1ca4b64402923350aaab8bb3dd62be1d1d60a225 Mon Sep 17 00:00:00 2001 From: Verwex <34553484+Verwex@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:10:25 +0200 Subject: [PATCH] Translatable Mod Config Warning The Translation Strings Used in Editors.xml: - editor.notNow - editor.yes - modConfigWarning.warningTitle - modConfigWarning.warningDesc - modConfigWarning.createdTitle - modConfigWarning.createdDesc Only English & Polish variants are provided beacuse I speak those. --- assets/languages/en/Editors.xml | 10 ++++++++++ assets/languages/pl/Editors.xml | 10 ++++++++++ source/funkin/editors/ModConfigWarning.hx | 10 +++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/assets/languages/en/Editors.xml b/assets/languages/en/Editors.xml index bc36ff0e..fd1fc32a 100644 --- a/assets/languages/en/Editors.xml +++ b/assets/languages/en/Editors.xml @@ -9,6 +9,8 @@ Save Save & Close Close + Not Now + Yes @@ -665,4 +667,12 @@ Save & Exit To Menu Cancel + + + Missing mod folder configuration! + Your mod is currently missing a mod config file!\n\nWould you like to automatically generate one?\n\n(PS: If this is not your mod please disable Developer mode to stop this popup from appearing.) + + Created mod config! + Your mod config file has been created at {0}! + \ No newline at end of file diff --git a/assets/languages/pl/Editors.xml b/assets/languages/pl/Editors.xml index 0185177a..9dfde365 100644 --- a/assets/languages/pl/Editors.xml +++ b/assets/languages/pl/Editors.xml @@ -9,6 +9,8 @@ Zapisz Zapisz i Zamknij Zamknij + Nie Teraz + Tak @@ -653,4 +655,12 @@ Zapisz i Wyjdź do Menu Anuluj + + + Brakujący plik konfiguracyjny modu! + Twój mod obecnie brakuje jego pliku konfiguracyjnego!\n\nCzy chcesz go automatycznie wygenerować?\n\n(PS: Jeżeli to nie twój mod, wyłącz Tryb Dewelopera, aby zapobiec wyskakiwaniu się tego okienka.) + + Utworzono konfigurację modu! + Twój plik konfiguracyjny modu został utworzony w {0}! + diff --git a/source/funkin/editors/ModConfigWarning.hx b/source/funkin/editors/ModConfigWarning.hx index 4caf1b48..f3a1ac13 100644 --- a/source/funkin/editors/ModConfigWarning.hx +++ b/source/funkin/editors/ModConfigWarning.hx @@ -56,9 +56,9 @@ LOGO_TEXT="" super.createPost(); hadPopup = true; - var substate = new UIWarningSubstate("Missing mod folder configuration!", "Your mod is currently missing a mod config file!\n\nWould you like to automatically generate one?\n\n(PS: If this is not your mod please disable Developer mode to stop this popup from appearing.)", [ + var substate = new UIWarningSubstate(TU.translate("modConfigWarning.warningTitle"), TU.translate("modConfigWarning.warningDesc"), [ { - label: "Not Now", + label: TU.translate("editor.notNow"), color: 0x969533, onClick: function (_) { MusicBeatState.skipTransOut = MusicBeatState.skipTransIn = false; @@ -66,13 +66,13 @@ LOGO_TEXT="" } }, { - label: "Yes", + label: TU.translate("editor.yes"), onClick: function(_) { var path = '${library.folderPath}/data/config/modpack.ini'; CoolUtil.safeSaveFile(path, defaultModConfigText); - openSubState(new UIWarningSubstate("Created mod config!", "Your mod config file has been created at " + path + "!", [ + openSubState(new UIWarningSubstate(TU.translate("modConfigWarning.createdTitle"), TU.translate("modConfigWarning.createdDesc", [path]), [ { - label: "Ok", + label: TU.translate("editor.ok"), onClick: function (_) { MusicBeatState.skipTransOut = MusicBeatState.skipTransIn = false; FlxG.switchState(cast Type.createInstance(goToState, []));