From bd4b7252c161f71a50bee5a6939b800f74981b44 Mon Sep 17 00:00:00 2001 From: cornerloan Date: Sun, 2 Mar 2025 23:37:34 -0800 Subject: [PATCH 01/35] all text updated to support chinese still need to update graphics to support chinese. the only graphic I think we need to update would be the "RELICS" tab during battle --- Funk Engine.csproj | 1 + Globals/FunkEngineNameSpace.cs | 1 + Globals/Scribe.cs | 2 +- Globals/StageProducer.cs | 3 ++ Globals/translations.cn.translation | Bin 0 -> 2697 bytes Globals/translations.csv | 50 ++++++++++++++++++ Globals/translations.csv.import | 17 ++++++ Globals/translations.en.translation | Bin 0 -> 2486 bytes project.godot | 6 ++- .../BattleDirector/scripts/BattleDirector.cs | 14 +++-- scenes/BattleDirector/test_battle_scene.tscn | 2 +- scenes/Maps/scripts/Cartographer.cs | 2 +- scenes/Options/OptionsMenu.tscn | 32 +++++++++++ scenes/Options/scripts/LanguageSelection.cs | 44 +++++++++++++++ scenes/Remapping/ControlSettings.cs | 9 ++-- scenes/Remapping/Remap.tscn | 8 +-- scenes/SceneTransitions/TitleScreen.tscn | 14 +++-- scenes/UI/EndScreen.tscn | 8 +-- scenes/UI/Pause.tscn | 6 +-- scenes/UI/RewardSelectionUI.tscn | 7 ++- scenes/UI/scripts/RewardSelect.cs | 9 +++- 21 files changed, 204 insertions(+), 31 deletions(-) create mode 100644 Globals/translations.cn.translation create mode 100644 Globals/translations.csv create mode 100644 Globals/translations.csv.import create mode 100644 Globals/translations.en.translation create mode 100644 scenes/Options/OptionsMenu.tscn create mode 100644 scenes/Options/scripts/LanguageSelection.cs diff --git a/Funk Engine.csproj b/Funk Engine.csproj index 0fb7dbfb..e7321286 100644 --- a/Funk Engine.csproj +++ b/Funk Engine.csproj @@ -7,6 +7,7 @@ FunkEngine + diff --git a/Globals/FunkEngineNameSpace.cs b/Globals/FunkEngineNameSpace.cs index 1c31fb5a..f5343125 100644 --- a/Globals/FunkEngineNameSpace.cs +++ b/Globals/FunkEngineNameSpace.cs @@ -63,6 +63,7 @@ public enum Stages Quit, Map, Controls, + Options, } public class MapGrid diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index 16c87a9f..e81c7e7a 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -13,7 +13,7 @@ public partial class Scribe : Node { new Note( "EnemyBase", - "Basic enemy note, deals damage to player.", + "Basic enemy note, deals damage to player", null, null, 1, diff --git a/Globals/StageProducer.cs b/Globals/StageProducer.cs index d8928bc4..b2578a9b 100644 --- a/Globals/StageProducer.cs +++ b/Globals/StageProducer.cs @@ -66,6 +66,9 @@ public void TransitionStage(Stages nextStage, int nextRoomIdx = -1) case Stages.Controls: GetTree().ChangeSceneToFile("res://scenes/Remapping/Remap.tscn"); break; + case Stages.Options: + GetTree().ChangeSceneToFile("res://scenes/Options/OptionsMenu.tscn"); + break; case Stages.Chest: Config = MakeConfig(nextStage, nextRoomIdx); GetTree().ChangeSceneToFile("res://scenes/ChestScene/ChestScene.tscn"); diff --git a/Globals/translations.cn.translation b/Globals/translations.cn.translation new file mode 100644 index 0000000000000000000000000000000000000000..f550202623de4345ffcfef7ebf3ed254136fe023 GIT binary patch literal 2697 zcma)83v5$W7(NK{*n|)S!b@cef`PbT@BvB!kw+l-V1O7@N>>_~jE=P>_&{=}gLbdB z3tbDeu#K$F;kIsNfo|=95Qq>HF~kV-6#_ly-YWTnfW-33Js(Avj^cU~GjC9_zX zBe?%#he9+CaN1o(+nhGLrLf3mEws3cEH0bfVJ9PuF^6@FoeTrB#qM%hH`-lf2%O#w zJITgylhw7!;?%z&1G{IY;}VqWB~9C&|7J4Zf<`& zwS4@_M{XN=j%)Efv>}fo$eSUo%|Uo0Cj(Z1f4rgh@I9v6QM%>a!#>_4W9&)z(}CxK z*}z=D7&njSBfePIEQih0$M5Tw>+><*WblnO_(}6-8M&P%zZ8DC&IL@d5d0``Naw#Y z#S`$;I(G{8tUkT~dkMIr``2}AT!$FnGR1DgzY7e)nQ=`P>_~tg&17IK#`x()bL+_g zmoet|jYII~mYiO4=Mk;Xyw`$X_v;2`fzNAk2)=!GgM&Yf;aDTT5->O-dnLAv7ZIyzYLpT;NN^Xzr3uU zbMp#Ct;Guq2~~MQ|QW8{=Uq0 zZX93cn+D#z?$PJ2UJfBy+y_x7I_~_WdV^l<=e1!M{kshOJ6RW&+Yl6Wg|7O{nHX$Hm| zB7Z`)ZwG%TLM!qY`Y!s{8T6fZ5_t&(MZbh@=XZB|)*@frw;|{Er^h2t)D!b8pR=_1 zZRkY4;M=bSv;IIavwr=Od)N8zEAxJTTloFdY$TicoQd&yQa^RxnEQ9nsDAVlV_6OR zP=BZne&?P7rsHoxCfPz8qOz}zM!N`2OSG|qC6mnSC#ob-PgkE)rq*{77U^KYPPV6t z`5MWZ1uGYl6>Apdts-(Os&uHqRzi;@RH=+rG~EvyqRNRNjU3D*Q;I)It7?dxYLrtg z`cy=VvO14?XfL6$5G`-dAU8netDPKf0UAuFLwi`LMhaITBnJyu!r;3Hzv~8PaVl|bS zt}a^JMWby5My{7MO07L2H-C9ET}k7evagA@9#y3}<_%=h4Yc(L(WnRVbd@1buhdVT zzmj@V`h5SLM=+#0Q4TBisLH>nK)!u$dC>%A;0 z(T2wRb7+Ugj(S;1oUpiGI}1#eNgmenQTlU{{kl&(#`+? literal 0 HcmV?d00001 diff --git a/Globals/translations.csv b/Globals/translations.csv new file mode 100644 index 00000000..f00c3012 --- /dev/null +++ b/Globals/translations.csv @@ -0,0 +1,50 @@ +keys,en,cn +TITLE,Midnight Riff,中夜现场 +TITLE_START,Start Game,开始游戏 +TITLE_QUIT,Quit Game,退出游戏 +TITLE_OPTIONS,Options,选项 +TITLE_CONTROLS,Change Controls,更改操控 +CONTROLS_TITLE_TYPE_WASD,WASD,WASD +CONTROLS_TITLE_TYPE_QWER,QWERT,QWERT +CONTROLS_TITLE_TYPE_ARROW,Arrow,箭头键 +CONTROLS_TITLE_SELECTED,Selected,已选择 +CONTROLS_WASD_BUTTON,WASD,WASD +CONTROLS_QWER_BUTTON,QWER,QWER +CONTROLS_ARROW_BUTTON,Arrow Keys,箭头键 +CONTROLS_RETURN_BUTTON,Return to Title Screen,返回主菜单 +ESCAPE_MENU_RESUME,Resume,继续 +ESCAPE_MENU_QUIT,Quit,退出 +ESCAPE_MENU_TITLE,Quit to Title,返回标题 +CHEST_ROOM_REWARDS,Rewards!,奖励! +CHEST_ROOM_SKIP,Skip,跳过 +CHEST_ROOM_ACCEPT,Accept,接受 +BATTLE_ROOM_BEGIN_BUTTON,"Begin Battle [Enter]","开始战斗 [Enter]" +BATTLE_ROOM_PERFECT,Perfect,精准 +BATTLE_ROOM_GOOD,Good,良好 +BATTLE_ROOM_OK,OK,可以 +BATTLE_ROOM_MISS,Miss,错误 +BATTLE_ROOM_WIN,"You win!","你获胜了!" +BATTLE_ROOM_LOSE,"Game Over!","游戏结束!" +END_SCREEN_RESTART,Restart,重新开始 +BATTLE_ROOM_SKIP_BUTTON,Skip,跳过 +BATTLE_ROOM_ACCEPT_BUTTON,Accept,接受 +NOTE_ENEMYBASE_NAME,EnemyBase,敌人基地 +NOTE_ENEMYBASE_TOOLTIP,"Basic enemy note, deals damage to player","基础敌人音符,对玩家造成伤害" +NOTE_PLAYERBASE_NAME,PlayerBase,玩家基地 +NOTE_PLAYERBASE_TOOLTIP,"Basic player note, deals damage to enemy","基础玩家音符,对敌人造成伤害" +NOTE_PLAYERDOUBLE_NAME,PlayerDouble,玩家双击 +NOTE_PLAYERDOUBLE_TOOLTIP,"Basic player note, deals double damage to enemy","基础玩家音符,对敌人造成双倍伤害" +NOTE_PLAYERHEAL_NAME,PlayerHeal,玩家治愈 +NOTE_PLAYERHEAL_TOOLTIP,"Basic player note, heals player","基础玩家音符,治愈玩家" +NOTE_PLAYERVAMPIRE_NAME,PlayerVampire,玩家吸血 +NOTE_PLAYERVAMPIRE_TOOLTIP,"Steals health from enemy","从敌人吸取生命值" +NOTE_PLAYERQUARTER_NAME,PlayerQuarter,玩家一分之一 +NOTE_PLAYERQUARTER_TOOLTIP,"Basic note at a quarter of the cost","以四分之一的耗费时间量发出基础音符" +RELIC_BREAKFAST_NAME,Breakfast,早餐 +RELIC_BREAKFAST_TOOLTIP,"Increases max hp.",提高最大生命值 +RELIC_GOODVIBES_NAME,Good Vibes,良好消息 +RELIC_GOODVIBES_TOOLTIP,"Heals the player whenever they place a note.","每开始一个音符时治愈玩家" +RELIC_AUROBOROS_NAME,Auroboros,无尾蛇 +RELIC_AUROBOROS_TOOLTIP,"Bigger number, better person. Increases combo multiplier every riff.","进一步增加综合倍数,每次现场提升" +RELIC_COLORBOROS_NAME,Colorboros,彩蛇轮回 +RELIC_COLORBOROS_TOOLTIP,"Taste the rainbow. Charges the freestyle bar every riff.","品尝临岛,每次现场充值自由格条" diff --git a/Globals/translations.csv.import b/Globals/translations.csv.import new file mode 100644 index 00000000..c1c79034 --- /dev/null +++ b/Globals/translations.csv.import @@ -0,0 +1,17 @@ +[remap] + +importer="csv_translation" +type="Translation" +uid="uid://drjnsd6mqpxqh" + +[deps] + +files=["res://Globals/translations.en.translation", "res://Globals/translations.cn.translation"] + +source_file="res://Globals/translations.csv" +dest_files=["res://Globals/translations.en.translation", "res://Globals/translations.cn.translation"] + +[params] + +compress=true +delimiter=0 diff --git a/Globals/translations.en.translation b/Globals/translations.en.translation new file mode 100644 index 0000000000000000000000000000000000000000..2c70181c857e5af616caf730bfb457c46a8bf319 GIT binary patch literal 2486 zcma)8Yitx%7`=VC(3V02(iV!c8)_BpLj_TAiS)59d!)D-Lbo#6KX`M`W&5nx@n&zE5RanrK`qtBeLHAnIX zFmJMOYYh5msXJC}gN=8BZ#K1UwzXdHUBKI>{()_MKlmY2JA(1JIX{i@EO6fBqvmL> zL(DJR)~VK>Rr&t8x-#7pL+#ztfegvVvnCR$pAP#+A9stwvHED8p^={1R<`PEyqi45a(-h2S z0Ahb@?E~BELF{p7Y#iSHGJJHG=;aXp^}}&(2f-(r5PI&euQz=GLhr*=i$6E*%s%Ql zy|@J7PwClP_XxQCoOiblEx7=lYNj0GJcXOTO`^J!O+4{%V6z*+s6NUm;x26aIdUFk zCbT?@p1oyp+k4>jLJ@@jtr7LwQE+=5Tl$_~y%8olJ3-WulKNBDVsLub2whWGKcv7n z4Ra?T;-2fh{L30}dtZ$QOFL)4WY_Pw^n2-U==Oep*n7UE7;!{C5&zO>%ev=47kv`? z?I(uMEd`l{wfg~~@5($mYX`VEr#O#0X>jWc7QHh0^ojv&5`7lFo@2*cu-)iKf5EZV zJ@8R4=?;rL>l{aFz62L}g#OLpR|XoOQ=c*b5%+limFd)9(T`v6Ywn1{Ci=fL7ZCer z_H=jL3r^lNKt=R!G%xcS+TIRwG=wt zJ?s0rZ{+pl`A9126#hEz_0e{C#d{|7?@LbIH3D7a6S^zw}BHk!RoJEqZhq!Z%C!%xpDYlBM4Lqnb zucFkmvgJ66rm-iLsIyIuxELM6S@sN9UC6%R_+{fC0X-2OZZDEF&Wxh`m-cMQ^LGC6 zbah5%V*i+LeV0GWV5>q>J6CU5Aa>leV1pkWSw+s0H8m)k!rb&g>Z4FGUo6y8E`=<% zwCW7EB~hgmZjn`#F)aQi|ubY{-?kI literal 0 HcmV?d00001 diff --git a/project.godot b/project.godot index d98a7e8c..e7dcf55f 100644 --- a/project.godot +++ b/project.godot @@ -35,7 +35,7 @@ project/assembly_name="Funk Engine" [game] -input_scheme="ARROWS" +input_scheme="QWERT" [input] @@ -87,6 +87,10 @@ Secondary={ ] } +[internationalization] + +locale/translations=PackedStringArray("res://Globals/translations.cn.translation", "res://Globals/translations.en.translation") + [rendering] textures/canvas_textures/default_texture_filter=0 diff --git a/scenes/BattleDirector/scripts/BattleDirector.cs b/scenes/BattleDirector/scripts/BattleDirector.cs index 48b943e2..fd085211 100644 --- a/scenes/BattleDirector/scripts/BattleDirector.cs +++ b/scenes/BattleDirector/scripts/BattleDirector.cs @@ -156,7 +156,11 @@ private void OnTimedInput(Note note, ArrowType arrowType, int beat, double beatD if (PlayerAddNote(arrowType, beat)) return; //Miss on empty note. This does not apply to inactive existing notes as a balance decision for now. NotePlacementBar.MissNote(); - CM.ComboText(Timing.Miss.ToString(), arrowType, NotePlacementBar.GetCurrentCombo()); + CM.ComboText( + Tr("BATTLE_ROOM_" + Timing.Miss.ToString().ToUpper()), + arrowType, + NotePlacementBar.GetCurrentCombo() + ); Player.TakeDamage(4); return; } @@ -172,7 +176,11 @@ private void OnTimedInput(Note note, ArrowType arrowType, int beat, double beatD { NotePlacementBar.HitNote(); } - CM.ComboText(timed.ToString(), arrowType, NotePlacementBar.GetCurrentCombo()); + CM.ComboText( + Tr("BATTLE_ROOM_" + timed.ToString().ToUpper()), + arrowType, + NotePlacementBar.GetCurrentCombo() + ); } private Timing CheckTiming(double beatDif) @@ -226,7 +234,7 @@ private void ShowRewardSelection(int amount) if (StageProducer.Config.RoomType == Stages.Boss) type = "Relic"; var rewardSelect = RewardSelect.CreateSelection(this, Player.Stats, amount, type); - rewardSelect.GetNode