diff --git a/locales/en.mo b/locales/en.mo new file mode 100644 index 0000000..4b38a20 Binary files /dev/null and b/locales/en.mo differ diff --git a/locales/en.po b/locales/en.po new file mode 100644 index 0000000..5a1980f --- /dev/null +++ b/locales/en.po @@ -0,0 +1,36 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 2.4.1\n" + +msgid "MAIN_BUTTON_NEW" +msgstr "Start game" + +msgid "MAIN_BUTTON_CONTINUE" +msgstr "Continue" + +msgid "MAIN_BUTTON_ABOUT" +msgstr "About" + +msgid "MAIN_BUTTON_QUIT" +msgstr "Exit" + +msgid "LOADING" +msgstr "Loading ..." + +msgid "ABOUT_LEAD_DEV" +msgstr "Lead Developer -- VAILLANT Jérémy" + +msgid "ABOUT_LEAD_ARTIST" +msgstr "Lead Artist -- VAILLANT Aurélien" + +msgid "ABOUT_SOURCE_GAME" +msgstr "Source code of game : https://dev.stilobique.com/Athena/game-source" diff --git a/locales/fr.mo b/locales/fr.mo new file mode 100644 index 0000000..762c1b0 Binary files /dev/null and b/locales/fr.mo differ diff --git a/locales/fr.po b/locales/fr.po new file mode 100644 index 0000000..aa4b8ce --- /dev/null +++ b/locales/fr.po @@ -0,0 +1,36 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"X-Generator: Poedit 2.4.1\n" + +msgid "MAIN_BUTTON_NEW" +msgstr "Commencer" + +msgid "MAIN_BUTTON_CONTINUE" +msgstr "Continue" + +msgid "MAIN_BUTTON_ABOUT" +msgstr "Credit" + +msgid "MAIN_BUTTON_QUIT" +msgstr "Quit" + +msgid "LOADING" +msgstr "Chargement ..." + +msgid "ABOUT_LEAD_DEV" +msgstr "Lead Developer -- VAILLANT Jérémy" + +msgid "ABOUT_LEAD_ARTIST" +msgstr "Lead Artist -- VAILLANT Aurélien" + +msgid "ABOUT_SOURCE_GAME" +msgstr "Code source du jeux : https://dev.stilobique.com/Athena/game-source" diff --git a/project.godot b/project.godot index 6d2e6fb..47493f8 100644 --- a/project.godot +++ b/project.godot @@ -33,6 +33,11 @@ ui_end={ ] } +[locale] + +translations=PoolStringArray( "res://locales/fr.po", "res://locales/en.po" ) +locale_filter=[ 0, [ "en_US", "fr_FR" ] ] + [physics] common/enable_pause_aware_picking=true diff --git a/scenes/UI/About.tscn b/scenes/UI/About.tscn index 3eab727..e308668 100644 --- a/scenes/UI/About.tscn +++ b/scenes/UI/About.tscn @@ -3,35 +3,59 @@ [sub_resource type="GDScript" id=1] script/source = "extends Node - -# Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. - -func _on_Return_pressed(): - get_tree().change_scene(\"res://scenes/main.tscn\") + $CenterContainer/VBoxContainer/LeadDev.text = tr(\"ABOUT_LEAD_DEV\") + $CenterContainer/VBoxContainer/LeadArtist.text = tr(\"ABOUT_LEAD_ARTIST\") + $CenterContainer/VBoxContainer/Sources.text = tr(\"ABOUT_SOURCE_GAME\") " [node name="About" type="Node"] script = SubResource( 1 ) -[node name="GRem" type="Label" parent="."] -margin_left = 350.0 -margin_top = 150.0 -margin_right = 616.0 -margin_bottom = 181.0 -text = "Lead Develop : GRem -- VAILLANT Jérémy -" +[node name="CenterContainer" type="CenterContainer" parent="."] +margin_left = 150.0 +margin_right = 1024.0 +margin_bottom = 600.0 __meta__ = { "_edit_use_anchors_": false } -[node name="Stilobique" type="Label" parent="."] -margin_left = 500.0 -margin_top = 300.0 -margin_right = 783.0 -margin_bottom = 331.0 -text = "Lead Artist : Stilobique -- VAILLANT Aurelien" +[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] +margin_left = 210.0 +margin_top = 275.0 +margin_right = 663.0 +margin_bottom = 325.0 +alignment = 1 + +[node name="LeadDev" type="Label" parent="CenterContainer/VBoxContainer"] +anchor_top = -0.38 +anchor_bottom = -0.38 +margin_right = 453.0 +margin_bottom = 14.0 +text = "Lead Develop : GRem -- VAILLANT Jérémy" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="LeadArtist" type="Label" parent="CenterContainer/VBoxContainer"] +margin_top = 18.0 +margin_right = 453.0 +margin_bottom = 32.0 +text = "Lead Artist : Stilobique -- VAILLANT Aurelien" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Sources" type="Label" parent="CenterContainer/VBoxContainer"] +anchor_top = 0.32 +anchor_bottom = 0.32 +margin_top = 36.0 +margin_right = 453.0 +margin_bottom = 50.0 +text = "Source code of game : https://dev.stilobique.com/Athena/game-source" +align = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/UI/Loading.gd b/scenes/UI/Loading.gd new file mode 100644 index 0000000..ba215df --- /dev/null +++ b/scenes/UI/Loading.gd @@ -0,0 +1,4 @@ +extends Control + +func _ready(): + $ColorRect/CenterContainer/VBoxContainer/Label.text = tr("LOADING") diff --git a/scenes/UI/Loading.tscn b/scenes/UI/Loading.tscn index 57cf412..ce533df 100644 --- a/scenes/UI/Loading.tscn +++ b/scenes/UI/Loading.tscn @@ -1,8 +1,11 @@ -[gd_scene format=2] +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scenes/UI/Loading.gd" type="Script" id=1] [node name="Control" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/main.gd b/scenes/main.gd index db3aa23..db48726 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -5,6 +5,13 @@ export (PackedScene) var scenes = load("res://scenes/UI/ChooseScene.tscn") var current_scene = null +func _ready(): + print(tr("MESSAGE_READY")) + $Grid/Menu/Action/New.text = tr("MAIN_BUTTON_NEW") + $Grid/Menu/Action/Continue.text = tr("MAIN_BUTTON_CONTINUE") + $Grid/Menu/Action/About.text = tr("MAIN_BUTTON_ABOUT") + $Grid/Menu/Action/Quit.text = tr("MAIN_BUTTON_QUIT") + # Quit the game func _on_Quit_pressed(): get_tree().quit(0) diff --git a/scenes/main.tscn b/scenes/main.tscn index fb451d0..ac0e000 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -82,7 +82,7 @@ margin_top = 30.0 margin_right = 130.0 margin_bottom = 64.0 custom_fonts/font = ExtResource( 3 ) -text = "Nouveau" +text = "new" __meta__ = { "_edit_use_anchors_": false }