Skip to content

Commit 1ca4b64

Browse files
committed
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.
1 parent b8b8d08 commit 1ca4b64

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

assets/languages/en/Editors.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<str id="save">Save</str>
1010
<str id="saveClose">Save &amp; Close</str>
1111
<str id="close">Close</str>
12+
<str id="notNow">Not Now</str>
13+
<str id="yes">Yes</str>
1214
</group>
1315

1416
<group name="UIImageExplorer" prefix="uiImageExplorer.">
@@ -665,4 +667,12 @@
665667
<str id="saveAndExitToMenu">Save &amp; Exit To Menu</str>
666668
<str id="cancel">Cancel</str>
667669
</group>
670+
671+
<group name="ModConfigWarning" prefix="modConfigWarning.">
672+
<str id="warningTitle">Missing mod folder configuration!</str>
673+
<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>
674+
675+
<str id="createdTitle">Created mod config!</str>
676+
<str id="createdDesc">Your mod config file has been created at {0}!</str>
677+
</group>
668678
</language>

assets/languages/pl/Editors.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<str id="save">Zapisz</str>
1010
<str id="saveClose">Zapisz i Zamknij</str>
1111
<str id="close">Zamknij</str>
12+
<str id="notNow">Nie Teraz</str>
13+
<str id="yes">Tak</str>
1214
</group>
1315

1416
<group name="UIImageExplorer" prefix="uiImageExplorer.">
@@ -653,4 +655,12 @@
653655
<str id="saveAndExitToMenu">Zapisz i Wyjdź do Menu</str>
654656
<str id="cancel">Anuluj</str>
655657
</group>
658+
659+
<group name="ModConfigWarning" prefix="modConfigWarning.">
660+
<str id="warningTitle">Brakujący plik konfiguracyjny modu!</str>
661+
<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>
662+
663+
<str id="createdTitle">Utworzono konfigurację modu!</str>
664+
<str id="createdDesc">Twój plik konfiguracyjny modu został utworzony w {0}!</str>
665+
</group>
656666
</language>

source/funkin/editors/ModConfigWarning.hx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,23 @@ LOGO_TEXT=""
5656
super.createPost();
5757
hadPopup = true;
5858

59-
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.)", [
59+
var substate = new UIWarningSubstate(TU.translate("modConfigWarning.warningTitle"), TU.translate("modConfigWarning.warningDesc"), [
6060
{
61-
label: "Not Now",
61+
label: TU.translate("editor.notNow"),
6262
color: 0x969533,
6363
onClick: function (_) {
6464
MusicBeatState.skipTransOut = MusicBeatState.skipTransIn = false;
6565
FlxG.switchState(cast Type.createInstance(goToState, []));
6666
}
6767
},
6868
{
69-
label: "Yes",
69+
label: TU.translate("editor.yes"),
7070
onClick: function(_) {
7171
var path = '${library.folderPath}/data/config/modpack.ini';
7272
CoolUtil.safeSaveFile(path, defaultModConfigText);
73-
openSubState(new UIWarningSubstate("Created mod config!", "Your mod config file has been created at " + path + "!", [
73+
openSubState(new UIWarningSubstate(TU.translate("modConfigWarning.createdTitle"), TU.translate("modConfigWarning.createdDesc", [path]), [
7474
{
75-
label: "Ok",
75+
label: TU.translate("editor.ok"),
7676
onClick: function (_) {
7777
MusicBeatState.skipTransOut = MusicBeatState.skipTransIn = false;
7878
FlxG.switchState(cast Type.createInstance(goToState, []));

0 commit comments

Comments
 (0)