diff --git a/objects/ui/hud.tscn b/objects/ui/hud.tscn index fbd7688..3cecb84 100644 --- a/objects/ui/hud.tscn +++ b/objects/ui/hud.tscn @@ -51,7 +51,7 @@ theme_override_constants/separation = 8 [node name="Health Label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"] layout_mode = 2 -text = "HEALTH" +text = "HEALTH_LABEL" label_settings = ExtResource("1_4dsh5") uppercase = true @@ -68,12 +68,12 @@ show_percentage = false [node name="Lives" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"] layout_mode = 2 -text = "LIVES" +text = "LIVES_LABEL" label_settings = ExtResource("1_4dsh5") uppercase = true [node name="Coins label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"] layout_mode = 2 -text = "COINS" +text = "COINS_LABEL" label_settings = ExtResource("1_4dsh5") uppercase = true diff --git a/objects/ui/marketplace.tscn b/objects/ui/marketplace.tscn index bc418a6..95e12e2 100644 --- a/objects/ui/marketplace.tscn +++ b/objects/ui/marketplace.tscn @@ -57,7 +57,6 @@ uppercase = true [node name="GridContainer" type="GridContainer" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -size_flags_horizontal = 4 size_flags_vertical = 2 theme_override_constants/h_separation = 4 theme_override_constants/v_separation = 16 diff --git a/objects/ui/marketplace_button.tscn b/objects/ui/marketplace_button.tscn index a08b6af..70a6d66 100644 --- a/objects/ui/marketplace_button.tscn +++ b/objects/ui/marketplace_button.tscn @@ -5,7 +5,10 @@ [node name="MarketplaceButton" type="Button"] offset_right = 8.0 offset_bottom = 8.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 theme_override_font_sizes/font_size = 8 text = "Fire brick 100" icon = ExtResource("1_5kqfg") flat = true +autowrap_mode = 2 diff --git a/resources/levels/village/village_1.tres b/resources/levels/village/village_1.tres index 966dd13..19a5180 100644 --- a/resources/levels/village/village_1.tres +++ b/resources/levels/village/village_1.tres @@ -5,6 +5,6 @@ [resource] resource_local_to_scene = true script = ExtResource("2_a2hpx") -level_name = "Village - 1" +level_name = "LEVEL_1_NAME" scene_path = "res://scenes/level_village_1.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_2.tres b/resources/levels/village/village_2.tres index d594d75..4f20274 100644 --- a/resources/levels/village/village_2.tres +++ b/resources/levels/village/village_2.tres @@ -4,6 +4,6 @@ [resource] script = ExtResource("1_1tjmh") -level_name = "Village - 2" +level_name = "LEVEL_2_NAME" scene_path = "res://scenes/level_village_2.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_3.tres b/resources/levels/village/village_3.tres index 1543e21..5e3b078 100644 --- a/resources/levels/village/village_3.tres +++ b/resources/levels/village/village_3.tres @@ -4,5 +4,6 @@ [resource] script = ExtResource("1_3v5yj") -level_name = "Village - 3" +level_name = "LEVEL_3_NAME" +scene_path = "" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_4.tres b/resources/levels/village/village_4.tres index 3f938ce..0237690 100644 --- a/resources/levels/village/village_4.tres +++ b/resources/levels/village/village_4.tres @@ -4,6 +4,6 @@ [resource] script = ExtResource("1_upuk8") -level_name = "Village - 4" +level_name = "LEVEL_4_NAME" scene_path = "res://scenes/level_village_4.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_5.tres b/resources/levels/village/village_5.tres index bc4a9cb..c0d2df3 100644 --- a/resources/levels/village/village_5.tres +++ b/resources/levels/village/village_5.tres @@ -4,5 +4,6 @@ [resource] script = ExtResource("1_owe0p") -level_name = "Village - 5" +level_name = "LEVEL_5_NAME" +scene_path = "" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/skills/brick_throw.tres b/resources/skills/brick_throw.tres index 27c66c8..a3f7f2f 100644 --- a/resources/skills/brick_throw.tres +++ b/resources/skills/brick_throw.tres @@ -7,8 +7,8 @@ [resource] script = ExtResource("1_etxe2") -name = "Brick power" -description = "Allows you to throw bricks at enemies" +name = "BRICK_POWER" +description = "BRICK_POWER_DESCRIPTION" node = ExtResource("1_5gnea") config = { "player_controller": NodePath("."), diff --git a/resources/skills/explosive_brick.tres b/resources/skills/explosive_brick.tres index e207aa7..703d088 100644 --- a/resources/skills/explosive_brick.tres +++ b/resources/skills/explosive_brick.tres @@ -8,8 +8,8 @@ [resource] script = ExtResource("3_cgsq1") -name = "Explosive brick" -description = "Allows you to throw explosive bricks at enemies" +name = "EXPLOSIVE_BRICK" +description = "EXPLOSIVE_BRICK_DESCRIPTION" node = ExtResource("2_e0o8w") config = { "brick_scene": ExtResource("1_6pfoa"), diff --git a/resources/skills/fire_brick.tres b/resources/skills/fire_brick.tres index 496718d..500893f 100644 --- a/resources/skills/fire_brick.tres +++ b/resources/skills/fire_brick.tres @@ -8,8 +8,8 @@ [resource] script = ExtResource("1_2j5ko") -name = "Fire brick" -description = "Allows you to throw fire bricks at enemies" +name = "FIRE_BRICK" +description = "FIRE_BIRCK_DESCRIPTION" node = ExtResource("1_g53fp") config = { "brick_scene": ExtResource("1_2g43l"), diff --git a/resources/skills/ice_brick.tres b/resources/skills/ice_brick.tres index 24419cf..1b4701e 100644 --- a/resources/skills/ice_brick.tres +++ b/resources/skills/ice_brick.tres @@ -8,8 +8,8 @@ [resource] script = ExtResource("2_pspkt") -name = "Ice brick" -description = "Allows you to throw ice bricks at enemies" +name = "ICE_BRICK" +description = "ICE_BRICK_DESCRIPTION" node = ExtResource("1_rflri") config = { "brick_scene": ExtResource("1_ci3d1"), diff --git a/resources/skills/magnetic.tres b/resources/skills/magnetic.tres index 2d47bf0..031faf9 100644 --- a/resources/skills/magnetic.tres +++ b/resources/skills/magnetic.tres @@ -6,8 +6,8 @@ [resource] script = ExtResource("1_r01oq") -name = "Magnetic" -description = "Attract coins" +name = "MAGNETIC" +description = "MAGNETIC_DESCRIPTION" node = ExtResource("1_er41s") config = { "magnetic_area": NodePath("MagneticArea"), diff --git a/scenes/level_village_1.tscn b/scenes/level_village_1.tscn index 5fed040..3b0eb88 100644 --- a/scenes/level_village_1.tscn +++ b/scenes/level_village_1.tscn @@ -129,15 +129,15 @@ position = Vector2(1485, 25) [node name="Tooltip" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(712, -343) -text = "Some blocks might collapse" +text = "LEVEL_1_TOOLTIP_1" [node name="Tooltip2" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(552, 25) -text = "Jump to the other side!" +text = "LEVEL_1_TOOLTIP_2" [node name="Tooltip3" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(-59, -247) -text = "To rescue your child, you need to find the lever." +text = "LEVEL_1_TOOLTIP_3" [connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] [connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] diff --git a/scripts/ui/hud.gd b/scripts/ui/hud.gd index 61232f0..77cd50a 100644 --- a/scripts/ui/hud.gd +++ b/scripts/ui/hud.gd @@ -33,14 +33,14 @@ func set_coins_label() -> void: return #todo: set internationalized text - coins_label.text = tr("COINS") + ": " + str(game_manager.get_coins()) + coins_label.text = tr("COINS_LABEL") + ":" + str(game_manager.get_coins()) func set_lives_label() -> void: if not game_manager: return - lives_label.text = tr("LIVES") + ": " + str(game_manager.get_lives()) + lives_label.text = tr("LIVES_LABEL") + ":" + str(game_manager.get_lives()) func set_health_progressbar() -> void: diff --git a/scripts/ui/marketplace.gd b/scripts/ui/marketplace.gd index ca3f463..b640343 100644 --- a/scripts/ui/marketplace.gd +++ b/scripts/ui/marketplace.gd @@ -44,7 +44,7 @@ func _input(event: InputEvent) -> void: func get_button_text(skill: SkillData) -> String: - return skill.name + " " + str(skill.cost) + return tr(skill.name) + " " + str(skill.cost) func create_upgrade_button(skill: SkillData): diff --git a/translations.csv b/translations.csv index 9d0d3c4..88c6750 100644 --- a/translations.csv +++ b/translations.csv @@ -13,8 +13,8 @@ GAMEPLAY_BUTTON,GAMEPLAY,GRA INPUT_TITLE,INPUT,KLAWISZE AUDIO_TITLE,AUDIO,AUDIO MASTER_VOLUME,MASTER VOLUME,OGÓLNA -MUSIC VOLUME,MUSIC VOLUME,MUZYKA -SOUNDS VOLUME,SOUNDS VOLUME,EFEKTY DŹWIĘKOWE +MUSIC_VOLUME,MUSIC VOLUME,MUZYKA +SOUNDS_VOLUME,SOUNDS VOLUME,EFEKTY DŹWIĘKOWE CREDITS_TITLE,CREDITS,AUTORZY CREDITS,"Game was created by Gabriel Kaszewski. @@ -53,3 +53,11 @@ PAUSE,PAUSE,PAUZA RESUME_BUTTON,RESUME,WZNÓW EXIT_TO_MENU_BUTTON,EXIT TO MENU,WYJDŹ DO MENU RESET_TO_DEFAULT_BUTTON,RESET TO DEFAULT BUTTON,PRZYWRÓĆ DOMYŚLNE USTAWIENIA +BRICK_POWER_DESCRIPTION,Allows you to throw bricks at enemies,Pozwala Panu Cegle rzucać cegłami w przeciwników +EXPLOSIVE_BRICK_DESCRIPTION,Allows you to throw explosive bricks at enemies,Pozwala Panu Cegle rzucać wybuchającymi cegłami w przeciwników +FIRE_BIRCK_DESCRIPTION,Allows you to throw fire bricks at enemies,Pozwala Panu Cegle rzucać ognistymi cegłami w przeciwników +ICE_BRICK_DESCRIPTION,Allows you to throw ice bricks at enemies,Pozwala Panu Cegle rzucać lodowymi cegłami w przeciwników +MAGNETIC_DESCRIPTION,Attract coins,Przyciąga monety w pobliżu +LEVEL_1_TOOLTIP_1,Some blocks might collapse,Niektóre bloki mogą się zapaść. +LEVEL_1_TOOLTIP_2,Jump to the other side!,Przeskocz na drugą stronę! +LEVEL_1_TOOLTIP_3,"To rescue your child, you need to find the lever.",Uratuj dziecko poprzez aktywację dźwigni. diff --git a/translations.en.translation b/translations.en.translation index 729d754..e498ad6 100644 Binary files a/translations.en.translation and b/translations.en.translation differ diff --git a/translations.pl.translation b/translations.pl.translation index b42177b..371160f 100644 Binary files a/translations.pl.translation and b/translations.pl.translation differ