diff --git a/objects/ui/audio_settings.tscn b/objects/ui/audio_settings.tscn index b1b6226..219ae27 100644 --- a/objects/ui/audio_settings.tscn +++ b/objects/ui/audio_settings.tscn @@ -43,7 +43,7 @@ size_flags_vertical = 4 [node name="Audio" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "audio" +text = "AUDIO" horizontal_alignment = 1 vertical_alignment = 1 uppercase = true @@ -59,7 +59,7 @@ theme_override_constants/separation = 4 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer/Master volume"] layout_mode = 2 -text = "Master volume" +text = "MASTER_VOLUME" horizontal_alignment = 1 [node name="HSlider" type="HSlider" parent="PanelContainer/MarginContainer/VBoxContainer/Master volume"] @@ -73,7 +73,7 @@ theme_override_constants/separation = 4 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer/Music volume"] layout_mode = 2 -text = "Music volume" +text = "MUSIC_VOLUME" horizontal_alignment = 1 [node name="HSlider" type="HSlider" parent="PanelContainer/MarginContainer/VBoxContainer/Music volume"] @@ -87,7 +87,7 @@ theme_override_constants/separation = 4 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer/SFX volume"] layout_mode = 2 -text = "Sounds volume" +text = "SOUNDS_VOLUME" horizontal_alignment = 1 [node name="HSlider" type="HSlider" parent="PanelContainer/MarginContainer/VBoxContainer/SFX volume"] diff --git a/objects/ui/credits.tscn b/objects/ui/credits.tscn index ece74ea..cc8a709 100644 --- a/objects/ui/credits.tscn +++ b/objects/ui/credits.tscn @@ -38,7 +38,7 @@ theme_override_constants/separation = 32 [node name="Pause" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "CREDITS" +text = "CREDITS_TITLE" horizontal_alignment = 1 vertical_alignment = 1 uppercase = true @@ -46,12 +46,5 @@ uppercase = true [node name="RichTextLabel" type="RichTextLabel" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 size_flags_vertical = 3 -text = "Game was created by Gabriel Kaszewski. - -Main character was drawn by my girlfriend <3 - -I would like to thank all of my friends that encouraged my during development of this game. - -For now this is it, enjoy the game! -" +text = "CREDITS" fit_content = true diff --git a/objects/ui/game_over_screen.tscn b/objects/ui/game_over_screen.tscn index f3de45f..2c751cc 100644 --- a/objects/ui/game_over_screen.tscn +++ b/objects/ui/game_over_screen.tscn @@ -41,7 +41,7 @@ theme_override_constants/separation = 16 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "game over" +text = "GAME_OVER" horizontal_alignment = 1 uppercase = true @@ -51,10 +51,10 @@ layout_mode = 2 [node name="RestartLevelButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "RESTART LEVEL" +text = "RESTART_LEVEL_BUTTON" flat = true [node name="MenuButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "GO TO MENU" +text = "GO_TO_MENU_BUTTON" flat = true diff --git a/objects/ui/hud.tscn b/objects/ui/hud.tscn index 910eb62..fbd7688 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_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 3" +text = "LIVES" label_settings = ExtResource("1_4dsh5") uppercase = true [node name="Coins label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"] layout_mode = 2 -text = "Coins 33" +text = "COINS" label_settings = ExtResource("1_4dsh5") uppercase = true diff --git a/objects/ui/input_settings.tscn b/objects/ui/input_settings.tscn index 12a2e11..8c761c6 100644 --- a/objects/ui/input_settings.tscn +++ b/objects/ui/input_settings.tscn @@ -38,7 +38,7 @@ layout_mode = 2 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "input" +text = "INPUT" horizontal_alignment = 1 vertical_alignment = 1 uppercase = true @@ -72,5 +72,5 @@ layout_mode = 2 [node name="Reset to default Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "RESET TO DEFAULT" +text = "RESET_TO_DEFAULT_BUTTON" flat = true diff --git a/objects/ui/main_menu.tscn b/objects/ui/main_menu.tscn index 81c3f10..3bdf935 100644 --- a/objects/ui/main_menu.tscn +++ b/objects/ui/main_menu.tscn @@ -43,7 +43,7 @@ theme_override_constants/separation = 16 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "MR. BRICK ADVENTURES" +text = "GAME_TITLE" horizontal_alignment = 1 uppercase = true @@ -54,27 +54,27 @@ size_flags_vertical = 3 [node name="ContinueButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "CONTINUE" +text = "CONTINUE_BUTTON" flat = true [node name="NewGameButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "NEW GAME" +text = "NEW_GAME_BUTTON" flat = true [node name="SettingsButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "SETTINGS" +text = "SETTINGS_BUTTON" flat = true [node name="CreditsButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "CREDITS" +text = "CREDITS_BUTTON" flat = true [node name="QuitButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "QUIT GAME" +text = "QUIT_BUTTON" flat = true [node name="version" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] diff --git a/objects/ui/marketplace.tscn b/objects/ui/marketplace.tscn index 020f834..bc418a6 100644 --- a/objects/ui/marketplace.tscn +++ b/objects/ui/marketplace.tscn @@ -49,7 +49,7 @@ theme_override_constants/separation = 32 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "marketplace" +text = "MARKETPLACE" horizontal_alignment = 1 vertical_alignment = 1 justification_flags = 162 diff --git a/objects/ui/pause_menu.tscn b/objects/ui/pause_menu.tscn index 0343439..d995ee9 100644 --- a/objects/ui/pause_menu.tscn +++ b/objects/ui/pause_menu.tscn @@ -46,7 +46,7 @@ size_flags_vertical = 4 [node name="Pause" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "Pause" +text = "PAUSE" horizontal_alignment = 1 vertical_alignment = 1 uppercase = true @@ -58,20 +58,20 @@ size_flags_vertical = 3 [node name="Resume Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "RESUME" +text = "RESUME_BUTTON" flat = true [node name="Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "SETTINGS" +text = "SETTINGS_BUTTON" flat = true [node name="Exit to menu Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "EXIT TO MENU" +text = "EXIT_TO_MENU_BUTTON" flat = true [node name="Quit game Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "QUIT GAME" +text = "QUIT_BUTTON" flat = true diff --git a/objects/ui/settings_menu.tscn b/objects/ui/settings_menu.tscn index a4289f5..393c240 100644 --- a/objects/ui/settings_menu.tscn +++ b/objects/ui/settings_menu.tscn @@ -42,7 +42,7 @@ theme_override_constants/separation = 16 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 theme_override_font_sizes/font_size = 16 -text = "settings" +text = "SETTINGS" horizontal_alignment = 1 vertical_alignment = 1 uppercase = true @@ -53,22 +53,22 @@ size_flags_vertical = 3 [node name="Input Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "INPUT" +text = "INPUT_BUTTON" flat = true [node name="Display Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "DISPLAY" +text = "DISPLAY_BUTTON" flat = true [node name="Audio Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "AUDIO" +text = "AUDIO_BUTTON" flat = true [node name="Gameplay Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "GAMEPLAY" +text = "GAMEPLAY_BUTTON" flat = true [node name="Spacer2" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer"] diff --git a/project.godot b/project.godot index 6cd1658..225f9fc 100644 --- a/project.godot +++ b/project.godot @@ -155,6 +155,10 @@ switch_movement={ ] } +[internationalization] + +locale/translations=PackedStringArray("res://translations.en.translation", "res://translations.pl.translation") + [layer_names] 2d_physics/layer_1="Terrain" diff --git a/scripts/ui/hud.gd b/scripts/ui/hud.gd index 294934c..61232f0 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 = "Coins:" + str(game_manager.get_coins()) + coins_label.text = tr("COINS") + ": " + str(game_manager.get_coins()) func set_lives_label() -> void: if not game_manager: return - lives_label.text = "Lives:" + str(game_manager.get_lives()) + lives_label.text = tr("LIVES") + ": " + str(game_manager.get_lives()) func set_health_progressbar() -> void: diff --git a/translations.csv b/translations.csv new file mode 100644 index 0000000..9d0d3c4 --- /dev/null +++ b/translations.csv @@ -0,0 +1,55 @@ +key,en,pl +GAME_TITLE,Mr. Brick Adventures,Przygody Pana Cegły +CONTINUE_BUTTON,CONTINUE,KONTYNUUJ +NEW_GAME_BUTTON,NEW GAME,NOWA GRA +SETTINGS_BUTTON,SETTINGS,USTAWIENIA +CREDITS_BUTTON,CREDITS,AUTORZY +QUIT_BUTTON,QUIT GAME,WYJDŹ Z GRY +SETTINGS_TITLE,SETTINGS,USTAWIENIA +INPUT_BUTTON,INPUT,KLAWISZE +DISPLAY_BUTTON,DISPLAY,OBRAZ +AUDIO_BUTTON,AUDIO,AUDIO +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 +CREDITS_TITLE,CREDITS,AUTORZY +CREDITS,"Game was created by Gabriel Kaszewski. + +Main character was drawn by my girlfriend <3 + +I would like to thank all of my friends that encouraged my during development of this game. + +For now this is it, enjoy the game! +","Przygody Pana Cegły zostały zrobione przeze mnie, Gabriela Kaszewskiego. + +Główna postać, Pan Cegła został narysowany przez moją dziewczynę, która chciała pozostać anonimowa. + +Z tego miejsca chciałbym podziękować wszystkim moim znajomym I przyjaciołom, którzy wspierali mnie przy tworzeniu tej gry. + +Liczę, że będziesz dobrze się bawić! + +Pozdrawiam." +HEALTH_LABEL,HEALTH,ZDROWIE +LIVES_LABEL,LIVES,ŻYCIA +COINS_LABEL,COINS,MONETY +LEVEL_1_NAME,VILLAGE – 1,WIOSKA – 1 +LEVEL_2_NAME,VILLAGE – 2,WIOSKA – 2 +LEVEL_3_NAME,VILLAGE – 3,WIOSKA – 3 +LEVEL_4_NAME,VILLAGE – 4,WIOSKA – 4 +LEVEL_5_NAME,VILLAGE – 5,WIOSKA – 5 +MARKETPLACE,MARKETPLACE,SKLEP +GAME_OVER,GAME OVER,KONIEC GRY +RESTART_LEVEL_BUTTON,RESTART LEVEL,POTWÓRZ POZIOM +GO_TO_MENU_BUTTON,GO TO MENU,WRÓĆ DO MENU +BRICK_POWER,Brick power,Ceglana siła +EXPLOSIVE_BRICK,Explosive brick,Wybuchowa cegła +FIRE_BRICK,Fire brick,Ognista cegła +ICE_BRICK,Ice brick,Lodowa cegła +MAGNETIC,Magnetic power,Moc magnesu +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 diff --git a/translations.csv.import b/translations.csv.import new file mode 100644 index 0000000..52b3459 --- /dev/null +++ b/translations.csv.import @@ -0,0 +1,17 @@ +[remap] + +importer="csv_translation" +type="Translation" +uid="uid://csnsssxkbmkoy" + +[deps] + +files=["res://translations.en.translation", "res://translations.pl.translation"] + +source_file="res://translations.csv" +dest_files=["res://translations.en.translation", "res://translations.pl.translation"] + +[params] + +compress=true +delimiter=0 diff --git a/translations.en.translation b/translations.en.translation new file mode 100644 index 0000000..729d754 Binary files /dev/null and b/translations.en.translation differ diff --git a/translations.ods b/translations.ods new file mode 100644 index 0000000..f7d1943 Binary files /dev/null and b/translations.ods differ diff --git a/translations.pl.translation b/translations.pl.translation new file mode 100644 index 0000000..b42177b Binary files /dev/null and b/translations.pl.translation differ