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..ba95933 --- /dev/null +++ b/locales/en.po @@ -0,0 +1,24 @@ +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" 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..c8b73cd --- /dev/null +++ b/locales/fr.po @@ -0,0 +1,24 @@ +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" 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/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 }