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 5fc8b9c..13de0d7 100644 Binary files a/locals/DeathInfo.en.translation and b/locals/DeathInfo.en.translation differ 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 66927b8..e859ccc 100644 Binary files a/locals/DeathInfo.jp.translation and b/locals/DeathInfo.ja.translation differ diff --git a/locals/DeathInfo.zh.translation b/locals/DeathInfo.zh.translation index 26abed9..4ff332e 100644 Binary files a/locals/DeathInfo.zh.translation and b/locals/DeathInfo.zh.translation differ diff --git a/locals/InputMapping.csv b/locals/InputMapping.csv index 3b44d06..00839dc 100644 --- a/locals/InputMapping.csv +++ b/locals/InputMapping.csv @@ -1,2 +1,2 @@ -id,zh,en,jp +id,zh,en,ja Left Mouse Button,鼠标左键,Left Mouse Button,マウスの左ボタンです \ No newline at end of file diff --git a/locals/InputMapping.csv.import b/locals/InputMapping.csv.import index 9699663..be37273 100644 --- a/locals/InputMapping.csv.import +++ b/locals/InputMapping.csv.import @@ -6,10 +6,10 @@ uid="uid://dvvc7sup2d2ii" [deps] -files=["res://locals/InputMapping.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.jp.translation"] +files=["res://locals/InputMapping.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.ja.translation"] source_file="res://locals/InputMapping.csv" -dest_files=["res://locals/InputMapping.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.jp.translation"] +dest_files=["res://locals/InputMapping.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.ja.translation"] [params] diff --git a/locals/InputMapping.en.translation b/locals/InputMapping.en.translation index 17efddb..c89383c 100644 Binary files a/locals/InputMapping.en.translation and b/locals/InputMapping.en.translation differ diff --git a/locals/InputMapping.ja.translation b/locals/InputMapping.ja.translation new file mode 100644 index 0000000..3446dc7 Binary files /dev/null and b/locals/InputMapping.ja.translation differ diff --git a/locals/InputMapping.jp.translation b/locals/InputMapping.jp.translation deleted file mode 100644 index 2ee4573..0000000 Binary files a/locals/InputMapping.jp.translation and /dev/null differ diff --git a/locals/InputMapping.zh.translation b/locals/InputMapping.zh.translation index 83a2f68..9a4fd44 100644 Binary files a/locals/InputMapping.zh.translation and b/locals/InputMapping.zh.translation differ 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 d2893ea..bc8e628 100644 Binary files a/locals/Log.en.translation and b/locals/Log.en.translation differ diff --git a/locals/Log.jp.translation b/locals/Log.ja.translation similarity index 89% rename from locals/Log.jp.translation rename to locals/Log.ja.translation index d3df095..5b680be 100644 Binary files a/locals/Log.jp.translation and b/locals/Log.ja.translation differ diff --git a/locals/Log.zh.translation b/locals/Log.zh.translation index 5a69b9a..5b2d9d0 100644 Binary files a/locals/Log.zh.translation and b/locals/Log.zh.translation differ diff --git a/locals/Slogan.ja.translation b/locals/Slogan.ja.translation new file mode 100644 index 0000000..584a42b Binary files /dev/null and b/locals/Slogan.ja.translation differ 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 ef64281..b842904 100644 Binary files a/locals/UI.en.translation and b/locals/UI.en.translation differ 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 28dcfd3..15d7e31 100644 Binary files a/locals/UI.jp.translation and b/locals/UI.ja.translation differ diff --git a/locals/UI.zh.translation b/locals/UI.zh.translation index ea01a56..82bff56 100644 Binary files a/locals/UI.zh.translation and b/locals/UI.zh.translation differ diff --git a/locals/Weapon.csv b/locals/Weapon.csv index ae007bc..7bfa22a 100644 --- a/locals/Weapon.csv +++ b/locals/Weapon.csv @@ -1,3 +1,3 @@ -id,zh,en,jp +id,zh,en,ja staff_of_the_undead,死灵法杖,StaffOfTheUndead,ネクロポリスの杖です staff_of_the_undead_desc,发射诅咒,可将敌人转化为邪恶的怪物。,Cast a curse that transforms enemies into evil monsters.,呪いを発射して、敵を邪悪な怪物に変えることができます。 \ No newline at end of file diff --git a/locals/Weapon.csv.import b/locals/Weapon.csv.import index e60bdb6..27a557f 100644 --- a/locals/Weapon.csv.import +++ b/locals/Weapon.csv.import @@ -2,14 +2,14 @@ importer="csv_translation" type="Translation" -uid="uid://dmhmjvtquyu16" +uid="uid://ci3wou75hhj6e" [deps] -files=["res://locals/Weapon.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.jp.translation"] +files=["res://locals/Weapon.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.ja.translation"] source_file="res://locals/Weapon.csv" -dest_files=["res://locals/Weapon.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.jp.translation"] +dest_files=["res://locals/Weapon.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.ja.translation"] [params] diff --git a/locals/Weapon.en.translation b/locals/Weapon.en.translation index 6128bb4..40ce8d5 100644 Binary files a/locals/Weapon.en.translation and b/locals/Weapon.en.translation differ diff --git a/locals/Weapon.jp.translation b/locals/Weapon.ja.translation similarity index 55% rename from locals/Weapon.jp.translation rename to locals/Weapon.ja.translation index addf768..4b0e72a 100644 Binary files a/locals/Weapon.jp.translation and b/locals/Weapon.ja.translation differ diff --git a/locals/Weapon.zh.translation b/locals/Weapon.zh.translation index d6e5788..770caa6 100644 Binary files a/locals/Weapon.zh.translation and b/locals/Weapon.zh.translation differ diff --git a/locals/slogan.csv b/locals/slogan.csv index 76d8dd3..0d163c5 100644 --- a/locals/slogan.csv +++ b/locals/slogan.csv @@ -1,6 +1,6 @@ -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_5,魔法是想象的世界。,Magic is an imaginary world.,魔法は想像の世界です。 \ No newline at end of file +id,zh,en,ja +slogan_0,游戏属于每一个人。,The game belongs to everyone.,ゲームはすべての人のものです。 +slogan_1,如果你想要得到爱,你就播种爱。,"If you want love, you sow love.",愛を手に入れたければ、愛の種をまきます。 +slogan_2,快乐?伤心?痛苦?,Happy? Sad? Pain?,楽しいですか?悲しいですか?苦しいですか? +slogan_3,Kawaii!,Kawaii!,Kawaii! +slogan_4,魔法是想象的世界。,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..bfacd67 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.ja.translation"] source_file="res://locals/Slogan.csv" -dest_files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation"] +dest_files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation"] [params] diff --git a/locals/slogan.en.translation b/locals/slogan.en.translation index 641c239..01bea34 100644 Binary files a/locals/slogan.en.translation and b/locals/slogan.en.translation differ diff --git a/locals/slogan.jp.translation b/locals/slogan.jp.translation deleted file mode 100644 index c5d3c85..0000000 Binary files a/locals/slogan.jp.translation and /dev/null differ diff --git a/locals/slogan.zh.translation b/locals/slogan.zh.translation index bb08eec..6ed2eed 100644 Binary files a/locals/slogan.zh.translation and b/locals/slogan.zh.translation differ diff --git a/project.godot b/project.godot index 8181c51..e991cd5 100644 --- a/project.godot +++ b/project.godot @@ -146,7 +146,7 @@ hotbar_previous={ [internationalization] -locale/translations=PackedStringArray("res://locals/UI.en.translation", "res://locals/UI.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.zh.translation", "res://locals/InputMapping.jp.translation", "res://locals/Log.jp.translation", "res://locals/UI.jp.translation", "res://locals/Weapon.jp.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.jp.translation", "res://locals/Slogan.zh.translation", "res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.jp.translation", "res://locals/DeathInfo.zh.translation") +locale/translations=PackedStringArray("res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.ja.translation", "res://locals/DeathInfo.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.ja.translation", "res://locals/InputMapping.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.ja.translation", "res://locals/Log.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation", "res://locals/Slogan.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.ja.translation", "res://locals/UI.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.ja.translation", "res://locals/Weapon.zh.translation") [layer_names] 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