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.
This commit is contained in:
Verwex
2025-08-08 11:10:25 +02:00
parent b8b8d08be5
commit 1ca4b64402
3 changed files with 25 additions and 5 deletions
+10
View File
@@ -9,6 +9,8 @@
<str id="save">Save</str>
<str id="saveClose">Save &amp; Close</str>
<str id="close">Close</str>
<str id="notNow">Not Now</str>
<str id="yes">Yes</str>
</group>
<group name="UIImageExplorer" prefix="uiImageExplorer.">
@@ -665,4 +667,12 @@
<str id="saveAndExitToMenu">Save &amp; Exit To Menu</str>
<str id="cancel">Cancel</str>
</group>
<group name="ModConfigWarning" prefix="modConfigWarning.">
<str id="warningTitle">Missing mod folder configuration!</str>
<str id="warningDesc">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.)</str>
<str id="createdTitle">Created mod config!</str>
<str id="createdDesc">Your mod config file has been created at {0}!</str>
</group>
</language>
+10
View File
@@ -9,6 +9,8 @@
<str id="save">Zapisz</str>
<str id="saveClose">Zapisz i Zamknij</str>
<str id="close">Zamknij</str>
<str id="notNow">Nie Teraz</str>
<str id="yes">Tak</str>
</group>
<group name="UIImageExplorer" prefix="uiImageExplorer.">
@@ -653,4 +655,12 @@
<str id="saveAndExitToMenu">Zapisz i Wyjdź do Menu</str>
<str id="cancel">Anuluj</str>
</group>
<group name="ModConfigWarning" prefix="modConfigWarning.">
<str id="warningTitle">Brakujący plik konfiguracyjny modu!</str>
<str id="warningDesc">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.)</str>
<str id="createdTitle">Utworzono konfigurację modu!</str>
<str id="createdDesc">Twój plik konfiguracyjny modu został utworzony w {0}!</str>
</group>
</language>
+5 -5
View File
@@ -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, []));