From 759bd31ff3cae260f702effd3a25eb9bd3eff92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9C=A7=E9=9B=A8=E7=83=A8?= Date: Sat, 8 Jun 2024 18:06:52 +0800 Subject: [PATCH 1/4] Corrected a clerical error by ColdMint chan --- locals/slogan.csv | 2 +- locals/slogan.csv.import | 6 +++--- locals/slogan.en.translation | Bin 634 -> 634 bytes locals/slogan.jp.translation | Bin 769 -> 769 bytes locals/slogan.zh.translation | Bin 701 -> 701 bytes 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locals/slogan.csv b/locals/slogan.csv index 76d8dd3..324d135 100644 --- a/locals/slogan.csv +++ b/locals/slogan.csv @@ -2,5 +2,5 @@ id,zh,en,jp slogan_1,游戏属于每一个人。,The game belongs to everyone.,ゲームはすべての人のものです。 slogan_2,如果你想要得到爱,你就播种爱。,"If you want love, you sow love.",愛を手に入れたければ、愛の種をまきます。 slogan_3,快乐?伤心?痛苦?,Happy? Sad? Pain?,楽しいですか?悲しいですか?苦しいですか? -slogan_4,kaWaYi!,kaWaYi!,kaWaYi! +slogan_4,Kawaii!,Kawaii!,Kawaii! slogan_5,魔法是想象的世界。,Magic is an imaginary world.,魔法は想像の世界です。 \ No newline at end of file diff --git a/locals/slogan.csv.import b/locals/slogan.csv.import index 0da607d..725a79c 100644 --- a/locals/slogan.csv.import +++ b/locals/slogan.csv.import @@ -6,10 +6,10 @@ uid="uid://dbgkevd34vb0d" [deps] -files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation"] +files=["res://locals/slogan.zh.translation", "res://locals/slogan.en.translation", "res://locals/slogan.jp.translation"] -source_file="res://locals/Slogan.csv" -dest_files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation"] +source_file="res://locals/slogan.csv" +dest_files=["res://locals/slogan.zh.translation", "res://locals/slogan.en.translation", "res://locals/slogan.jp.translation"] [params] diff --git a/locals/slogan.en.translation b/locals/slogan.en.translation index 641c2399d29e464fa6d4fbfc5923a76f709727b5..96c0442535eef3e3e845ab4cdcd4246ead1cfd45 100644 GIT binary patch delta 28 jcmeyx@{47IG$X57N~T5XW(7tAMpo~{^2E%^p-id(g`5a< delta 28 jcmeyx@{47IG$X5lK}vf1W(7tAM%L`a@WjZ;p-id(gdGT0 diff --git a/locals/slogan.jp.translation b/locals/slogan.jp.translation index c5d3c858ac5bc132124642d73df41a474c681d5b..1bd42a64ac706ebc8766480fa232bed765b5a727 100644 GIT binary patch delta 28 jcmZoFX&B$t)n3Z3+S%GmCBdd2}d1B_|^GrqncZ~?c delta 28 jcmZoFX&B$6@YLH~OS%GmCBWreIcw*$_^Grqnbub8m diff --git a/locals/slogan.zh.translation b/locals/slogan.zh.translation index bb08eec7ecd646ccc35ad7590d069ff250901ed1..58d54c162d582c52ffb01adffdc838ba43ae671c 100644 GIT binary patch delta 28 jcmdnXx|el>G$X5dNo9e-W(CG(`C delta 28 jcmdnXx|el>G$U(jMs9xUW(CG Date: Sat, 8 Jun 2024 19:16:11 +0800 Subject: [PATCH 2/4] idk why filename that was supposed to be "Slogan" became "slogan", but it's "Slogan" now --- locals/slogan.csv.import | 6 +++--- locals/slogan.en.translation | Bin 634 -> 634 bytes locals/slogan.jp.translation | Bin 769 -> 769 bytes locals/slogan.zh.translation | Bin 701 -> 701 bytes 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locals/slogan.csv.import b/locals/slogan.csv.import index 725a79c..0da607d 100644 --- a/locals/slogan.csv.import +++ b/locals/slogan.csv.import @@ -6,10 +6,10 @@ uid="uid://dbgkevd34vb0d" [deps] -files=["res://locals/slogan.zh.translation", "res://locals/slogan.en.translation", "res://locals/slogan.jp.translation"] +files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation"] -source_file="res://locals/slogan.csv" -dest_files=["res://locals/slogan.zh.translation", "res://locals/slogan.en.translation", "res://locals/slogan.jp.translation"] +source_file="res://locals/Slogan.csv" +dest_files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation"] [params] diff --git a/locals/slogan.en.translation b/locals/slogan.en.translation index 96c0442535eef3e3e845ab4cdcd4246ead1cfd45..ef2652d05189ed4a335ddd4cf5b27f9ea332c598 100644 GIT binary patch delta 35 rcmeyx@{47HEytk+JvQQg2aF~LDojk^nOL}rHPs@iBz?02V-zC*0v!zu delta 35 rcmeyx@{47HEeE@Lig^39~6AM?dmQ^OFm~K{Je8>m@>C_Dh delta 35 rcmZod6*^f(Ph diff --git a/locals/slogan.zh.translation b/locals/slogan.zh.translation index 58d54c162d582c52ffb01adffdc838ba43ae671c..3cc1a8c112784ee625e6db16919962a199e05cbb 100644 GIT binary patch delta 35 rcmdnXx|el=Er(T2ogHV$1GkBR3KJ7}CKj$@HOVzjE8eWYIF}Is;JXYS delta 35 rcmdnXx|el=Er(OFL|w+UTUrwX6(%O|Oe|c*YF<)VV6a(%aV{eO?~@G8 From 27aec2f7542f3737da14bc35253cb1b3516e4e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9C=A7=E9=9B=A8=E7=83=A8?= Date: Sat, 8 Jun 2024 20:17:44 +0800 Subject: [PATCH 3/4] Corrected the Japanese ID "jp" to "ja" in the translation file. --- locals/DeathInfo.csv | 6 +++--- locals/DeathInfo.csv.import | 4 ++-- locals/DeathInfo.en.translation | Bin 482 -> 482 bytes ...p.translation => DeathInfo.ja.translation} | Bin 533 -> 533 bytes locals/DeathInfo.zh.translation | Bin 501 -> 501 bytes locals/InputMapping.csv | 2 +- locals/InputMapping.csv.import | 4 ++-- locals/InputMapping.en.translation | Bin 438 -> 438 bytes locals/InputMapping.ja.translation | Bin 0 -> 465 bytes locals/InputMapping.jp.translation | Bin 465 -> 0 bytes locals/InputMapping.zh.translation | Bin 449 -> 449 bytes locals/Log.csv | 8 ++++---- locals/Log.csv.import | 4 ++-- locals/Log.en.translation | Bin 1766 -> 1770 bytes ...{Log.jp.translation => Log.ja.translation} | Bin 2545 -> 2545 bytes locals/Log.zh.translation | Bin 1977 -> 1977 bytes locals/Slogan.ja.translation | Bin 0 -> 769 bytes locals/UI.csv | 2 +- locals/UI.csv.import | 4 ++-- locals/UI.en.translation | Bin 1850 -> 1850 bytes .../{UI.jp.translation => UI.ja.translation} | Bin 2333 -> 2333 bytes locals/UI.zh.translation | Bin 1973 -> 1973 bytes locals/Weapon.csv | 2 +- locals/Weapon.csv.import | 6 +++--- locals/Weapon.en.translation | Bin 494 -> 494 bytes ...n.jp.translation => Weapon.ja.translation} | Bin 573 -> 573 bytes locals/Weapon.zh.translation | Bin 525 -> 525 bytes locals/slogan.csv | 12 ++++++------ locals/slogan.csv.import | 4 ++-- locals/slogan.en.translation | Bin 634 -> 634 bytes locals/slogan.jp.translation | Bin 769 -> 0 bytes locals/slogan.zh.translation | Bin 701 -> 701 bytes project.godot | 2 +- 33 files changed, 30 insertions(+), 30 deletions(-) rename locals/{DeathInfo.jp.translation => DeathInfo.ja.translation} (51%) create mode 100644 locals/InputMapping.ja.translation delete mode 100644 locals/InputMapping.jp.translation rename locals/{Log.jp.translation => Log.ja.translation} (89%) create mode 100644 locals/Slogan.ja.translation rename locals/{UI.jp.translation => UI.ja.translation} (89%) rename locals/{Weapon.jp.translation => Weapon.ja.translation} (55%) delete mode 100644 locals/slogan.jp.translation diff --git a/locals/DeathInfo.csv b/locals/DeathInfo.csv index e626ff2..b9e1a1d 100644 --- a/locals/DeathInfo.csv +++ b/locals/DeathInfo.csv @@ -1,5 +1,5 @@ -id,zh,en,jp -#kill self +id,zh,en,ja +#suicide #自杀 -death_info_self_1,{0}误伤了自己。,{0} accidentally shot himself.,{0}誤って自分を傷つけました。 +death_info_self_1,{0}误伤了自己。,{0} accidentally shot themself.,{0}誤って自分を傷つけました。 death_info_self_2,{0}忘记了瞄准。,{0} forgot to aim.,{0}照準を忘れました。 \ No newline at end of file diff --git a/locals/DeathInfo.csv.import b/locals/DeathInfo.csv.import index 8c94551..46f9caa 100644 --- a/locals/DeathInfo.csv.import +++ b/locals/DeathInfo.csv.import @@ -6,10 +6,10 @@ uid="uid://dwx0hwuy0uqio" [deps] -files=["res://locals/DeathInfo.zh.translation", "res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.jp.translation"] +files=["res://locals/DeathInfo.zh.translation", "res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.ja.translation"] source_file="res://locals/DeathInfo.csv" -dest_files=["res://locals/DeathInfo.zh.translation", "res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.jp.translation"] +dest_files=["res://locals/DeathInfo.zh.translation", "res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.ja.translation"] [params] diff --git a/locals/DeathInfo.en.translation b/locals/DeathInfo.en.translation index 5fc8b9cd6d13d98d44600c37efec0f4435f361a1..13de0d76e4cbb2a28559024ee60da2676227002d 100644 GIT binary patch delta 30 mcmaFF{D^sjG$X5-L4irZWCg}FMuo}kjHXQM1t#xfQ~>~wcL>-3 delta 30 mcmaFF{D^sjG$X5NQE^)CWCg}FM)}F@jHXP=X_NOcssI3%;RzG~ diff --git a/locals/DeathInfo.jp.translation b/locals/DeathInfo.ja.translation similarity index 51% rename from locals/DeathInfo.jp.translation rename to locals/DeathInfo.ja.translation index 66927b805aab36e8cd8ab946c09421be13f23031..e859cccfe192faf51c111917a9c0887b9c173375 100644 GIT binary patch delta 40 wcmbQrGL>b5Er*(D(d3h6XG|vsDojk^nOL}rH8ZIwzjU$!qcLORb5EeFe_wT>sm9it}(Dojk^nOL}r)hy54$at~>qcLN_D+Z((~Yi1$BpZrZeRAedCude{g0bBKW<$9 QxN#-}I8Z=l1OX!x0Pr(#xc~qF diff --git a/locals/InputMapping.zh.translation b/locals/InputMapping.zh.translation index 83a2f68872db597769114c9ffb3390e60d523546..9a4fd4448632c8887445cf36f01e5ce1b947b590 100644 GIT binary patch delta 17 YcmX@ee2{sAG$U()X^BbFWCg~B05UNJUH||9 delta 17 YcmX@ee2{sAG$X5dsd=L5WCg~B05GxzC;$Ke diff --git a/locals/Log.csv b/locals/Log.csv index b423213..065fa4f 100644 --- a/locals/Log.csv +++ b/locals/Log.csv @@ -1,9 +1,9 @@ -id,zh,en,jp +id,zh,en,ja map_generator_is_running,地图生成器正在运行中,请稍后重试。,"Map Generator is running, please try again later.",マップ生成器が動作中ですので、後ほどリトライしてください。 missing_parameters,缺少参数。,Missing parameters.,パラメータが不足しています。 -room_root_node_must_be_node2d,房间根节点必须是 Node2D。,Room root node must be Node2D.,ルートノードはNode2Dでなければなりません。 +room_root_node_must_be_node2d,房间根节点必须是 Node2D。,Room root node must be an instance of Node2D.,ルートノードはNode2Dでなければなりません。 width_or_height_of_room_slot_must_be_1,房间槽的宽度或高度必须为1。,The width or height of the room slot must be 1.,部屋の溝の幅または高さは1でなければなりません。 -connected_room_timeout,连接房间超时。,Connecting the room timed out.,接続部屋はタイムアウトです。 +connected_room_timeout,连接房间超时。,Timeout when connecting rooms.,接続部屋はタイムアウトです。 projectiles_is_empty,未设置抛射体。,The projectile is not set.,射出体は設置されていません。 map_generator_missing_parameters,地图生成器缺少参数。,Map generator missing parameters.,マップジェネレータが不足しています。 map_generator_attempts_to_parse_empty_layout_diagrams,地图生成器尝试解析空的布局图。,Map generator attempts to parse empty layout diagrams.,マップジェネレータは空のレイアウト図を解析しようとしています。 @@ -11,7 +11,7 @@ map_generator_has_no_starting_room_data,地图生成器没有起点房间数据 room_placement_strategy_terminates_map_generation,房间的放置策略终止了地图生成。,The room placement strategy terminates map generation.,部屋の配置ポリシーはマップ作成を終了します。 start_room_placement_information_returns_empty,起始房间放置信息返回空。,Start room placement information returns empty.,スタートルーム放置情報は空に戻ります。 start_room_placement_failed,起始房间放置失败。,Start room placement failed.,スタートルーム放置失敗です。 -room_data_missing,房间数据缺失。,Room data missing.,部屋データが欠落しています。 +room_data_missing,房间数据缺失。,Missing room data.,部屋データが欠落しています。 failed_to_calculate_the_room_location,计算房间{0}位置时失败。,Failed to calculate the location of room {0}.,部屋{0}の位置を計算するのに失敗します。 place_existing_rooms,放置已存在的房间{0}。,Place existing rooms {0}.,既存の部屋を置きます{0}。 room_placement_failed,房间{0}放置失败。,Room {0} placement failed.,部屋{0}の放置に失敗します。 diff --git a/locals/Log.csv.import b/locals/Log.csv.import index 15aea1e..2b4161f 100644 --- a/locals/Log.csv.import +++ b/locals/Log.csv.import @@ -6,10 +6,10 @@ uid="uid://btmjafjh5r6bk" [deps] -files=["res://locals/Log.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.jp.translation"] +files=["res://locals/Log.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.ja.translation"] source_file="res://locals/Log.csv" -dest_files=["res://locals/Log.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.jp.translation"] +dest_files=["res://locals/Log.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.ja.translation"] [params] diff --git a/locals/Log.en.translation b/locals/Log.en.translation index d2893ea22517ac118dae8674a38032ddb118d187..bc8e6288afdc216a92a8dccd0cf86d87ef163c7f 100644 GIT binary patch delta 402 zcmaFH`-*piG$U(eg+*rOW(7tzM#(G&1_luzmIq=+D4s1J@8vkzo=IG@4k#iB#L_@K zRnhd1B2bAikSz2(7D?s*Ab(YO#tVxVK>_CkmOM`-goB_t>N3j3^ delta 397 zcmaFG`;2#kG$U(bvROs>W(7tzM#&Tg1_ogumIq=+D4s1J?`1vNo=IG@94I0P#L_@K zRnhd16i^9BwJZ?BR9lzaEpC}y&m=Bs%*4PT0hCcel8w>e2&|pF9w>VsC@KfU=18(K z8g<9!PreVd$pa`V1H=YEymq@=Mheg@Ng!Jah+#Idyioc4aI!qJxa41;D98;U)iBwa z>z(4fC;KxS^Mdq%{NvpdynDsuer9paqd*==R1=7W3NrsnK}`qw3#R|J$3pI?$>*8% z8S^IpXBJoO0LqC2u@Vr^TC(PnE>IyKkPY%b8xVtRm^s;+#eQ-FizdIbe7B5OGUHyh r$$XC-qM0Y}WZA_P#5Q@U`eI$xD633?r$bzAeGB)N dQE6D%J1;D7nSWL;mQh4fVDuC5cc<|4-vQGW{|o>C literal 0 HcmV?d00001 diff --git a/locals/UI.csv b/locals/UI.csv index bf834ff..0289d47 100644 --- a/locals/UI.csv +++ b/locals/UI.csv @@ -1,4 +1,4 @@ -id,zh,en,jp +id,zh,en,ja product_name,异界旅人,A traveler from another world,異界の旅人です start_game,开始游戏,Start game,ゲームを始めます settings,设置,Settings,備え付け diff --git a/locals/UI.csv.import b/locals/UI.csv.import index b698255..3832bc3 100644 --- a/locals/UI.csv.import +++ b/locals/UI.csv.import @@ -6,10 +6,10 @@ uid="uid://bpdkorm7lprma" [deps] -files=["res://locals/UI.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.jp.translation"] +files=["res://locals/UI.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.ja.translation"] source_file="res://locals/UI.csv" -dest_files=["res://locals/UI.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.jp.translation"] +dest_files=["res://locals/UI.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.ja.translation"] [params] diff --git a/locals/UI.en.translation b/locals/UI.en.translation index ef64281eca4313b79d5165339ff2e83730d0fab4..b842904645a1e87d89617ae86c9f0ebb2005aaed 100644 GIT binary patch delta 18 ZcmdnRw~KFsG$X5NVSak$W(7tmHUK#;1xo+` delta 18 ZcmdnRw~KFsG$U(rWoBviW(7tmHUK*y1$zJh diff --git a/locals/UI.jp.translation b/locals/UI.ja.translation similarity index 89% rename from locals/UI.jp.translation rename to locals/UI.ja.translation index 28dcfd3653eeda0f899732ebf78f6a0dd25c6afe..15d7e315ed4d2da30bb451c67ef224127aecc706 100644 GIT binary patch delta 41 xcmbO$G*@VXEytaN%nzmeXDUt%RG65+GqG?LYf@2RPV!_0Mq|dr%^{2@*#TdK51ar1 delta 41 xcmbO$G*@VXEyvc3*tz;N!O4Z#2a diff --git a/locals/UI.zh.translation b/locals/UI.zh.translation index ea01a565ac9be3414625b8bdce5c1c400927e522..82bff5615480b834d6d39f5acbb4a23c6c2284bf 100644 GIT binary patch delta 18 ZcmdnWzm1Ej<&B&UYX_ApUS%L8_04+}ibN~PV delta 17 YcmeBW>1Ej<&B&UcXlz$?*flL1JP+tN_F?^*lgv4Im#R2f{FMUZA)Ykk0|dAWP+eI2?#Q7_3=xR*6lP HWr_s=mb4*3 delta 170 zcmeyx@{47IG$U)OMN&!nWCcby0X7B(hW|)lav7sWy%kW91Bw}eGzfF|?0e+|q(y;P z7Agi3=Ld=dDFz`RmIGp#dLE!SNK6cf6_CVvf#MoKK1dFPK@N}y;&34LV6bM%StT}E HmMInhR>C1D diff --git a/locals/slogan.jp.translation b/locals/slogan.jp.translation deleted file mode 100644 index 43f9b09bed7a232dc4db352eeec6daa3fc68908e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 769 zcma))K}#D!6vwBwwpz6XK@bl$t*2h<$%`N!dh{T~US%EEA+AX_VP~}{9x@wykSJ2A zig>V>*n((9FI6<3px}pib+!Ex?f-3dp#}>M{O0Za_RY+jVbWviw<2zj5Su_V=mMif z-^n`*YU-UQU7eG@Q*fc{?ID8wqbEN;5iTa~KCuN!-M~}2FzeaM$`x#xv;2akZRINQ z?B9Q`%q!6flUG{HjMCx>2GI;9+VD9o^|a;7$(#}$7*5XGS>?xqchbJ+xS9GiZF^49 zhZN!g=mXJ8gZ=$?oz$9}x2FcgYtBXc?}hMf@ns}&rYQI#Q-DkQ)6k&A;|AZ3aVOw= z;dEXq1zrH&o_V@b`&~ukQ!$BegFnFdRZQZa!$XNTF^O-7XEzj+_zw6i++YmX*b6QJ z1;{?vjm&D)*C$sm$ZU~Wiq|uh;SjqwsGAD5znvvU^ZVxY28u`uj2;o6JB`Qx7t9p?i~s-t diff --git a/locals/slogan.zh.translation b/locals/slogan.zh.translation index 3cc1a8c112784ee625e6db16919962a199e05cbb..6ed2eed10cbd8cced83f80c65fbe12a8f8a4fbd2 100644 GIT binary patch delta 170 zcmdnXx|el>G$X5VX;P`#WCg}hf&WN=je&t-ax0@oeIAe@1I3I$8ie_J_Pqj97~=du tagbU)D2A!$0g8KJQO^q$PXmf`KrzTtc_8ir;%7T{JnQIxI$4KlA^?(LC364( delta 170 zcmdnXx|el>G$X4?u5nuNWCg}h0X7B(hW|)lax0@oeHu`Z1Bw}eGzfF|?0c05q-CHO vCe9BO2MS?`^8m#`YW1KPrk)ol?uDct Date: Sat, 8 Jun 2024 20:27:02 +0800 Subject: [PATCH 4/4] Replaced hard-coded MaxSloganIndex with automatically fetched Slogan counts on load --- scripts/SloganProvider.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/SloganProvider.cs b/scripts/SloganProvider.cs index 81359fc..7968455 100644 --- a/scripts/SloganProvider.cs +++ b/scripts/SloganProvider.cs @@ -1,4 +1,5 @@ using ColdMint.scripts.utils; + using Godot; namespace ColdMint.scripts; @@ -9,7 +10,14 @@ namespace ColdMint.scripts; /// public static class SloganProvider { - private const int MaxSloganIndex = 5; + static SloganProvider() + { + // Calculate SloganCount From translation file + var sloganTrans = ResourceLoader.Load("res://locals/Slogan.en.translation")!; + SloganCount = sloganTrans.GetTranslatedMessageList().Length; + } + + private static int SloganCount { get; } /// @@ -19,7 +27,7 @@ public static class SloganProvider /// public static string? GetSlogan() { - var index = GD.Randi() % MaxSloganIndex + 1; - return TranslationServerUtils.Translate("slogan_" + index); + var index = GD.Randi() % SloganCount; + return TranslationServerUtils.Translate($"slogan_{index}"); } } \ No newline at end of file